diff options
author | Peter Maydell | 2018-12-10 12:46:54 +0100 |
---|---|---|
committer | Eduardo Habkost | 2018-12-11 21:50:48 +0100 |
commit | 9115bb121323290a2fc3fc30fb35e0deee38d064 (patch) | |
tree | bb51ce8174771d8ecee48b18a0ca5c9734e3deaa /target/i386/cpu.c | |
parent | x86/cpu: Enable MOVDIR64B cpu feature (diff) | |
download | qemu-9115bb121323290a2fc3fc30fb35e0deee38d064.tar.gz qemu-9115bb121323290a2fc3fc30fb35e0deee38d064.tar.xz qemu-9115bb121323290a2fc3fc30fb35e0deee38d064.zip |
target/i386/kvm.c: Don't mark cpuid_data as QEMU_PACKED
clang complains about taking the address of a packed
member of a struct:
target/i386/kvm.c:1245:27: warning: taking address of packed member 'cpuid' of class or structure '' may result in an unaligned pointer value [-Waddress-of-packed-member]
c = cpuid_find_entry(&cpuid_data.cpuid, 1, 0);
^~~~~~~~~~~~~~~~
target/i386/kvm.c:1297:31: warning: taking address of packed member 'cpuid' of class or structure '' may result in an unaligned pointer value [-Waddress-of-packed-member]
c = cpuid_find_entry(&cpuid_data.cpuid, kvm_base, 0);
^~~~~~~~~~~~~~~~
The kernel's definitions of struct kvm_cpuid2 and struct
kvm_cpuid_entry2 are carefully set up with padding fields
so that there is no between-struct padding anyway, so
the QEMU_PACKED annotation is unnecessary and might result
in the compiler generating worse code. Drop it, and instead
assert at build time that there is no stray padding.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20181210114654.31433-1-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target/i386/cpu.c')
0 files changed, 0 insertions, 0 deletions