[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YIcYCAANV6o3EI1n@google.com>
Date: Mon, 26 Apr 2021 19:44:08 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Reiji Watanabe <reijiw@...gle.com>
Subject: Re: [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.
Powered by blists - more mailing lists