summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2018-08-24 16:08:46 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2018-08-24 16:08:46 -0400
commit3461403231f0bb0a7186496cb1adf99f7de47da3 (patch)
tree16165316d021a0296de257a632fec46f301a6e3d
parent06502bfa7112d22e1523a818c53f7131b330e269 (diff)
downloadlongterm-queue-4.12-3461403231f0bb0a7186496cb1adf99f7de47da3.tar.gz
KVM: another arm refresh
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--queue/KVM-arm64-Avoid-storing-the-vcpu-pointer-on-the-stac.patch31
1 files changed, 16 insertions, 15 deletions
diff --git a/queue/KVM-arm64-Avoid-storing-the-vcpu-pointer-on-the-stac.patch b/queue/KVM-arm64-Avoid-storing-the-vcpu-pointer-on-the-stac.patch
index f164441..f216280 100644
--- a/queue/KVM-arm64-Avoid-storing-the-vcpu-pointer-on-the-stac.patch
+++ b/queue/KVM-arm64-Avoid-storing-the-vcpu-pointer-on-the-stac.patch
@@ -1,4 +1,4 @@
-From 4464e210de9e80e38de59df052fe09ea2ff80b1b Mon Sep 17 00:00:00 2001
+From 90d30ad42ad1ea6b13982d54fa6b4108c7a50b26 Mon Sep 17 00:00:00 2001
From: Christoffer Dall <christoffer.dall@linaro.org>
Date: Sun, 8 Oct 2017 17:01:56 +0200
Subject: [PATCH] KVM: arm64: Avoid storing the vcpu pointer on the stack
@@ -33,9 +33,10 @@ Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h
-index 24961b732e65..7149f1520382 100644
+index a7ef5a051911..1ed5cb9c322c 100644
--- a/arch/arm64/include/asm/kvm_asm.h
+++ b/arch/arm64/include/asm/kvm_asm.h
@@ -33,6 +33,7 @@
@@ -46,7 +47,7 @@ index 24961b732e65..7149f1520382 100644
#define kvm_ksym_ref(sym) \
({ \
void *val = &sym; \
-@@ -70,6 +71,20 @@ extern u32 __init_stage2_translation(void);
+@@ -68,6 +69,20 @@ extern u32 __init_stage2_translation(void);
extern void __qcom_hyp_sanitize_btac_predictors(void);
@@ -68,10 +69,10 @@ index 24961b732e65..7149f1520382 100644
#endif /* __ARM_KVM_ASM_H__ */
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
-index 596f8e414a4c..618cfee7206a 100644
+index eba9e917771b..f075a567c6af 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
-@@ -358,10 +358,15 @@ int kvm_perf_teardown(void);
+@@ -353,10 +353,15 @@ int kvm_perf_teardown(void);
struct kvm_vcpu *kvm_mpidr_to_vcpu(struct kvm *kvm, unsigned long mpidr);
@@ -87,7 +88,7 @@ index 596f8e414a4c..618cfee7206a 100644
/*
* Call initialization code, and switch to the full blown HYP code.
* If the cpucaps haven't been finalized yet, something has gone very
-@@ -370,6 +375,16 @@ static inline void __cpu_init_hyp_mode(phys_addr_t pgd_ptr,
+@@ -365,6 +370,16 @@ static inline void __cpu_init_hyp_mode(phys_addr_t pgd_ptr,
*/
BUG_ON(!static_branch_likely(&arm64_const_caps_ready));
__kvm_call_hyp((void *)pgd_ptr, hyp_stack_ptr, vector_ptr);
@@ -105,10 +106,10 @@ index 596f8e414a4c..618cfee7206a 100644
static inline void kvm_arch_hardware_unsetup(void) {}
diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
-index 1303e04110cd..78e1b0a70aaf 100644
+index af247d10252f..2a1a04c87e9a 100644
--- a/arch/arm64/kernel/asm-offsets.c
+++ b/arch/arm64/kernel/asm-offsets.c
-@@ -138,6 +138,7 @@ int main(void)
+@@ -136,6 +136,7 @@ int main(void)
DEFINE(CPU_FP_REGS, offsetof(struct kvm_regs, fp_regs));
DEFINE(VCPU_FPEXC32_EL2, offsetof(struct kvm_vcpu, arch.ctxt.sys_regs[FPEXC32_EL2]));
DEFINE(VCPU_HOST_CONTEXT, offsetof(struct kvm_vcpu, arch.host_cpu_context));
@@ -117,7 +118,7 @@ index 1303e04110cd..78e1b0a70aaf 100644
#ifdef CONFIG_CPU_PM
DEFINE(CPU_SUSPEND_SZ, sizeof(struct cpu_suspend_ctx));
diff --git a/arch/arm64/kvm/hyp/entry.S b/arch/arm64/kvm/hyp/entry.S
-index fdd1068ee3a5..1f458f7c3b44 100644
+index fe4678f20a85..a7b3c198d4de 100644
--- a/arch/arm64/kvm/hyp/entry.S
+++ b/arch/arm64/kvm/hyp/entry.S
@@ -62,9 +62,6 @@ ENTRY(__guest_enter)
@@ -209,10 +210,10 @@ index f36464bd57c5..82fbc368f738 100644
ENDPROC(__hyp_panic)
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c
-index 24f52fedfb9e..46717da75643 100644
+index 6515cab4cab7..625678c5fe04 100644
--- a/arch/arm64/kvm/hyp/switch.c
+++ b/arch/arm64/kvm/hyp/switch.c
-@@ -469,7 +469,7 @@ static hyp_alternate_select(__hyp_call_panic,
+@@ -421,7 +421,7 @@ static hyp_alternate_select(__hyp_call_panic,
__hyp_call_panic_nvhe, __hyp_call_panic_vhe,
ARM64_HAS_VIRT_HOST_EXTN);
@@ -221,7 +222,7 @@ index 24f52fedfb9e..46717da75643 100644
{
struct kvm_vcpu *vcpu = NULL;
-@@ -478,9 +478,6 @@ void __hyp_text __noreturn hyp_panic(struct kvm_cpu_context *__host_ctxt)
+@@ -430,9 +430,6 @@ void __hyp_text __noreturn hyp_panic(struct kvm_cpu_context *__host_ctxt)
u64 par = read_sysreg(par_el1);
if (read_sysreg(vttbr_el2)) {
@@ -229,13 +230,13 @@ index 24f52fedfb9e..46717da75643 100644
-
- host_ctxt = kern_hyp_va(__host_ctxt);
vcpu = host_ctxt->__hyp_running_vcpu;
- __timer_disable_traps(vcpu);
__deactivate_traps(vcpu);
+ __deactivate_vm(vcpu);
diff --git a/arch/arm64/kvm/hyp/sysreg-sr.c b/arch/arm64/kvm/hyp/sysreg-sr.c
-index 2c17afd2be96..43b7dd65e3e6 100644
+index c54cc2afb92b..e19d89cabf2a 100644
--- a/arch/arm64/kvm/hyp/sysreg-sr.c
+++ b/arch/arm64/kvm/hyp/sysreg-sr.c
-@@ -189,3 +189,8 @@ void __hyp_text __sysreg32_restore_state(struct kvm_vcpu *vcpu)
+@@ -183,3 +183,8 @@ void __hyp_text __sysreg32_restore_state(struct kvm_vcpu *vcpu)
if (vcpu->arch.debug_flags & KVM_ARM64_DEBUG_DIRTY)
write_sysreg(sysreg[DBGVCR32_EL2], dbgvcr32_el2);
}