]> git.proxmox.com Git - mirror_qemu.git/commit
KVM: x86: believe what KVM says about WAITPKG
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Jun 2020 13:49:27 +0000 (09:49 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 22:02:22 +0000 (18:02 -0400)
commite1e43813e7908b063938a3d01f172f88f6190c80
tree350d443879b5340499f424571123e65d0d1b25cd
parentc0c8445255b2b5b440c355431c8b01b7b7b7c8cf
KVM: x86: believe what KVM says about WAITPKG

Currently, QEMU is overriding KVM_GET_SUPPORTED_CPUID's answer for
the WAITPKG bit depending on the "-overcommit cpu-pm" setting.  This is a
bad idea because it does not even check if the host supports it, but it
can be done in x86_cpu_realizefn just like we do for the MONITOR bit.

This patch moves it there, while making it conditional on host
support for the related UMWAIT MSR.

Cc: qemu-stable@nongnu.org
Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c
target/i386/kvm.c
target/i386/kvm_i386.h