All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
	Dave Martin <dave.martin@linaro.org>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH v2 2/7] ARM: virt: allow the kernel to be entered in HYP mode
Date: Sat, 6 Oct 2012 07:44:36 -0700	[thread overview]
Message-ID: <20121006144435.GZ3874@atomide.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1210060955230.16518@xanadu.home>

* Nicolas Pitre <nicolas.pitre@linaro.org> [121006 07:07]:
> On Sat, 6 Oct 2012, Marc Zyngier wrote:
> > 
> > If so, that indicates some side effect of the safe_svcmode_maskall macro,
> > and I suspect the "movs pc, lr" bit.
> 
> That would be surprizing if the "movs pc, lr" was to blame.  This should 
> work on all architectures.
> 
> However the A bit might be to blame.
> 
> > Can you try the attached patch? It basically falls back to the previous
> > behaviour if not entered in HYP mode.
> 
> This is likely to work of course.  However I think we should try to 
> pinpoint the exact problem i.e. whether it is the A bit or the "movs pc, 
> lr" which makes a difference (it is unlikely to be both).
> 
> So I was about to suggest to test this patch as well:

No luck with this patch alone.

Regards,

Tony
 
> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
> index 683a1e6b60..118e22ee46 100644
> --- a/arch/arm/include/asm/assembler.h
> +++ b/arch/arm/include/asm/assembler.h
> @@ -254,8 +254,7 @@
>  	mov	lr , \reg
>  	and	lr , lr , #MODE_MASK
>  	cmp	lr , #HYP_MODE
> -	orr	\reg , \reg , #PSR_A_BIT | PSR_I_BIT | PSR_F_BIT
> -	bic	\reg , \reg , #MODE_MASK
> +	mov	\reg , #PSR_I_BIT | PSR_F_BIT
>  	orr	\reg , \reg , #SVC_MODE
>  THUMB(	orr	\reg , \reg , #PSR_T_BIT	)
>  	msr	spsr_cxsf, \reg
> 
> 
> Nicolas

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/7] ARM: virt: allow the kernel to be entered in HYP mode
Date: Sat, 6 Oct 2012 07:44:36 -0700	[thread overview]
Message-ID: <20121006144435.GZ3874@atomide.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1210060955230.16518@xanadu.home>

* Nicolas Pitre <nicolas.pitre@linaro.org> [121006 07:07]:
> On Sat, 6 Oct 2012, Marc Zyngier wrote:
> > 
> > If so, that indicates some side effect of the safe_svcmode_maskall macro,
> > and I suspect the "movs pc, lr" bit.
> 
> That would be surprizing if the "movs pc, lr" was to blame.  This should 
> work on all architectures.
> 
> However the A bit might be to blame.
> 
> > Can you try the attached patch? It basically falls back to the previous
> > behaviour if not entered in HYP mode.
> 
> This is likely to work of course.  However I think we should try to 
> pinpoint the exact problem i.e. whether it is the A bit or the "movs pc, 
> lr" which makes a difference (it is unlikely to be both).
> 
> So I was about to suggest to test this patch as well:

No luck with this patch alone.

Regards,

Tony
 
> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
> index 683a1e6b60..118e22ee46 100644
> --- a/arch/arm/include/asm/assembler.h
> +++ b/arch/arm/include/asm/assembler.h
> @@ -254,8 +254,7 @@
>  	mov	lr , \reg
>  	and	lr , lr , #MODE_MASK
>  	cmp	lr , #HYP_MODE
> -	orr	\reg , \reg , #PSR_A_BIT | PSR_I_BIT | PSR_F_BIT
> -	bic	\reg , \reg , #MODE_MASK
> +	mov	\reg , #PSR_I_BIT | PSR_F_BIT
>  	orr	\reg , \reg , #SVC_MODE
>  THUMB(	orr	\reg , \reg , #PSR_T_BIT	)
>  	msr	spsr_cxsf, \reg
> 
> 
> Nicolas

  reply	other threads:[~2012-10-06 14:44 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07 16:55 [PATCH v2 0/7] Allow the kernel to be booted in HYP mode Marc Zyngier
2012-09-07 16:55 ` [PATCH v2 1/7] ARM: opcodes: add __ERET/__MSR_ELR_HYP instruction encoding Marc Zyngier
2012-09-07 16:55 ` [PATCH v2 2/7] ARM: virt: allow the kernel to be entered in HYP mode Marc Zyngier
2012-10-05 20:08   ` Tony Lindgren
2012-10-05 20:08     ` Tony Lindgren
2012-10-05 23:09     ` Russell King - ARM Linux
2012-10-05 23:09       ` Russell King - ARM Linux
2012-10-05 23:23       ` Tony Lindgren
2012-10-05 23:23         ` Tony Lindgren
2012-10-05 23:50         ` Tony Lindgren
2012-10-05 23:50           ` Tony Lindgren
2012-10-06  1:32           ` Nicolas Pitre
2012-10-06  1:32             ` Nicolas Pitre
2012-10-06  3:06             ` Tony Lindgren
2012-10-06  3:06               ` Tony Lindgren
2012-10-06 10:18     ` Marc Zyngier
2012-10-06 10:18       ` Marc Zyngier
2012-10-06 14:06       ` Nicolas Pitre
2012-10-06 14:06         ` Nicolas Pitre
2012-10-06 14:44         ` Tony Lindgren [this message]
2012-10-06 14:44           ` Tony Lindgren
2012-10-06 14:47         ` Marc Zyngier
2012-10-06 14:47           ` Marc Zyngier
2012-10-06 14:42       ` Tony Lindgren
2012-10-06 14:42         ` Tony Lindgren
2012-10-06 15:32         ` Nicolas Pitre
2012-10-06 15:32           ` Nicolas Pitre
2012-10-06 15:40           ` Tony Lindgren
2012-10-06 15:40             ` Tony Lindgren
2012-10-06 16:06             ` Marc Zyngier
2012-10-06 16:06               ` Marc Zyngier
2012-10-06 15:42           ` Russell King - ARM Linux
2012-10-06 15:42             ` Russell King - ARM Linux
2012-10-06 16:00       ` Tony Lindgren
2012-10-06 16:00         ` Tony Lindgren
2012-10-08 11:01         ` Dave Martin
2012-10-08 11:01           ` Dave Martin
2012-10-08 11:33           ` Marc Zyngier
2012-10-08 11:33             ` Marc Zyngier
2012-10-08 20:36             ` Tony Lindgren
2012-10-08 20:36               ` Tony Lindgren
2012-10-08 11:33           ` Dave Martin
2012-10-08 11:33             ` Dave Martin
2012-09-07 16:55 ` [PATCH v2 3/7] ARM: zImage/virt: hyp mode entry support for the zImage loader Marc Zyngier
2012-09-07 16:55 ` [PATCH v2 4/7] ARM: virt: Update documentation for hyp mode entry support Marc Zyngier
2012-09-07 16:55 ` [PATCH v2 5/7] ARM: virt: Add boot-time diagnostics Marc Zyngier
2012-09-07 16:55 ` [PATCH v2 6/7] ARM: virt: Add CONFIG_ARM_VIRT_EXT option Marc Zyngier
2012-09-07 16:55 ` [PATCH v2 7/7] ARM: virt: arch_timers: enable access to physical timers Marc Zyngier

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=20121006144435.GZ3874@atomide.com \
    --to=tony@atomide.com \
    --cc=dave.martin@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=marc.zyngier@arm.com \
    --cc=nicolas.pitre@linaro.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.