qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] KVM: x86: believe what KVM says about WAITPKG


From: Paolo Bonzini
Subject: Re: [PATCH] KVM: x86: believe what KVM says about WAITPKG
Date: Tue, 30 Jun 2020 18:28:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 30/06/20 18:07, Maxim Levitsky wrote:
> I think we need to keep some form of this hack, since the kernel doesn't 
> report CPUID_7_0_ECX_WAITPKG via
> KVM_GET_SUPPORTED_CPUID, so for this to work, we need to fix the kernel to 
> report it. 
> But to support older kernels that don't report this bit, we might still need 
> this.
> What do you think?
> 
> Note that kvm_arch_get_supported_cpuid also has a override for what KVM 
> reports about CPUID_EXT_MONITOR
> via KVM_GET_SUPPORTED_CPUID when cpu_pm=on and also does this without 
> checking any conditions,
> and it works because MWAIT is very old feature, and I guess it was the 
> inspiration for the above override
> that we are trying to remove.
> 
> Kernel sadly masks both MWAIT and WAITPKG in KVM_GET_SUPPORTED_CPUID currently
> (it is in kvm_set_cpu_caps)

Right.  We need to use host_cpuid instead of kvm_arch_get_supported_cpuid.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]