* [PATCH] target/i386: Change unavail from u32 to u64
@ 2024-07-30 8:29 Xiong Zhang
2024-07-30 14:56 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Xiong Zhang @ 2024-07-30 8:29 UTC (permalink / raw)
To: pbonzini; +Cc: qemu-devel, kvm, Xiong Zhang
The feature word 'r' is a u64, and "unavail" is a u32, the operation
'r &= ~unavail' clears the high 32 bits of 'r'. This causes many vmx cases
in kvm-unit-tests to fail. Changing 'unavail' from u32 to u64 fixes this
issue.
Bugzilla: https://gitlab.com/qemu-project/qemu/-/issues/2442
Fixes: 0b2757412cb1 ("target/i386: drop AMD machine check bits from Intel CPUID")
Signed-off-by: Xiong Zhang <xiong.y.zhang@linux.intel.com>
---
target/i386/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 4688d140c2..ef06da54c6 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6039,7 +6039,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w)
{
FeatureWordInfo *wi = &feature_word_info[w];
uint64_t r = 0;
- uint32_t unavail = 0;
+ uint64_t unavail = 0;
if (kvm_enabled()) {
switch (wi->type) {
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] target/i386: Change unavail from u32 to u64
2024-07-30 8:29 [PATCH] target/i386: Change unavail from u32 to u64 Xiong Zhang
@ 2024-07-30 14:56 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2024-07-30 14:56 UTC (permalink / raw)
To: Xiong Zhang; +Cc: pbonzini, qemu-devel, kvm
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-30 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30 8:29 [PATCH] target/i386: Change unavail from u32 to u64 Xiong Zhang
2024-07-30 14:56 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).