On 10/11/2019 3:41 PM, Xu, Tao3 wrote:
[...]
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 11b9c854b5..a465c893b5 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -401,6 +401,12 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, 
uint32_t function,
          if (host_tsx_blacklisted()) {
              ret &= ~(CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_HLE);
          }
+    } else if (function == 7 && index == 0 && reg == R_ECX) {
+        if (enable_cpu_pm) {
+            ret |= CPUID_7_0_ECX_WAITPKG;
+        } else {
+            ret &= ~CPUID_7_0_ECX_WAITPKG;
+        }

Hi Paolo,

I am sorry because I realize in KVM side, I keep cpuid mask WAITPKG as 0:

F(CLDEMOTE) | F(MOVDIRI) | F(MOVDIR64B) | 0 /*WAITPKG*/;

Therefore in QEMU side, we need to add CPUID_7_0_ECX_WAITPKG when enable_cpu_pm is on. Otherwise, QEMU can't get this CPUID.

Could you review this part again? Thank you very much!

Tao

Reply via email to