lkml.org 
[lkml]   [2021]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/4] KVM: SVM: Clear MSR_TSC_AUX[63:32] on write
On Mon, Apr 26, 2021, Sean Christopherson wrote:
> On Mon, Apr 26, 2021, Vitaly Kuznetsov wrote:
> > Actually, shouldn't we just move wrmsrl() here? Assuming we're not sure
> > how (and if) upper 32 bits are going to be used, it would probably make
> > sense to not write them to the actual MSR...
>
> Argh. I got too clever in trying to minimize the patch deltas and "broke" this
> intermediate patch. Once the user return framework is used, the result of
> setting the MSR is checked before setting svm->tsc_aux, i.e. don't set the
> virtual state if the real state could not be set.
>
> I'm very tempted to add yet another patch to this mess to do:
>
> if (wrmsrl_safe(MSR_TSC_AUX, data))
> return 1;
>
> svm->tsc_aux = data;
>
> And then this patch becomes:
>
> data = (u32)data;
>
> if (wrmsrl_safe(MSR_TSC_AUX, data))
> return 1;
>
> svm->tsc_aux = data;
>
> The above will also make patch 3 cleaner as it will preserve the ordering of
> truncating data and the wrmsr.

Ah, never mind, Paolo already pushed this to kvm/next with your above fix.

\
 
 \ /
  Last update: 2021-04-26 21:46    [W:0.057 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site