[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <408c7b65-11a5-29af-9b9f-ca8ccfcc0126@amd.com>
Date: Tue, 22 Sep 2020 14:11:36 -0500
From: Babu Moger <babu.moger@....com>
To: Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>
Cc: "vkuznets@...hat.com" <vkuznets@...hat.com>,
"jmattson@...gle.com" <jmattson@...gle.com>,
"wanpengli@...cent.com" <wanpengli@...cent.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"joro@...tes.org" <joro@...tes.org>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
"tglx@...utronix.de" <tglx@...utronix.de>
Subject: RE: [PATCH v6 04/12] KVM: SVM: Modify intercept_exceptions to generic
intercepts
> -----Original Message-----
> From: Paolo Bonzini <pbonzini@...hat.com>
> Sent: Tuesday, September 22, 2020 8:39 AM
> To: Sean Christopherson <sean.j.christopherson@...el.com>
> Cc: Moger, Babu <Babu.Moger@....com>; vkuznets@...hat.com;
> jmattson@...gle.com; wanpengli@...cent.com; kvm@...r.kernel.org;
> joro@...tes.org; x86@...nel.org; linux-kernel@...r.kernel.org;
> mingo@...hat.com; bp@...en8.de; hpa@...or.com; tglx@...utronix.de
> Subject: Re: [PATCH v6 04/12] KVM: SVM: Modify intercept_exceptions to
> generic intercepts
>
> On 14/09/20 17:06, Sean Christopherson wrote:
> >> I think these should take a vector instead, and add 64 in the functions.
> >
> > And "s/int bit/u32 vector" + BUILD_BUG_ON(vector > 32)?
>
> Not sure if we can assume it to be constant, but WARN_ON_ONCE is good
> enough as far as performance is concerned. The same int->u32 +
> WARN_ON_ONCE should be done in patch 1.
Paolo, Ok sure. Will change "int bit" to "u32 vector". I will send a new
patch to address this. This needs to be addressed in all these functions,
vmcb_set_intercept, vmcb_clr_intercept, vmcb_is_intercept,
set_exception_intercept, clr_exception_intercept, svm_set_intercept,
svm_clr_intercept, svm_is_intercept.
Also will add WARN_ON_ONCE(vector > 32); on set_exception_intercept,
clr_exception_intercept. Does that sound good?
>
> Thanks for the review!
>
> Paolo
Powered by blists - more mailing lists