Re: [PATCH v3 09/15] KVM: nSVM: Use KVM-governed feature framework to track "TSC scaling enabled"
From: Yuan Yao
Date: Wed Aug 16 2023 - 19:04:34 EST
On Wed, Aug 16, 2023 at 06:44:42AM -0700, Sean Christopherson wrote:
> On Wed, Aug 16, 2023, Yuan Yao wrote:
> > On Tue, Aug 15, 2023 at 01:36:47PM -0700, Sean Christopherson wrote:
> > > @@ -2981,7 +2982,8 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
> > >
> > > svm->tsc_ratio_msr = data;
> > >
> > > - if (svm->tsc_scaling_enabled && is_guest_mode(vcpu))
> > > + if (guest_can_use(vcpu, X86_FEATURE_TSCRATEMSR) &&
> > > + is_guest_mode(vcpu))
> >
> > I prefer (is_guest_mode(vcpu) && ....), so I can skip them more quickly LOL.
> > but anyway depends on you :-)
>
> For this series, I want to do as much of a straight replacement as possible, i.e.
> not change any ordering unless it's "necessary".
Yeah, I'm fine with this.