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

Re: [Xen-devel] [PATCH] vmx: Allow software (user defined) interrupts to be injected in to the guest

On 20/04/2012 09:54, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> I doubt this is generally correct, in particular for the use you appear
> to desire: When the injection is not the result of an INT nn
> instruction (which I would guess to be the case when coming from
> libxc), you shouldn't set a non-zero instruction length. I believe this
> is also wrong for the INT3 code above.
> Additionally the problem should not be limited to injection coming
> from libxc - injection originating from x86_emulate() should be
> affected as much.
> Jun, Eddie - I further wonder why #OF is not being handled according
> to the documentation here either (should also result in
> X86_EVENTTYPE_SW_EXCEPTION). And the fall-through from
> TRAP_debug to TRAP_int3 is suspicious too (at the very minimum it
> should be annotated with a comment saying why fall-through is
> intended here). Nor does the documentation state that TRAP_debug
> should ever result in X86_EVENTTYPE_SW_EXCEPTION.
> Finally, the whole injection logic (including the patch here) doesn't
> appear to cope with INT nn being used by a guest with nn < 32, nor
> with any (pointless) prefixes used on INT3 or INT nn.

Agreed, I applied the patch because at least it doesn't mess with any
existing logic for vectors < 32, but really this function is now an
overloaded mess. vmx_inject_hw_exception() should deal *only* with hw
exceptions, and a more general function should be provided for the more
general callers. Or something. It needs a bit of thought and is certainly
not 4.2 material now.

 -- Keir

Xen-devel mailing list



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