From: Aravindh Puthiyaparambil <aravindh@virtuata.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xudong Hao <xudong.hao@intel.com>,
Eddie Dong <eddie.dong@intel.com>,
"xen-devel (xen-devel@lists.xen.org)" <xen-devel@lists.xen.org>,
"Keir Fraser(keir.xen@gmail.com)" <keir.xen@gmail.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Xiantao Zhang <xiantao.zhang@intel.com>
Subject: Re: [PATCH v3] Fix the mistake of exception execution
Date: Tue, 15 May 2012 00:22:34 -0700 [thread overview]
Message-ID: <CAB10MZC2o9T7q1CGodfi+k_PaXoDA0r_-t0MfiBbAs6GGbEB9A@mail.gmail.com> (raw)
In-Reply-To: <4FB218670200007800083A63@nat28.tlf.novell.com>
On Mon, May 14, 2012 at 11:48 PM, Jan Beulich <JBeulich@suse.com> wrote:
>
> >>> On 15.05.12 at 07:59, "Hao, Xudong" <xudong.hao@intel.com> wrote:
> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> >>> On 14.05.12 at 12:41, "Hao, Xudong" <xudong.hao@intel.com> wrote:
> >> > default:
> >> > - if ( trap > TRAP_last_reserved )
> >> > - {
> >> > - type = X86_EVENTTYPE_SW_EXCEPTION;
> >> > - __vmwrite(VM_ENTRY_INSTRUCTION_LEN, 2); /* int imm8 */
> >> > - }
> >>
> >> So this undoes Aravindh's earlier change, without replacement. I
> >> don't think that's acceptable.
> >>
> >
> > This is the first patch that just correct some instruction in hw exception
> > function, as function description above, int n (n > 32) is not delivered by
> > this function.
> > I'll write another patch of new function for int n handler.
>
> In that case it would have been nice to indicate that you don't expect
> this to be applied just yet (i.e. by marking the patch RFC).
>
> >> > + __vmwrite(VM_ENTRY_INSTRUCTION_LEN, 1); /* int3, CC */
> >>
> >> Still using a hard-coded 1 here, the more that afaict you can't
> >> distinguish CC and CD 03 here.
> >>
> >
> > Just copied it from original code, how about this replacement:
> >
> > + __vmwrite(VM_ENTRY_INSTRUCTION_LEN, __vmread(VM_EXIT_INSTRUCTION_LEN));
>
> That's okay as long as on all possible code paths arriving here
> VM_EXIT_INSTRUCTION_LEN is actually valid. I'm suspicious this might
> not be the case (especially in the case of injection originating from
> libxc).
Your suspicion is warranted. IIRC this did not work for the libxc case
injecting software interrupts. That is why I hard coded the
instruction length. Maybe the instruction length can be made caller
specific?
Thanks,
Aravindh
next prev parent reply other threads:[~2012-05-15 7:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 10:41 [PATCH v3] Fix the mistake of exception execution Hao, Xudong
2012-05-14 11:06 ` Jan Beulich
2012-05-15 5:59 ` Hao, Xudong
2012-05-15 6:48 ` Jan Beulich
2012-05-15 7:22 ` Aravindh Puthiyaparambil [this message]
2012-05-15 7:32 ` Jan Beulich
2012-05-15 8:14 ` Hao, Xudong
2012-05-15 8:19 ` 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=CAB10MZC2o9T7q1CGodfi+k_PaXoDA0r_-t0MfiBbAs6GGbEB9A@mail.gmail.com \
--to=aravindh@virtuata.com \
--cc=JBeulich@suse.com \
--cc=eddie.dong@intel.com \
--cc=jun.nakajima@intel.com \
--cc=keir.xen@gmail.com \
--cc=xen-devel@lists.xen.org \
--cc=xiantao.zhang@intel.com \
--cc=xudong.hao@intel.com \
/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).