[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
- To: Jan Beulich <JBeulich@xxxxxxxx>, Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx>
- From: Keir Fraser <keir@xxxxxxx>
- Date: Fri, 20 Apr 2012 11:12:47 +0100
- Cc: Eddie Dong <eddie.dong@xxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
- Delivery-date: Fri, 20 Apr 2012 10:13:19 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=UZB8s1NZc8GuTRNrZeC+QPXLrEJp9FNdsn0c6/60krQ=; b=ehlt10GOBQmAqQjUslTwRw7FukJysu8PFZHrg+8RDWgPQOT5OIN1KCM+O+feoqc3KK gxIOyRbV/KQbj/KBScgVXfLmck/Npj1PyqwfPaUt/5LxzW1QjcBBMLh574/aBboQvEXq ehcD/uNfqx2j8aMsXZ0Uys0SStdRaI2MVJDlHNSTuN8fXNcD0mPeD71e2+HZf0XoaBw9 SrbpvmmmjB5IRVwwu01cD6lO5NgK/X7cdLpl8hfGS/f9mircvqWbONu4c27B7rtS+6jJ 1HGoaWNGU92DyxftQmVPZmiTsrG8Uzj6EnXsq6YMh5l6kxmACCXYIv7LUM8qf3kGEzlj PFiQ==
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
- Thread-index: Ac0e3iJCGYVPVPTt70yQgyMCiaf+zQ==
- Thread-topic: [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
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel