From: "Jan Beulich" <JBeulich@suse.com>
To: Tamas K Lengyel <tklengyel@sec.in.tum.de>
Cc: keir@xen.org, stefano.stabellini@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH for-4.5 v9 04/19] xen: Relocate p2m_mem_access_resume to mem_access common
Date: Wed, 24 Sep 2014 13:19:43 +0100 [thread overview]
Message-ID: <5422D2FF020000780003837C@mail.emea.novell.com> (raw)
In-Reply-To: <1411549793-12589-4-git-send-email-tklengyel@sec.in.tum.de>
>>> On 24.09.14 at 11:09, <tklengyel@sec.in.tum.de> wrote:
> Relocate p2m_mem_access_resume to common and abstract the new
> p2m_mem_event_emulate_check into the p2m layer to.
>
> Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
> ---
> v9: Pass the vcpu instead of the domain to emulate_check.
Is it correct that you resent just patches 4 and 6 as v9?
> --- a/xen/arch/x86/mm/p2m.c
> +++ b/xen/arch/x86/mm/p2m.c
> @@ -1382,6 +1382,60 @@ static void p2m_mem_event_fill_regs(mem_event_request_t *req)
> req->x86_regs.cs_arbytes = seg.attr.bytes;
> }
>
> +void p2m_mem_event_emulate_check(struct vcpu *v, const mem_event_response_t *rsp)
> +{
> + /* Mark vcpu for skipping one instruction upon rescheduling. */
> + if ( rsp->flags & MEM_EVENT_FLAG_EMULATE )
> + {
> + struct domain *d = v->domain;
> + xenmem_access_t access;
> + bool_t violation = 1;
> +
> + if ( p2m_get_mem_access(d, rsp->gfn, &access) == 0 )
While it's certainly not wrong, I personally dislike such single use
local variables - you could easily (and without hampering readability)
pass v->domain here.
Jan
next prev parent reply other threads:[~2014-09-24 12:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 9:09 [PATCH for-4.5 v9 04/19] xen: Relocate p2m_mem_access_resume to mem_access common Tamas K Lengyel
2014-09-24 9:09 ` [PATCH for-4.5 v9 06/19] xen: Relocate mem_event_op domctl and access_op memop into common Tamas K Lengyel
2014-09-24 12:22 ` Jan Beulich
2014-09-24 13:07 ` Tamas K Lengyel
2014-09-24 12:19 ` Jan Beulich [this message]
2014-09-24 13:05 ` [PATCH for-4.5 v9 04/19] xen: Relocate p2m_mem_access_resume to mem_access common Tamas K Lengyel
2014-09-24 13:33 ` Jan Beulich
2014-09-24 13:42 ` Jan Beulich
2014-09-24 14:47 ` Tamas K Lengyel
2014-09-24 14:52 ` Jan Beulich
2014-09-24 14:54 ` Tamas K Lengyel
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=5422D2FF020000780003837C@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=stefano.stabellini@citrix.com \
--cc=tklengyel@sec.in.tum.de \
--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).