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

Mark Brown posted 1 patch 5 days, 19 hours ago
linux-next: manual merge of the arm64 tree with the kvm-arm tree
Posted by Mark Brown 5 days, 19 hours ago
Hi all,

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

  arch/arm64/kvm/at.c

between commit:

  0496acc42fb51e ("KVM: arm64: Fix the descriptor address in __kvm_at_swap_desc()")

from the kvm-arm tree and commit:

  16dbe77a5be2de ("KVM: arm64: Use CAST instruction for swapping guest descriptor")

from the arm64 tree.

I fixed it up (see below) 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.

diff --cc arch/arm64/kvm/at.c
index a024d9a770dc74,1adf88a5732840..00000000000000
--- a/arch/arm64/kvm/at.c
+++ b/arch/arm64/kvm/at.c
@@@ -1753,8 -1785,10 +1783,10 @@@ int __kvm_at_swap_desc(struct kvm *kvm
  	if (!writable)
  		return -EPERM;
  
 -	ptep = (u64 __user *)hva + offset;
 +	ptep = (void __user *)hva + offset;
- 	if (cpus_have_final_cap(ARM64_HAS_LSE_ATOMICS))
+ 	if (cpus_have_final_cap(ARM64_HAS_LSUI))
+ 		r = __lsui_swap_desc(ptep, old, new);
+ 	else if (cpus_have_final_cap(ARM64_HAS_LSE_ATOMICS))
  		r = __lse_swap_desc(ptep, old, new);
  	else
  		r = __llsc_swap_desc(ptep, old, new);
Re: linux-next: manual merge of the arm64 tree with the kvm-arm tree
Posted by Catalin Marinas 1 day, 3 hours ago
On Fri, Mar 27, 2026 at 06:44:58PM +0000, Mark Brown wrote:
> diff --cc arch/arm64/kvm/at.c
> index a024d9a770dc74,1adf88a5732840..00000000000000
> --- a/arch/arm64/kvm/at.c
> +++ b/arch/arm64/kvm/at.c
> @@@ -1753,8 -1785,10 +1783,10 @@@ int __kvm_at_swap_desc(struct kvm *kvm
>   	if (!writable)
>   		return -EPERM;
>   
>  -	ptep = (u64 __user *)hva + offset;
>  +	ptep = (void __user *)hva + offset;
> - 	if (cpus_have_final_cap(ARM64_HAS_LSE_ATOMICS))
> + 	if (cpus_have_final_cap(ARM64_HAS_LSUI))
> + 		r = __lsui_swap_desc(ptep, old, new);
> + 	else if (cpus_have_final_cap(ARM64_HAS_LSE_ATOMICS))
>   		r = __lse_swap_desc(ptep, old, new);
>   	else
>   		r = __llsc_swap_desc(ptep, old, new);

It looks fine. Thanks Mark.

-- 
Catalin