[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] nvmx: fix handling of interrupts



> From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Sent: Monday, January 20, 2020 6:19 PM
> 
> On Sun, Jan 19, 2020 at 04:15:04AM +0000, Tian, Kevin wrote:
> > > From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> > > Sent: Wednesday, January 8, 2020 6:39 PM
> > >
> > > When doing a virtual vmexit (ie: a vmexit handled by the L1 VMM)
> > > interrupts shouldn't be injected using the virtual interrupt delivery
> > > mechanism, and instead should be signaled in the vmcs using the exit
> > > reason and the interruption-information field if the "Acknowledge
> > > interrupt on exit" vmexit control is set.
> > >
> > > Remove the nvmx_update_apicv helper: it's bogus to attempt to inject
> > > interrupts on virtual vmexit using the virtual interrupt delivery
> > > assistance, and it's also bogus to ack interrupts without checking if
> > > the vmexit "Acknowledge interrupt on exit" vmexit control is set.
> > > nvmx_intr_intercept already handles interrupts correctly on virtual
> > > vmexit.
> > >
> > > Note that this fixes the usage of x2APIC by the L1 VMM, at least when
> > > the L1 VMM is Xen.
> >
> > while this fix makes sense to me, can you also test other L1 VMMs,
> > so we don't overlook some other intentions covered or hidden by
> > removed logic?
> 
> I could test other hypervisors, but do we really expect anything
> that's not Xen on Xen to work?
> 
> I'm asking because that's the only combination that's actually tested
> by osstest.
> 
> Thanks, Roger.

If others are OK with your assumption, then it's fine. I didn't tightly 
follow the nested virtualization requirements in Xen.

On the other hand, I think this patch needs a revision. It is not bogus
to use virtual interrupt delivery on virtual VMexit, if "Ack interrupt
on exit" is off. In such case, the delivery doesn't happen until L1 
hypervisor enables interrupt to clear interrupt window. Then it does
save one exit. The only bogus point is that nvmx_udpate_apicv doesn't
check "Ack interrupt on exit". So I prefer to add such check there 
instead of completely removing this optimization.

Thanks
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.