From: Ian Campbell <ian.campbell@citrix.com>
To: Chris Brand <chris.brand@broadcom.com>, xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@citrix.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>
Subject: Re: [PATCH 2/2 v2] xen: arm: Set all bits in mfn_to_xen_entry()
Date: Tue, 1 Sep 2015 16:50:48 +0100 [thread overview]
Message-ID: <1441122648.26292.71.camel@citrix.com> (raw)
In-Reply-To: <1440113595-6961-3-git-send-email-chris.brand@broadcom.com>
On Thu, 2015-08-20 at 16:33 -0700, Chris Brand wrote:
> Ensure that every bit has a specific value.
>
> Reported-by: Julien Grall <julien.grall@citrix.com>
> Signed-off-by: Chris Brand <chris.brand@broadcom.com>
> ---
> v2 adds comments on pxn and avail.
>
> xen/include/asm-arm/page.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
> index 01628f3e96cb..4f430a5ff4fa 100644
> --- a/xen/include/asm-arm/page.h
> +++ b/xen/include/asm-arm/page.h
> @@ -202,9 +202,14 @@ 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 */
OK
> .af = 1, /* No need for access tracking */
> .ng = 1, /* Makes TLB flushes easier */
> + .sbz = 0,
I think this one can/should be omitted, it's basically a padding field and
it will be zero by C specs.
> + .contig = 0, /* Assume non-contiguous */
OK
> + .pxn = 0, /* Reserved for PL2 stage 1 page table */
Do you mean "Reserved in ..." or maybe "Reserved at ..."?
"Reserved for ..." doesn't make much sense since this function is
constructing a PL2 stage 1 PT and this bit is not reserved for (i.e. "set
aside for") use there.
I think in this context pxn is essentially a padding bit and should be just
omitted as with .sbz.
> .xn = 1, /* No need to execute outside .text */
> + .avail = 0, /* Reference count for domheap mapping
OK
> */
> }};;
> /* Setting the User bit is strange, but the ATS1H[RW] instructions
> * don't seem to work otherwise, and since we never run on Xen
prev parent reply other threads:[~2015-09-01 15:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 23:33 [PATCH 0/2 v2] xen: arm: Ensure all PTE bits have a known value Chris Brand
2015-08-20 23:33 ` [PATCH 1/2 v2] xen: arm re-order assignments in mfn_to_xen_entry() Chris Brand
2015-09-01 15:51 ` Ian Campbell
2015-08-20 23:33 ` [PATCH 2/2 v2] xen: arm: Set all bits " Chris Brand
2015-08-21 13:39 ` Andrew Cooper
2015-08-21 19:47 ` Chris (Christopher) Brand
2015-08-21 23:45 ` Julien Grall
2015-09-01 15:50 ` Ian Campbell [this message]
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=1441122648.26292.71.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=chris.brand@broadcom.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 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.