xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Chris Brand <chris.brand@broadcom.com>
To: xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@citrix.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH v3 2/2] xen: arm: Be explicit about bit values in mfn_to_xen_entry()
Date: Thu, 10 Sep 2015 11:56:29 -0700	[thread overview]
Message-ID: <1441911389-3626-3-git-send-email-chris.brand@broadcom.com> (raw)
In-Reply-To: <1441911389-3626-1-git-send-email-chris.brand@broadcom.com>

Ensure that every relevant bit is given an explicit value.
This has no effect on the generated code, but makes it
a little easier to follow.

Reported-by: Julien Grall <julien.grall@citrix.com>
Signed-off-by: Chris Brand <chris.brand@broadcom.com>
---
v3 trims down the list of bits given explicit values
v2 adds comments on pxn and avail

 xen/include/asm-arm/page.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index 01628f3e96cb..a94e978a9995 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -202,9 +202,12 @@ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
             .ai = attr,
             .ns = 1,              /* Hyp mode is in the non-secure world */
             .user = 1,            /* See below */
+            .ro = 0,              /* Assume read-write */
             .af = 1,              /* No need for access tracking */
             .ng = 1,              /* Makes TLB flushes easier */
+            .contig = 0,          /* Assume non-contiguous */
             .xn = 1,              /* No need to execute outside .text */
+            .avail = 0,           /* Reference count for domheap mapping */
         }};;
     /* Setting the User bit is strange, but the ATS1H[RW] instructions
      * don't seem to work otherwise, and since we never run on Xen
-- 
1.9.1

  parent reply	other threads:[~2015-09-10 18:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 18:56 [PATCH v3 0/2] xen: arm: Give PTE bits explict values Chris Brand
2015-09-10 18:56 ` [PATCH v3 1/2] xen: arm re-order assignments in mfn_to_xen_entry() Chris Brand
2015-09-10 18:56 ` Chris Brand [this message]
2015-09-11 14:10   ` [PATCH v3 2/2] xen: arm: Be explicit about bit values " Ian Campbell

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=1441911389-3626-3-git-send-email-chris.brand@broadcom.com \
    --to=chris.brand@broadcom.com \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --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).