Re: [PULL 31/53] KVM: x86: believe what KVM says about WAITPKG

2021-12-22 Thread Chenyi Qiang
On 7/7/2020 12:41 AM, Paolo Bonzini wrote: 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

Re: [PULL 31/53] KVM: x86: believe what KVM says about WAITPKG

2020-07-07 Thread Paolo Bonzini
On 07/07/20 13:42, Maxim Levitsky wrote: >> +bool kvm_has_waitpkg(void) >> +{ >> +return has_msr_umwait; > Note that this depends on the fix in the kernel > to report this msr only when UMWAIT is supported. > I personally don't mind that. > > If we want to support older kernels that don't, > t

Re: [PULL 31/53] KVM: x86: believe what KVM says about WAITPKG

2020-07-07 Thread Maxim Levitsky
On Mon, 2020-07-06 at 12:41 -0400, Paolo Bonzini wrote: > 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

[PULL 31/53] KVM: x86: believe what KVM says about WAITPKG

2020-07-06 Thread Paolo Bonzini
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 move