From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH 3/3] x86emul: consolidate CR4 handling
Date: Fri, 2 Nov 2018 18:24:27 +0000 [thread overview]
Message-ID: <a3c2177c-1847-3e86-d853-db098abd1a8a@citrix.com> (raw)
In-Reply-To: <5BDC7F4B02000078001F75D2@prv1-mh.provo.novell.com>
On 02/11/18 16:46, Jan Beulich wrote:
> Now that there's an almost unconditional CR4 read right at the beginning
> of x86_emulate(), centralize its reading there and use result and value
> everywhere else without further invoking the hook.
>
> Subsequently we may want to consider having the callers provide
> whichever value they deem appropriate in their contexts, to avoid
> invoking the hook altogether for this purpose.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
I've got most of a series doing this for cpuid, which drops ~4k of .text
volume from x86_emulate() alone.
My plan was to get all the architectural state in a directly readable
form, to reduce the complexity and boilerplate. On that subject...
> @@ -3247,6 +3245,8 @@ x86_emulate(
>
> ASSERT(ops->read);
>
> + cr4_rc = ops->read_cr ? ops->read_cr(4, &cr4, ctxt) : X86EMUL_OKAY;
... why not make read_cr() mandatory, or put cr4 into ctxt? Plumbing
cr4_rc around still feels like a lot of boilerplate.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-11-02 18:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 16:42 [PATCH 0/3] x86emul: VME/PVI mode fixes Jan Beulich
2018-11-02 16:45 ` [PATCH 1/3] x86emul: VME and PVI modes require a #GP(0) check first thing Jan Beulich
2018-11-02 18:04 ` Andrew Cooper
2018-11-02 16:45 ` [PATCH 2/3] x86emul: raise #GP(0) in VME mode for POPF with TF set in new value Jan Beulich
2018-11-02 18:14 ` Andrew Cooper
2018-11-05 9:47 ` Jan Beulich
2018-11-02 16:46 ` [PATCH 3/3] x86emul: consolidate CR4 handling Jan Beulich
2018-11-02 18:24 ` Andrew Cooper [this message]
2018-11-05 9:55 ` Jan Beulich
2018-11-06 13:33 ` [PATCH v2 0/3] x86emul: VME/PVI mode fixes Jan Beulich
2018-11-06 13:44 ` [PATCH v2 1/3] x86emul: skip VIF processing in VME mode for 16-bit POPF at IOPL 3 Jan Beulich
2018-12-03 19:23 ` Andrew Cooper
2018-11-06 13:45 ` [PATCH v2 2/3] x86emul: raise #GP(0) in VME mode for POPF with TF set in new value Jan Beulich
2018-12-03 19:24 ` Andrew Cooper
2018-11-06 13:45 ` [PATCH v2 3/3] x86emul: consolidate CR4 handling Jan Beulich
2018-12-03 19:37 ` Andrew Cooper
2018-12-04 9:54 ` Jan Beulich
2018-11-06 14:21 ` [PATCH v2 0/3] x86emul: VME/PVI mode fixes Andrew Cooper
2018-11-06 14:48 ` Jan Beulich
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=a3c2177c-1847-3e86-d853-db098abd1a8a@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--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 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).