Skip to contentSkip to conversation

linux-next: manual merge of the kvm-arm tree with the arm64 tree

PATCH Stephen Rothwell 2 participants 4 messages Feb 6, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the kvm-arm tree got a conflict in:

arch/arm64/kernel/hyp-stub.S

between commit:

f122576f3533 ("arm64/sme: Enable host kernel to access ZT0")

from the arm64 tree and commit:

e2d4f5ae1771 ("KVM: arm64: Introduce finalise_el2_state macro")

from the kvm-arm tree.

I fixed it up (the code modified by the former was moved by the latter, so I applied the following merge fix patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

I hope I got this right :-)

From: Stephen Rothwell <[email protected]>
Date: Mon, 6 Feb 2023 12:40:16 +1100
Subject: [PATCH] fix up for "KVM: arm64: Introduce finalise_el2_state macro"

interacting with "arm64/sme: Enable host kernel to access ZT0"

---
 arch/arm64/include/asm/el2_setup.h | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/include/asm/el2_setup.h +6 -0
index 0bd6ed77e4a5..5f821e5c52a9 100644
@@ -269,6 +269,12 @@
 	orr	x0, x0, SMCR_ELx_FA64_MASK
 .Lskip_sme_fa64_\@:
 
+	// ZT0 available?
+	__check_override id_aa64smfr0 ID_AA64SMFR0_EL1_SMEver_SHIFT 4 .Linit_sme_zt0_\@ .Lskip_sme_zt0_\@
+.Linit_sme_zt0_\@:
+	orr	x0, x0, SMCR_ELx_EZT0_MASK
+.Lskip_sme_zt0_\@:
+
 	orr	x0, x0, #SMCR_ELx_LEN_MASK	// Enable full SME vector
 	msr_s	SYS_SMCR_EL2, x0		// length for EL1.
 
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 43 lines · On Mon, 6 Feb 2023 12:44:51 +1100 Stephen Rothwell <[email protected]> wrote:

Today's linux-next merge of the kvm-arm tree got a conflict in:

arch/arm64/kernel/hyp-stub.S

between commit:

f122576f3533 ("arm64/sme: Enable host kernel to access ZT0")

from the arm64 tree and commit:

e2d4f5ae1771 ("KVM: arm64: Introduce finalise_el2_state macro")

from the kvm-arm tree.

I fixed it up (the code modified by the former was moved by the latter, so I applied the following merge fix patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

I hope I got this right :-)

From: Stephen Rothwell <[email protected]>
Date: Mon, 6 Feb 2023 12:40:16 +1100
Subject: [PATCH] fix up for "KVM: arm64: Introduce finalise_el2_state macro"

interacting with "arm64/sme: Enable host kernel to access ZT0"

---
 arch/arm64/include/asm/el2_setup.h | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/include/asm/el2_setup.h +0 -0
index 0bd6ed77e4a5..5f821e5c52a9 100644
@@ -269,6 +269,12 @@
 	orr	x0, x0, SMCR_ELx_FA64_MASK
 .Lskip_sme_fa64_\@:

arch/arm64/include/asm/el2_setup.h line 280

Quoted 10 lines
arch/arm64/include/asm/el2_setup.h +6 -0
 
+	// ZT0 available?
+	__check_override id_aa64smfr0 ID_AA64SMFR0_EL1_SMEver_SHIFT 4 .Linit_sme_zt0_\@ .Lskip_sme_zt0_\@
+.Linit_sme_zt0_\@:
+	orr	x0, x0, SMCR_ELx_EZT0_MASK
+.Lskip_sme_zt0_\@:
+
 	orr	x0, x0, #SMCR_ELx_LEN_MASK	// Enable full SME vector
 	msr_s	SYS_SMCR_EL2, x0		// length for EL1.
 

I got it wrong, of course :-)

I have added the following fix up patch (and will combine the 2 from tomorrow):

From: Stephen Rothwell <[email protected]>
Date: Mon, 6 Feb 2023 15:05:33 +1100
Subject: [PATCH] fix for "fix up for "KVM: arm64: Introduce finalise_el2_state macro""

---
 arch/arm64/include/asm/el2_setup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/el2_setup.h +1 -1
index 5f821e5c52a9..f5b608758741 100644
@@ -270,7 +270,7 @@
 .Lskip_sme_fa64_\@:
 
 	// ZT0 available?
-	__check_override id_aa64smfr0 ID_AA64SMFR0_EL1_SMEver_SHIFT 4 .Linit_sme_zt0_\@ .Lskip_sme_zt0_\@
+	__check_override id_aa64smfr0, ID_AA64SMFR0_EL1_SMEver_SHIFT, 4, .Linit_sme_zt0_\@, .Lskip_sme_zt0_\@, x1, x2
 .Linit_sme_zt0_\@:
 	orr	x0, x0, SMCR_ELx_EZT0_MASK
 .Lskip_sme_zt0_\@:
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
#2 lore raw
In reply to Stephen Rothwell
Quoted 26 lines · Stephen Rothwell

[1 <text/plain; US-ASCII (quoted-printable)>]
Hi all,

Today's linux-next merge of the kvm-arm tree got a conflict in:

arch/arm64/kernel/hyp-stub.S

between commit:

f122576f3533 ("arm64/sme: Enable host kernel to access ZT0")

from the arm64 tree and commit:

e2d4f5ae1771 ("KVM: arm64: Introduce finalise_el2_state macro")

from the kvm-arm tree.

I fixed it up (the code modified by the former was moved by the latter, so I applied the following merge fix patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Quoted 1 line

I hope I got this right :-)

Thanks for giving it a go!

Catalin, we'll probably end-up taking the arm64/for-next/tpidr2 branch into the kvmarm tree in order to minimise the damage.

Please shout if you want to solve this the other way around (taking the finalise_el2_state refactoring in the arm64 tree).

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
#3 lore raw
Quoted 29 lines · Marc Zyngier
Quoted 26 lines · Stephen Rothwell

[1 <text/plain; US-ASCII (quoted-printable)>]
Hi all,

Today's linux-next merge of the kvm-arm tree got a conflict in:

arch/arm64/kernel/hyp-stub.S

between commit:

f122576f3533 ("arm64/sme: Enable host kernel to access ZT0")

from the arm64 tree and commit:

e2d4f5ae1771 ("KVM: arm64: Introduce finalise_el2_state macro")

from the kvm-arm tree.

I fixed it up (the code modified by the former was moved by the latter, so I applied the following merge fix patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Quoted 6 lines
Quoted 1 line

I hope I got this right :-)

Thanks for giving it a go!

Catalin, we'll probably end-up taking the arm64/for-next/tpidr2 branch into the kvmarm tree in order to minimise the damage.

Scratch that, it is the sme2 branch.

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.