From: Petre Ovidiu PIRCALABU <ppircalabu@bitdefender.com>
To: "JBeulich@suse.com" <JBeulich@suse.com>
Cc: "kevin.tian@intel.com" <kevin.tian@intel.com>,
"sstabellini@kernel.org" <sstabellini@kernel.org>,
"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
"rcojocaru@bitdefender.com" <rcojocaru@bitdefender.com>,
"George.Dunlap@eu.citrix.com" <George.Dunlap@eu.citrix.com>,
"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
"ian.jackson@eu.citrix.com" <ian.jackson@eu.citrix.com>,
"tim@xen.org" <tim@xen.org>,
"paul.durrant@citrix.com" <paul.durrant@citrix.com>,
"tamas@tklengyel.com" <tamas@tklengyel.com>,
"jun.nakajima@intel.com" <jun.nakajima@intel.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v10 2/3] x86emul: New return code for unimplemented instruction
Date: Mon, 11 Sep 2017 15:52:04 +0000 [thread overview]
Message-ID: <1505145124.8747.44.camel@bitdefender.com> (raw)
In-Reply-To: <59B17D090200007800178796@prv-mh.provo.novell.com>
On Jo, 2017-09-07 at 09:08 -0600, Jan Beulich wrote:
> >
> > >
> > > >
> > > > On 07.09.17 at 16:26, <JBeulich@suse.com> wrote:
> > After discussing with Andrew I'm willing to agree with the changes
> > you do here, with one extra requirement: At least on non-debug
> > builds X86EMUL_UNIMPLEMENTED should always result in #UD being
> > raised by the final consumer of it. It should never, like would be
> > the case with the changes you do to vmx/realmode.c, result in
> > the domain being crashed. Please change that one and check
> > carefully whether there are any other similar cases.
Hi Jan,
Changing the way we handle X86EMUL_UNIMPLEMENTED in some of the
functions will modify the existing behavior, and I'm a little bit wary
of making so many changes unrelated to the current patchset'a purpose
without a thourough way of testing them.
e.g.: "hvm_descriptor_access_intercept".
The current behavior is to return false if X86EMUL_UNHANDLEABLE is
returned by hvm_emulate_one. Up until now, this return code covered
also the "unimplemented instruction" case.
If X86EMUL_UNIMPLEMENTED will be handled separately (e.g. by calling
hvm_inject_hw_exception(TRAP_invalid_op, X86_EVENT_NO_EC),
hvm_emulate_writeback, and finally returning true) some of the
scenarios where the domain got crashed will result only in an UD being
injected.
The same reasoning applies also to vmx/realmode. My patch didn't change
the current behavior, the domain crash logic was added by patch
3502a233e0132cb2facfe90c5c4872c823a5cb69.
However, in the end the decision if yours to take. I can add those
changes, but I will require a little help in order to make sure I don't
break anything.
Many thanks,
Petre
> Oh, and please make the comment next to the definition of
> X86EMUL_UNIMPLEMENTED also say so.
>
> Jan
>
>
> ________________________
> This email was scanned by Bitdefender
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-11 15:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 13:48 [PATCH v10 0/3] Notify monitor when emulating an unimplemented instruction Petre Pircalabu
2017-09-06 13:48 ` [PATCH v10 1/3] gitignore: add local vimrc files Petre Pircalabu
2017-09-07 14:59 ` Wei Liu
2017-09-07 15:36 ` Petre Ovidiu PIRCALABU
2017-09-07 15:41 ` Wei Liu
2017-09-07 16:12 ` Ian Jackson
2017-09-07 17:15 ` Petre Ovidiu PIRCALABU
2017-09-06 13:48 ` [PATCH v10 2/3] x86emul: New return code for unimplemented instruction Petre Pircalabu
2017-09-07 14:26 ` Jan Beulich
2017-09-07 15:08 ` Jan Beulich
2017-09-11 15:52 ` Petre Ovidiu PIRCALABU [this message]
2017-09-12 9:35 ` Jan Beulich
2017-09-07 14:36 ` Andrew Cooper
2017-09-06 13:48 ` [PATCH v10 3/3] x86/monitor: Notify monitor if an emulation fails Petre Pircalabu
2017-09-06 15:12 ` [PATCH v10 0/3] Notify monitor when emulating an unimplemented instruction Tamas K Lengyel
2017-09-06 15:48 ` Petre Ovidiu PIRCALABU
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=1505145124.8747.44.camel@bitdefender.com \
--to=ppircalabu@bitdefender.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=paul.durrant@citrix.com \
--cc=rcojocaru@bitdefender.com \
--cc=sstabellini@kernel.org \
--cc=tamas@tklengyel.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.