[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] x86/xen: Return error for xc_hvm_inject_trap() with pending events
On 11/08/2016 03:10 PM, Jan Beulich wrote: >>>> On 08.11.16 at 13:16, <rcojocaru@xxxxxxxxxxxxxxx> wrote: >> xc_hvm_inject_trap() sets v->arch.hvm_vcpu.inject_trap.vector, >> which is then checked in hvm_do_resume(), and if != -1, a trap >> is injected, regardless of whether vmx_idtv_reinject() has written >> VM_ENTRY_INTR_INFO directly. If that's the case, the toolstack >> injected interrupt will overwrite the reinjected one, which will >> get lost forever. This patch returns -EBUSY not only if >> v->arch.hvm_vcpu.inject_trap.vector != -1, but also if >> hvm_event_pending(v). > > Considering the earlier discussion I don't understand why this was > put together and submitted: It is my understanding that it won't > cover all possible cases of actual injection not succeeding, and I > can't see what good a partial solution will do for you or anyone > else. Well, the previous discussion also moved quite a bit through proposed solutions, and this is the smallest patch that helps. We're always injecting traps when the VCPU is paused (i.e. when handling a sync vm_event), and at that time I believe that xc_hvm_inject_trap() succeeding with this patch would guarantee that the interrupt can be delivered, and it failing immediately will notify us that injection is not currently possible. So for the flow which prompted the discussion, this is a solution. Also, the patch is RFC - I thought seeing a concrete patch would help, rather than going on with more abstract concerns. I'll go back to the vm_event patch then. Thanks, Razvan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |