From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 2/3] x86/mm: don't wrap x86_emulate_ctxt in ptwr_emulate_ctxt
Date: Wed, 30 Aug 2017 18:27:18 +0100 [thread overview]
Message-ID: <71e3e0ee-c0a8-2400-f0d0-b2ffc126cf9f@citrix.com> (raw)
In-Reply-To: <20170830171112.3634-3-wei.liu2@citrix.com>
On 30/08/17 18:11, Wei Liu wrote:
> diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
> index ed80df02fa..5b840cc603 100644
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -4956,9 +4956,9 @@ long arch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
> */
>
> struct ptwr_emulate_ctxt {
> - struct x86_emulate_ctxt ctxt;
> unsigned long cr2;
> l1_pgentry_t pte;
> + struct x86_emulate_ctxt *ctxt;
You can do away with this pointer entirely if you modify
ptwr_emulated_update() to take the full x86_emulate_ctxt. Locally, you
can just declare
struct ptwr_emulate_ctxt *ptwr_ctxt = ctxt->data;
Otherwise, LGTM.
~Andrew
> };
>
> static int ptwr_emulated_read(
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-30 17:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 17:11 [PATCH 0/3] x86/mm: merge ptwr and mmio_ro page fault handlers Wei Liu
2017-08-30 17:11 ` [PATCH 1/3] x86/mm: introduce trace point for mmio_ro emulation Wei Liu
2017-08-31 8:12 ` Jan Beulich
2017-08-30 17:11 ` [PATCH 2/3] x86/mm: don't wrap x86_emulate_ctxt in ptwr_emulate_ctxt Wei Liu
2017-08-30 17:27 ` Andrew Cooper [this message]
2017-08-30 17:11 ` [PATCH 3/3] x86/mm: merge ptwr and mmio_ro page fault handlers Wei Liu
2017-08-30 18:02 ` Andrew Cooper
2017-08-31 9:14 ` Wei Liu
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=71e3e0ee-c0a8-2400-f0d0-b2ffc126cf9f@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 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.