summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-03-22 09:37:02 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-03-22 09:37:02 +0100
commita4717218280aac19b3d61b64363ee05fcb95e473 (patch)
tree28fdc4f1d1294e204e8266eb8b07f03b040d01b8 /arch
parentMerge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kerne... (diff)
parentkvm: arm64: Disable compiler instrumentation for hypervisor code (diff)
downloadlinux-a4717218280aac19b3d61b64363ee05fcb95e473.tar.xz
linux-a4717218280aac19b3d61b64363ee05fcb95e473.zip
Merge tag 'kvm-arm-for-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/ARM Changes for v4.6-rc1 Second round of patches for v4.6-rc1, fixing a small handful of issue: - disable preemption when calling smp_call_function_many - Make kvm_ksym_ref work on VHE systems again after KASRL breakage - Disable compiler instrumentation for hypervisor code that could make KVM/arm64 blow up.
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kvm/arm.c2
-rw-r--r--arch/arm64/include/asm/kvm_asm.h8
-rw-r--r--arch/arm64/kvm/hyp/Makefile4
3 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 3e0fb66d8e05..6accd66d26f0 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -373,7 +373,9 @@ static void exit_vm_noop(void *info)
void force_vm_exit(const cpumask_t *mask)
{
+ preempt_disable();
smp_call_function_many(mask, exit_vm_noop, NULL, true);
+ preempt_enable();
}
/**
diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h
index 226f49d69ea9..eb7490d232a0 100644
--- a/arch/arm64/include/asm/kvm_asm.h
+++ b/arch/arm64/include/asm/kvm_asm.h
@@ -26,7 +26,13 @@
#define KVM_ARM64_DEBUG_DIRTY_SHIFT 0
#define KVM_ARM64_DEBUG_DIRTY (1 << KVM_ARM64_DEBUG_DIRTY_SHIFT)
-#define kvm_ksym_ref(sym) phys_to_virt((u64)&sym - kimage_voffset)
+#define kvm_ksym_ref(sym) \
+ ({ \
+ void *val = &sym; \
+ if (!is_kernel_in_hyp_mode()) \
+ val = phys_to_virt((u64)&sym - kimage_voffset); \
+ val; \
+ })
#ifndef __ASSEMBLY__
struct kvm;
diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/arm64/kvm/hyp/Makefile
index b6a8fc5ad1af..778d0effa2af 100644
--- a/arch/arm64/kvm/hyp/Makefile
+++ b/arch/arm64/kvm/hyp/Makefile
@@ -16,3 +16,7 @@ obj-$(CONFIG_KVM_ARM_HOST) += fpsimd.o
obj-$(CONFIG_KVM_ARM_HOST) += tlb.o
obj-$(CONFIG_KVM_ARM_HOST) += hyp-entry.o
obj-$(CONFIG_KVM_ARM_HOST) += s2-setup.o
+
+GCOV_PROFILE := n
+KASAN_SANITIZE := n
+UBSAN_SANITIZE := n