All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: julien.grall@citrix.com, stefano.stabellini@eu.citrix.com,
	tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH v3 04/15] xen: arm: support building a 64-bit dom0 domain
Date: Fri, 19 Jul 2013 08:59:25 -0400	[thread overview]
Message-ID: <20130719125925.GA3987@localhost.localdomain> (raw)
In-Reply-To: <1374234284-6304-4-git-send-email-ian.campbell@citrix.com>

On Fri, Jul 19, 2013 at 12:44:33PM +0100, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> ---
> v3: rebased. as part of this move PSR_GUEST_INIT out of the public interface
> ---
>  xen/arch/arm/domain_build.c     |   10 +++++++---
>  xen/include/asm-arm/processor.h |    2 ++
>  xen/include/public/arch-arm.h   |    2 --
>  3 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 5e486c4..7f3035c 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -593,9 +593,7 @@ int construct_dom0(struct domain *d)
>  
>      memset(regs, 0, sizeof(*regs));
>  
> -    regs->pc = (uint32_t)kinfo.entry;
> -
> -    regs->cpsr = PSR_GUEST_INIT;
> +    regs->pc = (register_t)kinfo.entry;
>  
>  #ifdef CONFIG_ARM_64
>      d->arch.type = kinfo.type;
> @@ -603,6 +601,11 @@ int construct_dom0(struct domain *d)
>  
>      if ( is_pv32_domain(d) )
>      {
> +        regs->cpsr = PSR_GUEST_INIT|PSR_MODE_SVC;
> +
> +        /* Pretend to be a Cortex A15 */

Um, should there by a TODO for that?

> +        d->arch.vpidr = 0x410fc0f0;
> +
>          /* FROM LINUX head.S
>           *
>           * Kernel startup entry point.
> @@ -621,6 +624,7 @@ int construct_dom0(struct domain *d)
>  #ifdef CONFIG_ARM_64
>      else
>      {
> +        regs->cpsr = PSR_GUEST_INIT|PSR_MODE_EL1h;
>          /* From linux/Documentation/arm64/booting.txt */
>          regs->x0 = kinfo.dtb_paddr;
>          regs->x1 = 0; /* Reserved for future use */
> diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
> index 263bd03..8b9b320 100644
> --- a/xen/include/asm-arm/processor.h
> +++ b/xen/include/asm-arm/processor.h
> @@ -37,6 +37,8 @@
>  #define SCTLR_BASE        0x00c50078
>  #define HSCTLR_BASE       0x30c51878
>  
> +#define PSR_GUEST_INIT  (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK)
> +
>  /* HCR Hyp Configuration Register */
>  #define HCR_TGE         (1<<27)
>  #define HCR_TVM         (1<<26)
> diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
> index 8aa62d3..cea12b2 100644
> --- a/xen/include/public/arch-arm.h
> +++ b/xen/include/public/arch-arm.h
> @@ -237,8 +237,6 @@ typedef uint64_t xen_callback_t;
>  #define PSR_IT_MASK     (0x0600fc00)  /* Thumb If-Then Mask */
>  #define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
>  
> -#define PSR_GUEST_INIT  (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
> -
>  #endif /*  __XEN_PUBLIC_ARCH_ARM_H__ */
>  
>  /*
> -- 
> 1.7.2.5
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2013-07-19 12:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19 11:44 [PATCH v3 00/15] xen: arm: 64-bit dom0 kernel support Ian Campbell
2013-07-19 11:44 ` [PATCH v3 01/15] xen: arm: tweak arm64 stack frame layout Ian Campbell
2013-07-19 11:44 ` [PATCH v3 02/15] xen: arm: rename 32-bit specific zImage field offset constants Ian Campbell
2013-07-19 11:44 ` [PATCH v3 03/15] xen: arm: support for loading 64-bit zImage dom0 Ian Campbell
2013-07-19 13:30   ` Julien Grall
2013-07-19 13:39     ` Ian Campbell
2013-07-19 11:44 ` [PATCH v3 04/15] xen: arm: support building a 64-bit dom0 domain Ian Campbell
2013-07-19 12:59   ` Konrad Rzeszutek Wilk [this message]
2013-07-19 13:42     ` Ian Campbell
2013-07-19 11:44 ` [PATCH v3 05/15] xen: arm: precalculate VTTBR_EL2 for a domain when setting up its p2m Ian Campbell
2013-07-19 11:44 ` [PATCH v3 06/15] xen: arm: improve register dump output for 64-bit guest (and more generally too) Ian Campbell
2013-07-19 11:44 ` [PATCH v3 07/15] xen: arm: support dumping 64-bit guest stack Ian Campbell
2013-07-19 11:44 ` [PATCH v3 08/15] xen: arm: show less words in a line of a stack trace in 64-bit builds Ian Campbell
2013-07-19 11:44 ` [PATCH v3 09/15] xen: arm: Set EL1 register width in HCR_EL2 during context switch Ian Campbell
2013-07-22 10:44   ` Stefano Stabellini
2013-07-19 11:44 ` [PATCH v3 10/15] xen: arm: handle traps from 64-bit guests Ian Campbell
2013-07-24 11:30   ` Stefano Stabellini
2013-07-24 17:50     ` Ian Campbell
2013-07-19 11:44 ` [PATCH v3 11/15] xen: arm: handle hypercalls " Ian Campbell
2013-07-19 11:44 ` [PATCH v3 12/15] xen: arm: handle 64-bit system register access traps Ian Campbell
2013-07-19 11:44 ` [PATCH v3 13/15] xen: arm: align some comments Ian Campbell
2013-07-19 11:44 ` [PATCH v3 14/15] xen: arm: document HCR bits Ian Campbell
2013-07-19 13:35   ` Julien Grall
2013-07-19 11:44 ` [PATCH v3 15/15] xen: arm: Handle SMC from 64-bit guests Ian Campbell
2013-07-22 21:33 ` [PATCH v3 00/15] xen: arm: 64-bit dom0 kernel support 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=20130719125925.GA3987@localhost.localdomain \
    --to=konrad.wilk@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@citrix.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 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.