[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a5d0ccd-f6a7-2afe-2480-991ff7e079b4@redhat.com>
Date: Thu, 22 Oct 2020 16:44:52 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Xiaoyao Li <xiaoyao.li@...el.com>,
Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: Sean Christopherson <sean.j.christopherson@...el.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>
Subject: Re: [PATCH] KVM: X86: Expose KVM_HINTS_REALTIME in
KVM_GET_SUPPORTED_CPUID
On 22/10/20 16:28, Xiaoyao Li wrote:
> On 10/22/2020 10:06 PM, Paolo Bonzini wrote:
>> On 22/10/20 15:31, Xiaoyao Li wrote:
>>>>
>>>> It's common for userspace to copy all supported CPUID bits to
>>>> KVM_SET_CPUID2, I don't think this is the right behavior for
>>>> KVM_HINTS_REALTIME.
>>>
>>> It reminds of X86_FEATURE_WAITPKG, which is added to supported CPUID
>>> recently as a fix but QEMU exposes it to guest only when "-overcommit
>>> cpu-pm"
>>
>> WAITPKG is not included in KVM_GET_SUPPORTED_CPUID either. QEMU detects
>> it through the MSR_IA32_UMWAIT register.
>
> Doesn't 0abcc8f65cc2 ("KVM: VMX: enable X86_FEATURE_WAITPKG in KVM
> capabilities") add WAITPKG to KVM_GET_SUPPORTED_CPUID?
You're right, I shouldn't have checked only cpuid.c. :)
Still I think WAITPKG is different, because it's only for userspace and
it's always possible for userspace to do "for(;;)" and burn CPU.
KVM_HINTS_REALTIME is more similar to MONITOR, which is not set.
Paolo
Powered by blists - more mailing lists