lkml.org 
[lkml]   [2020]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/10] KVM: nVMX: Move reflection check into nested_vmx_reflect_vmexit()
On Mon, Mar 16, 2020 at 10:33:27PM -0700, Sean Christopherson wrote:
> On Fri, Mar 13, 2020 at 01:12:33PM +0100, Vitaly Kuznetsov wrote:
> > Sean Christopherson <sean.j.christopherson@intel.com> writes:
> >
> > > -static inline int nested_vmx_reflect_vmexit(struct kvm_vcpu *vcpu,
> > > - u32 exit_reason)
> > > +static inline bool nested_vmx_reflect_vmexit(struct kvm_vcpu *vcpu,
> > > + u32 exit_reason)
> > > {
> > > - u32 exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
> > > + u32 exit_intr_info;
> > > +
> > > + if (!nested_vmx_exit_reflected(vcpu, exit_reason))
> > > + return false;
> >
> > (unrelated to your patch)
> >
> > It's probably just me but 'nested_vmx_exit_reflected()' name always
> > makes me thinkg 'the vmexit WAS [already] reflected' and not 'the vmexit
> > NEEDS to be reflected'. 'nested_vmx_exit_needs_reflecting()' maybe?
>
> Not just you. It'd be nice if the name some how reflected (ha) that the
> logic is mostly based on whether or not L1 expects the exit, with a few
> exceptions. E.g. something like
>
> if (!l1_expects_vmexit(...) && !is_system_vmexit(...))
> return false;

Doh, the system VM-Exit logic is backwards, it should be

if (!l1_expects_vmexit(...) || is_system_vmexit(...))
return false;
>
> The downside of that is the logic is split, which is probably a net loss?

\
 
 \ /
  Last update: 2020-03-17 17:17    [W:1.495 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site