linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers
@ 2021-03-16 13:43 Vladimir Murzin
  2021-03-16 13:52 ` Marc Zyngier
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Vladimir Murzin @ 2021-03-16 13:43 UTC (permalink / raw)
  To: linux-arm-kernel, stable; +Cc: catalin.marinas, will, maz, dbrazdil

Commit 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
reorganized el2 setup in such way that virtual cpu id registers set
only in nVHE, yet they used (and need) to be set irrespective VHE
support.

Fixes: 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
Changelog

  v1 -> v2
     - Drop the reference to 32bit guests from commit message (per Marc)

There is no upstream fix since issue went away due to code there has
been reworked in 5.12: nVHE comes first, so virtual cpu id register
are always set.

Maintainers, please, Ack.

 arch/arm64/include/asm/el2_setup.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h
index f988e94cdf9e..db87daca6b8c 100644
--- a/arch/arm64/include/asm/el2_setup.h
+++ b/arch/arm64/include/asm/el2_setup.h
@@ -113,7 +113,7 @@
 .endm
 
 /* Virtual CPU ID registers */
-.macro __init_el2_nvhe_idregs
+.macro __init_el2_idregs
 	mrs	x0, midr_el1
 	mrs	x1, mpidr_el1
 	msr	vpidr_el2, x0
@@ -165,6 +165,7 @@
 	__init_el2_stage2
 	__init_el2_gicv3
 	__init_el2_hstr
+	__init_el2_idregs
 
 	/*
 	 * When VHE is not in use, early init of EL2 needs to be done here.
@@ -173,7 +174,6 @@
 	 * will be done via the _EL1 system register aliases in __cpu_setup.
 	 */
 .ifeqs "\mode", "nvhe"
-	__init_el2_nvhe_idregs
 	__init_el2_nvhe_cptr
 	__init_el2_nvhe_sve
 	__init_el2_nvhe_prepare_eret
-- 
2.24.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers
  2021-03-16 13:43 [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers Vladimir Murzin
@ 2021-03-16 13:52 ` Marc Zyngier
  2021-03-17 13:26 ` Will Deacon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-03-16 13:52 UTC (permalink / raw)
  To: Vladimir Murzin; +Cc: linux-arm-kernel, stable, catalin.marinas, will, dbrazdil

On Tue, 16 Mar 2021 13:43:19 +0000,
Vladimir Murzin <vladimir.murzin@arm.com> wrote:
> 
> Commit 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
> reorganized el2 setup in such way that virtual cpu id registers set
> only in nVHE, yet they used (and need) to be set irrespective VHE
> support.
> 
> Fixes: 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>

Reviewed-by: Marc Zyngier <maz@kernel.org>

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers
  2021-03-16 13:43 [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers Vladimir Murzin
  2021-03-16 13:52 ` Marc Zyngier
@ 2021-03-17 13:26 ` Will Deacon
  2021-03-18 12:57   ` Sasha Levin
  2021-03-19  9:45 ` Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 5.11-stable tree gregkh
  2021-03-19  9:52 ` Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 4.14-stable tree gregkh
  3 siblings, 1 reply; 8+ messages in thread
From: Will Deacon @ 2021-03-17 13:26 UTC (permalink / raw)
  To: Vladimir Murzin; +Cc: linux-arm-kernel, stable, catalin.marinas, maz, dbrazdil

On Tue, Mar 16, 2021 at 01:43:19PM +0000, Vladimir Murzin wrote:
> Commit 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
> reorganized el2 setup in such way that virtual cpu id registers set
> only in nVHE, yet they used (and need) to be set irrespective VHE
> support.
> 
> Fixes: 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> ---
> Changelog
> 
>   v1 -> v2
>      - Drop the reference to 32bit guests from commit message (per Marc)
> 
> There is no upstream fix since issue went away due to code there has
> been reworked in 5.12: nVHE comes first, so virtual cpu id register
> are always set.
> 
> Maintainers, please, Ack.
> 
>  arch/arm64/include/asm/el2_setup.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Will Deacon <will@kernel.org>

It's a bit weird to have a patch in stable that isn't upstream, but I don't
see a better option here.

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers
  2021-03-17 13:26 ` Will Deacon
@ 2021-03-18 12:57   ` Sasha Levin
  2021-03-19  9:45     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Sasha Levin @ 2021-03-18 12:57 UTC (permalink / raw)
  To: Will Deacon
  Cc: Vladimir Murzin, linux-arm-kernel, stable, catalin.marinas, maz,
	dbrazdil

On Wed, Mar 17, 2021 at 01:26:15PM +0000, Will Deacon wrote:
>On Tue, Mar 16, 2021 at 01:43:19PM +0000, Vladimir Murzin wrote:
>> Commit 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
>> reorganized el2 setup in such way that virtual cpu id registers set
>> only in nVHE, yet they used (and need) to be set irrespective VHE
>> support.
>>
>> Fixes: 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
>> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
>> ---
>> Changelog
>>
>>   v1 -> v2
>>      - Drop the reference to 32bit guests from commit message (per Marc)
>>
>> There is no upstream fix since issue went away due to code there has
>> been reworked in 5.12: nVHE comes first, so virtual cpu id register
>> are always set.
>>
>> Maintainers, please, Ack.
>>
>>  arch/arm64/include/asm/el2_setup.h | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
>Acked-by: Will Deacon <will@kernel.org>
>
>It's a bit weird to have a patch in stable that isn't upstream, but I don't
>see a better option here.

Yes, I'd agree here - the commits that would need to be backported look
way too invasive.

I've queued it up, thanks.

-- 
Thanks,
Sasha

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers
  2021-03-18 12:57   ` Sasha Levin
@ 2021-03-19  9:45     ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2021-03-19  9:45 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Will Deacon, Vladimir Murzin, linux-arm-kernel, stable,
	catalin.marinas, maz, dbrazdil

On Thu, Mar 18, 2021 at 08:57:00AM -0400, Sasha Levin wrote:
> On Wed, Mar 17, 2021 at 01:26:15PM +0000, Will Deacon wrote:
> > On Tue, Mar 16, 2021 at 01:43:19PM +0000, Vladimir Murzin wrote:
> > > Commit 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
> > > reorganized el2 setup in such way that virtual cpu id registers set
> > > only in nVHE, yet they used (and need) to be set irrespective VHE
> > > support.
> > > 
> > > Fixes: 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
> > > Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> > > ---
> > > Changelog
> > > 
> > >   v1 -> v2
> > >      - Drop the reference to 32bit guests from commit message (per Marc)
> > > 
> > > There is no upstream fix since issue went away due to code there has
> > > been reworked in 5.12: nVHE comes first, so virtual cpu id register
> > > are always set.
> > > 
> > > Maintainers, please, Ack.
> > > 
> > >  arch/arm64/include/asm/el2_setup.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > Acked-by: Will Deacon <will@kernel.org>
> > 
> > It's a bit weird to have a patch in stable that isn't upstream, but I don't
> > see a better option here.
> 
> Yes, I'd agree here - the commits that would need to be backported look
> way too invasive.
> 
> I've queued it up, thanks.

I don't see it, so I've added it as well...

thanks,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 5.11-stable tree
  2021-03-16 13:43 [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers Vladimir Murzin
  2021-03-16 13:52 ` Marc Zyngier
  2021-03-17 13:26 ` Will Deacon
@ 2021-03-19  9:45 ` gregkh
  2021-03-19  9:52 ` Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 4.14-stable tree gregkh
  3 siblings, 0 replies; 8+ messages in thread
From: gregkh @ 2021-03-19  9:45 UTC (permalink / raw)
  To: catalin.marinas, dbrazdil, gregkh, linux-arm-kernel, maz,
	vladimir.murzin, will
  Cc: stable-commits


This is a note to let you know that I've just added the patch titled

    arm64: Unconditionally set virtual cpu id registers

to the 5.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm64-unconditionally-set-virtual-cpu-id-registers.patch
and it can be found in the queue-5.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From vladimir.murzin@arm.com  Fri Mar 19 10:43:20 2021
From: Vladimir Murzin <vladimir.murzin@arm.com>
Date: Tue, 16 Mar 2021 13:43:19 +0000
Subject: arm64: Unconditionally set virtual cpu id registers
To: linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org
Cc: catalin.marinas@arm.com, will@kernel.org, maz@kernel.org, dbrazdil@google.com
Message-ID: <20210316134319.89472-1-vladimir.murzin@arm.com>

From: Vladimir Murzin <vladimir.murzin@arm.com>

Commit 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
reorganized el2 setup in such way that virtual cpu id registers set
only in nVHE, yet they used (and need) to be set irrespective VHE
support.

Fixes: 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/include/asm/el2_setup.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/arm64/include/asm/el2_setup.h
+++ b/arch/arm64/include/asm/el2_setup.h
@@ -111,7 +111,7 @@
 .endm
 
 /* Virtual CPU ID registers */
-.macro __init_el2_nvhe_idregs
+.macro __init_el2_idregs
 	mrs	x0, midr_el1
 	mrs	x1, mpidr_el1
 	msr	vpidr_el2, x0
@@ -163,6 +163,7 @@
 	__init_el2_stage2
 	__init_el2_gicv3
 	__init_el2_hstr
+	__init_el2_idregs
 
 	/*
 	 * When VHE is not in use, early init of EL2 needs to be done here.
@@ -171,7 +172,6 @@
 	 * will be done via the _EL1 system register aliases in __cpu_setup.
 	 */
 .ifeqs "\mode", "nvhe"
-	__init_el2_nvhe_idregs
 	__init_el2_nvhe_cptr
 	__init_el2_nvhe_sve
 	__init_el2_nvhe_prepare_eret


Patches currently in stable-queue which might be from vladimir.murzin@arm.com are

queue-5.11/arm64-unconditionally-set-virtual-cpu-id-registers.patch

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 4.14-stable tree
  2021-03-16 13:43 [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers Vladimir Murzin
                   ` (2 preceding siblings ...)
  2021-03-19  9:45 ` Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 5.11-stable tree gregkh
@ 2021-03-19  9:52 ` gregkh
  2021-03-19  9:58   ` Greg KH
  3 siblings, 1 reply; 8+ messages in thread
From: gregkh @ 2021-03-19  9:52 UTC (permalink / raw)
  To: catalin.marinas, dbrazdil, linux-arm-kernel, maz, vladimir.murzin, will
  Cc: stable-commits


This is a note to let you know that I've just added the patch titled

    arm64: Unconditionally set virtual cpu id registers

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm64-unconditionally-set-virtual-cpu-id-registers.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From vladimir.murzin@arm.com  Fri Mar 19 10:43:20 2021
From: Vladimir Murzin <vladimir.murzin@arm.com>
Date: Tue, 16 Mar 2021 13:43:19 +0000
Subject: arm64: Unconditionally set virtual cpu id registers
To: linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org
Cc: catalin.marinas@arm.com, will@kernel.org, maz@kernel.org, dbrazdil@google.com
Message-ID: <20210316134319.89472-1-vladimir.murzin@arm.com>

From: Vladimir Murzin <vladimir.murzin@arm.com>

Commit 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
reorganized el2 setup in such way that virtual cpu id registers set
only in nVHE, yet they used (and need) to be set irrespective VHE
support.

Fixes: 78869f0f0552 ("arm64: Extract parts of el2_setup into a macro")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
---
Changelog

  v1 -> v2
     - Drop the reference to 32bit guests from commit message (per Marc)

There is no upstream fix since issue went away due to code there has
been reworked in 5.12: nVHE comes first, so virtual cpu id register
are always set.

Maintainers, please, Ack.

 arch/arm64/include/asm/el2_setup.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h
index f988e94cdf9e..db87daca6b8c 100644
--- a/arch/arm64/include/asm/el2_setup.h
+++ b/arch/arm64/include/asm/el2_setup.h
@@ -113,7 +113,7 @@
 .endm
 
 /* Virtual CPU ID registers */
-.macro __init_el2_nvhe_idregs
+.macro __init_el2_idregs
 	mrs	x0, midr_el1
 	mrs	x1, mpidr_el1
 	msr	vpidr_el2, x0
@@ -165,6 +165,7 @@
 	__init_el2_stage2
 	__init_el2_gicv3
 	__init_el2_hstr
+	__init_el2_idregs
 
 	/*
 	 * When VHE is not in use, early init of EL2 needs to be done here.
@@ -173,7 +174,6 @@
 	 * will be done via the _EL1 system register aliases in __cpu_setup.
 	 */
 .ifeqs "\mode", "nvhe"
-	__init_el2_nvhe_idregs
 	__init_el2_nvhe_cptr
 	__init_el2_nvhe_sve
 	__init_el2_nvhe_prepare_eret
-- 
2.24.0



Patches currently in stable-queue which might be from vladimir.murzin@arm.com are

queue-4.14/arm64-unconditionally-set-virtual-cpu-id-registers.patch

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 4.14-stable tree
  2021-03-19  9:52 ` Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 4.14-stable tree gregkh
@ 2021-03-19  9:58   ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2021-03-19  9:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: catalin.marinas, dbrazdil, linux-arm-kernel, maz,
	vladimir.murzin, will, stable-commits

On Fri, Mar 19, 2021 at 10:52:29AM +0100, gregkh@linuxfoundation.org wrote:
> 
> This is a note to let you know that I've just added the patch titled
> 
>     arm64: Unconditionally set virtual cpu id registers
> 
> to the 4.14-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

OOps, no, wrong branch, my fault.

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-19 10:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 13:43 [PATCH v2][for-stable-v5.11] arm64: Unconditionally set virtual cpu id registers Vladimir Murzin
2021-03-16 13:52 ` Marc Zyngier
2021-03-17 13:26 ` Will Deacon
2021-03-18 12:57   ` Sasha Levin
2021-03-19  9:45     ` Greg KH
2021-03-19  9:45 ` Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 5.11-stable tree gregkh
2021-03-19  9:52 ` Patch "arm64: Unconditionally set virtual cpu id registers" has been added to the 4.14-stable tree gregkh
2021-03-19  9:58   ` Greg KH

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).