lkml.org 
[lkml]   [2023]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] KVM: SVM: Fix TSC_AUX virtualization setup
From
On 9/14/23 15:48, Tom Lendacky wrote:
> On 9/14/23 15:28, Sean Christopherson wrote:
>> On Thu, Sep 14, 2023, Tom Lendacky wrote:

>
>>
>>> +        if (guest_cpuid_has(vcpu, X86_FEATURE_RDTSCP))
>>> +            svm_clr_intercept(svm, INTERCEPT_RDTSCP);
>>
>> Same thing here.
>
> Will do.

For RDTSCP, svm_recalc_instruction_intercepts() will set/clear the RDTSCP
intercept as part of the svm_vcpu_set_after_cpuid() path, but it will only
do it based on kvm_cpu_cap_has(X86_FEATURE_RDTSCP) being true, which is
very likely.

Do you think that is good enough and we can drop the setting and clearing
of the RDTSCP intercept in the sev_es_vcpu_set_after_cpuid() function and
only deal with the TSC_AUX MSR intercept?

On a side note, it looks like RDTSCP would not be intercepted if the KVM
cap X86_FEATURE_RDTSCP feature is cleared, however unlikely, in
kvm_set_cpu_caps() and RDTSCP is not advertised to the guest (assuming the
guest is ignoring the RDTSCP CPUID bit).

Thanks,
Tom

>
> Thanks,
> Tom
>
>>
>>> +    }
>>> +}

\
 
 \ /
  Last update: 2023-09-15 18:54    [W:0.202 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site