From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>,
Aravindh Puthiyaparambil <aravindh@virtuata.com>
Cc: Eddie Dong <eddie.dong@intel.com>,
"Nakajima, Jun" <jun.nakajima@intel.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] vmx: Allow software (user defined) interrupts to be injected in to the guest
Date: Fri, 20 Apr 2012 11:12:47 +0100 [thread overview]
Message-ID: <CBB6F52F.3E87B%keir@xen.org> (raw)
In-Reply-To: <4F914060020000780007EC9D@nat28.tlf.novell.com>
On 20/04/2012 09:54, "Jan Beulich" <JBeulich@suse.com> 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
next prev parent reply other threads:[~2012-04-20 10:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 5:04 [PATCH] vmx: Allow software (user defined) interrupts to be injected in to the guest Aravindh Puthiyaparambil
2012-04-20 8:54 ` Jan Beulich
2012-04-20 10:12 ` Keir Fraser [this message]
2012-05-02 8:53 ` Dong, Eddie
2012-05-02 9:23 ` Jan Beulich
2012-05-03 0:25 ` Dong, Eddie
2012-05-03 1:55 ` Aravindh Puthiyaparambil
2012-05-03 5:02 ` Dong, Eddie
2012-05-03 9:26 ` Jan Beulich
2012-05-03 13:42 ` Dong, Eddie
2012-05-03 14:17 ` Jan Beulich
2012-05-03 14:35 ` Keir Fraser
2012-05-03 18:15 ` Aravindh Puthiyaparambil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CBB6F52F.3E87B%keir@xen.org \
--to=keir@xen.org \
--cc=JBeulich@suse.com \
--cc=aravindh@virtuata.com \
--cc=eddie.dong@intel.com \
--cc=jun.nakajima@intel.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).