]> git.ipfire.org Git - thirdparty/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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 25 Aug 2020 19:29:24 +0000 (14:29 -0500)
commit458ae56d22a78d84135fd5dfe8e837be83d74ce9
tree919d59472d8f11762006716906174e3042944c44
parent521898ac31a76c930bf8f213d8cdb0233da7a9ff
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>
(cherry picked from commit e1e43813e7908b063938a3d01f172f88f6190c80)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target/i386/cpu.c
target/i386/kvm.c
target/i386/kvm_i386.h