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

From: Stephen Rothwell
Date: Fri Jun 01 2018 - 02:23:34 EST


Hi all,

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

arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/hyp/switch.c

between commit:

55e3748e8902 ("arm64: KVM: Add ARCH_WORKAROUND_2 support for guests")

from the arm64 tree and commits:

fa89d31c5306 ("KVM: arm64: Repurpose vcpu_arch.debug_flags for general-purpose flags")
e6b673b741ea ("KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing")

from the kvm-arm 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.

--
Cheers,
Stephen Rothwell

diff --cc arch/arm64/include/asm/kvm_host.h
index 95d8a0e15b5f,a4ca202ff3f2..000000000000
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@@ -216,11 -217,8 +217,11 @@@ struct kvm_vcpu_arch
/* Exception Information */
struct kvm_vcpu_fault_info fault;

+ /* State of various workarounds, see kvm_asm.h for bit assignment */
+ u64 workaround_flags;
+
- /* Guest debug state */
- u64 debug_flags;
+ /* Miscellaneous vcpu state flags */
+ u64 flags;

/*
* We maintain more than a single set of debug registers to support
diff --cc arch/arm64/kvm/hyp/switch.c
index c50cedc447f1,2d45bd719a5d..000000000000
--- a/arch/arm64/kvm/hyp/switch.c
+++ b/arch/arm64/kvm/hyp/switch.c
@@@ -452,10 -475,6 +511,8 @@@ int kvm_vcpu_run_vhe(struct kvm_vcpu *v
/* And we're baaack! */
} while (fixup_guest_exit(vcpu, &exit_code));

+ __set_host_arch_workaround_state(vcpu);
+
- fp_enabled = fpsimd_enabled_vhe();
-
sysreg_save_guest_state_vhe(guest_ctxt);

__deactivate_traps(vcpu);
@@@ -512,10 -525,6 +565,8 @@@ int __hyp_text __kvm_vcpu_run_nvhe(stru
/* And we're baaack! */
} while (fixup_guest_exit(vcpu, &exit_code));

+ __set_host_arch_workaround_state(vcpu);
+
- fp_enabled = __fpsimd_enabled_nvhe();
-
__sysreg_save_state_nvhe(guest_ctxt);
__sysreg32_save_state(vcpu);
__timer_disable_traps(vcpu);

Attachment: pgpWdiGjR0DKC.pgp
Description: OpenPGP digital signature