xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: tim@xen.org, Pranavkumar Sawargaonkar <psawargaonkar@apm.com>,
	Anup Patel <anup.patel@linaro.org>,
	stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH 6/6] xen: arm: Ensure HCR_EL2.RW is set correctly when building dom0
Date: Wed, 23 Oct 2013 11:39:05 +0100	[thread overview]
Message-ID: <5267A749.1090809@linaro.org> (raw)
In-Reply-To: <1381416225-31043-6-git-send-email-ian.campbell@citrix.com>



On 10/10/2013 03:43 PM, Ian Campbell wrote:
> copy_to_user and friends rely on this, since the address transalation
> functions (guest VA -> MFN) will truncate VA to the appropriate size.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>

> ---
>   xen/arch/arm/domain_build.c |   10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index fb1fa56..e3ea3f0 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -875,6 +875,13 @@ int construct_dom0(struct domain *d)
>
>       /* The following loads use the domain's p2m */
>       p2m_load_VTTBR(d);
> +#ifdef CONFIG_ARM_64
> +    d->arch.type = kinfo.type;
> +    if ( is_pv32_domain(d) )
> +        WRITE_SYSREG(READ_SYSREG(HCR_EL2) & ~HCR_RW, HCR_EL2);
> +    else
> +        WRITE_SYSREG(READ_SYSREG(HCR_EL2) | HCR_RW, HCR_EL2);
> +#endif
>
>       kernel_load(&kinfo);
>       dtb_load(&kinfo);
> @@ -888,9 +895,6 @@ int construct_dom0(struct domain *d)
>
>       regs->pc = (register_t)kinfo.entry;
>
> -#ifdef CONFIG_ARM_64
> -    d->arch.type = kinfo.type;
> -#endif
>
>       if ( is_pv32_domain(d) )
>       {
>

-- 
Julien Grall

  reply	other threads:[~2013-10-23 10:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 14:43 [PATCH v2 0/6] xen: arm: fixups for systems with RAM above 4GB Ian Campbell
2013-10-10 14:43 ` [PATCH 1/6] xen: correct xenheap_bits after "xen: support RAM at addresses 0 and 4096" Ian Campbell
2013-10-10 15:14   ` Keir Fraser
2013-10-10 14:43 ` [PATCH 2/6] xen: arm: Enable 40 bit addressing in VTCR for arm64 Ian Campbell
2013-10-21 15:56   ` Julien Grall
2013-10-10 14:43 ` [PATCH 3/6] xen: arm: map entire memory banks on arm64 Ian Campbell
2013-10-23 13:54   ` Julien Grall
2013-10-10 14:43 ` [PATCH 4/6] xen: arm: make sure pagetable mask macros have appropriate size Ian Campbell
2013-10-21 15:53   ` Julien Grall
2013-10-10 14:43 ` [PATCH 5/6] xen: arm: correctly round down MFN to 1GB boundary make sure pagetable mask macros as physaddr size Ian Campbell
2013-10-23 13:52   ` Julien Grall
2013-10-10 14:43 ` [PATCH 6/6] xen: arm: Ensure HCR_EL2.RW is set correctly when building dom0 Ian Campbell
2013-10-23 10:39   ` Julien Grall [this message]
2013-10-23 10:41   ` Julien Grall
2013-10-21  9:35 ` [PATCH v2 0/6] xen: arm: fixups for systems with RAM above 4GB Ian Campbell
2013-10-23 13:55   ` Julien Grall
2013-10-24 14:07     ` 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=5267A749.1090809@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=anup.patel@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=psawargaonkar@apm.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --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).