[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zhnlpd37.fsf@vitty.brq.redhat.com>
Date: Fri, 17 May 2019 12:52:44 +0200
From: Vitaly Kuznetsov <vkuznets@...hat.com>
To: Thomas Huth <thuth@...hat.com>, Peter Xu <peterx@...hat.com>
Cc: Radim Krčmář <rkrcmar@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>,
linux-kselftest@...r.kernel.org, kvm@...r.kernel.org,
Shuah Khan <shuah@...nel.org>,
Andrew Jones <drjones@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] KVM: selftests: Compile code with warnings enabled
Thomas Huth <thuth@...hat.com> writes:
>
> x86_64/vmx_set_nested_state_test.c: In function
> ‘set_revision_id_for_vmcs12’:
> x86_64/vmx_set_nested_state_test.c:78:2: warning: dereferencing
> type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> *(u32 *)(state->data) = vmcs12_revision;
>
> ... how do we want to handle such spots in the kvm selftest code?
> Compile with -fno-strict-aliasing? Or fix it with type-punning through
> unions?
These are tests, let's keep code simple. Casting my vote for the former
option)
--
Vitaly
Powered by blists - more mailing lists