* [PATCH 1/2] xen: arm re-order assignments in mfn_to_xen_entry()
@ 2015-08-14 21:41 Chris (Christopher) Brand
2015-08-17 18:24 ` Julien Grall
0 siblings, 1 reply; 2+ messages in thread
From: Chris (Christopher) Brand @ 2015-08-14 21:41 UTC (permalink / raw)
To: xen-devel@lists.xen.org
Cc: Julien Grall (julien.grall@citrix.com),
stefano.stabellini@citrix.com,
Ian Campbell (ian.campbell@citrix.com)
Shuffle lines around so that the assignments in mfn_to_xen_entry()
occur in the same order as the bits are declared in lpae_pt_t.
This makes it easier to see which ones are never given a value.
No change in behaviour.
Also fix a minor comment typo.
Signed-off-by: Chris Brand <chris.brand@broadcom.com>
---
xen/include/asm-arm/page.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index 5ecfd0705e07..01628f3e96cb 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -197,18 +197,18 @@ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
paddr_t pa = ((paddr_t) mfn) << PAGE_SHIFT;
lpae_t e = (lpae_t) {
.pt = {
- .xn = 1, /* No need to execute outside .text */
- .ng = 1, /* Makes TLB flushes easier */
- .af = 1, /* No need for access tracking */
+ .valid = 1, /* Mappings are present */
+ .table = 0, /* Set to 1 for links and 4k maps */
+ .ai = attr,
.ns = 1, /* Hyp mode is in the non-secure world */
.user = 1, /* See below */
- .ai = attr,
- .table = 0, /* Set to 1 for links and 4k maps */
- .valid = 1, /* Mappings are present */
+ .af = 1, /* No need for access tracking */
+ .ng = 1, /* Makes TLB flushes easier */
+ .xn = 1, /* No need to execute outside .text */
}};;
/* Setting the User bit is strange, but the ATS1H[RW] instructions
* don't seem to work otherwise, and since we never run on Xen
- * pagetables un User mode it's OK. If this changes, remember
+ * pagetables in User mode it's OK. If this changes, remember
* to update the hard-coded values in head.S too */
switch ( attr )
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] xen: arm re-order assignments in mfn_to_xen_entry()
2015-08-14 21:41 [PATCH 1/2] xen: arm re-order assignments in mfn_to_xen_entry() Chris (Christopher) Brand
@ 2015-08-17 18:24 ` Julien Grall
0 siblings, 0 replies; 2+ messages in thread
From: Julien Grall @ 2015-08-17 18:24 UTC (permalink / raw)
To: Chris (Christopher) Brand, xen-devel@lists.xen.org
Cc: stefano.stabellini@citrix.com,
Ian Campbell (ian.campbell@citrix.com)
Hi Chris,
On 14/08/2015 14:41, Chris (Christopher) Brand wrote:
> Shuffle lines around so that the assignments in mfn_to_xen_entry()
> occur in the same order as the bits are declared in lpae_pt_t.
> This makes it easier to see which ones are never given a value.
> No change in behaviour.
>
> Also fix a minor comment typo.
>
> Signed-off-by: Chris Brand <chris.brand@broadcom.com>
Reviewed-by: Julien Grall <julien.grall@citrix.com>
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-17 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 21:41 [PATCH 1/2] xen: arm re-order assignments in mfn_to_xen_entry() Chris (Christopher) Brand
2015-08-17 18:24 ` Julien Grall
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).