From: Benjamin Sanda <ben.sanda@dornerworks.com> To: xen-devel@lists.xenproject.org Cc: Keir Fraser <keir@xen.org>, bensanda <ben.sanda@dornerworks.com>, Tim Deegan <tim@xen.org>, Dario Faggioli <dario.faggioli@citrix.com>, Ian Jackson <ian.jackson@eu.citrix.com>, George Dunlap <george.dunlap@citrix.com>, Jan Beulich <jbeulich@suse.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Paul Sujkov <psujkov@gmail.com> Subject: [PATCH 3/6] xentrace: P2M lookup suport for ARM platform Date: Wed, 16 Mar 2016 13:51:36 -0700 [thread overview] Message-ID: <1458161499-15313-4-git-send-email-ben.sanda@dornerworks.com> (raw) In-Reply-To: <1458161499-15313-1-git-send-email-ben.sanda@dornerworks.com> From: bensanda <ben.sanda@dornerworks.com> Modified p2m_lookup() to provide support for xentrace on the ARM platform. Added check for DOMID_XEN which skips PFN to MFN translation. xentrace sends a MFN dirrectly when requesting DOMID_XEN, so no translation is needed. Also sets page memory type, p2m_type_t, to p2m_ram_rw to provide correct access. Signed-off-by: Benjamin Sanda <ben.sanda@dornerworks.com> --- xen/arch/arm/p2m.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index a2a9c4b..2e7da43 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -228,10 +228,21 @@ paddr_t p2m_lookup(struct domain *d, paddr_t paddr, p2m_type_t *t) paddr_t ret; struct p2m_domain *p2m = &d->arch.p2m; - spin_lock(&p2m->lock); - ret = __p2m_lookup(d, paddr, t); - spin_unlock(&p2m->lock); - + /* Check for DOMID_XEN: If we are called with DOMID_XEN (from xentrace) + then paddr is already a MFN and no translation is needed. We only set the + page type as p2m_raw_rw and return the MFN directly */ + if(DOMID_XEN != d->domain_id) + { + spin_lock(&p2m->lock); + ret = __p2m_lookup(d, paddr, t); + spin_unlock(&p2m->lock); + } + else + { + *t = p2m_ram_rw; + ret = paddr; + } + return ret; } -- 2.7.2 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-16 20:52 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-03-16 20:51 [PATCH 0/6] xentrace/xenalyze support on ARM Benjamin Sanda 2016-03-16 20:51 ` [PATCH 1/6] Flask: Support for ARM xentrace Benjamin Sanda 2016-03-17 14:56 ` Julien Grall 2016-03-17 15:03 ` Julien Grall 2016-03-25 19:27 ` Konrad Rzeszutek Wilk 2016-03-28 15:52 ` Ben Sanda 2016-03-16 20:51 ` [PATCH 2/6] xenalyze: Support for ARM platform Benjamin Sanda 2016-03-16 20:59 ` Andrew Cooper 2016-03-17 10:39 ` George Dunlap 2016-03-16 20:51 ` Benjamin Sanda [this message] 2016-03-17 16:21 ` [PATCH 3/6] xentrace: P2M lookup suport " Julien Grall 2016-03-28 18:55 ` Ben Sanda 2016-03-30 18:38 ` Julien Grall 2016-03-16 20:51 ` [PATCH 4/6] xentrace: ARM platform DOMID_XEN mapping support Benjamin Sanda 2016-03-17 15:53 ` Julien Grall 2016-03-16 20:51 ` [PATCH 5/6] xentrace: Trace buffer support for ARM platform Benjamin Sanda 2016-03-16 20:51 ` [PATCH 6/6] xentrace: ARM platform timestamp support Benjamin Sanda 2016-03-25 19:31 ` Konrad Rzeszutek Wilk 2016-03-31 16:38 ` Stefano Stabellini 2016-03-31 16:44 ` Ben Sanda 2016-04-01 13:05 ` Stefano Stabellini 2016-03-17 15:00 ` [PATCH 0/6] xentrace/xenalyze support on ARM Julien Grall 2016-03-17 16:50 ` Ben Sanda 2016-03-17 17:01 ` Julien Grall 2016-03-17 17:04 ` Ben Sanda 2016-03-18 17:12 ` Wei Liu 2016-03-17 17:23 ` George Dunlap
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=1458161499-15313-4-git-send-email-ben.sanda@dornerworks.com \ --to=ben.sanda@dornerworks.com \ --cc=andrew.cooper3@citrix.com \ --cc=dario.faggioli@citrix.com \ --cc=george.dunlap@citrix.com \ --cc=ian.jackson@eu.citrix.com \ --cc=jbeulich@suse.com \ --cc=keir@xen.org \ --cc=psujkov@gmail.com \ --cc=tim@xen.org \ --cc=xen-devel@lists.xenproject.org \ --subject='Re: [PATCH 3/6] xentrace: P2M lookup suport for ARM platform' \ /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
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).