KVM: arm64: Add a flag to disable MMIO trace for nVHE KVM
authorSai Prakash Ranjan <quic_saipraka@quicinc.com>
Wed, 18 May 2022 16:44:15 +0000 (22:14 +0530)
committerArnd Bergmann <arnd@arndb.de>
Wed, 15 Jun 2022 15:41:12 +0000 (17:41 +0200)
Add a generic flag (__DISABLE_TRACE_MMIO__) to disable MMIO
tracing in nVHE KVM as the tracepoint and MMIO logging symbols
should not be visible at nVHE KVM as there is no way to execute
them. It can also be used to disable MMIO tracing for specific
drivers.

Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm64/kvm/hyp/nvhe/Makefile

index f9fe4dc21b1f00896d4a6818ed5304aacd3030d4..87d22a18b7a50e4dc7ae366350fd40cdb317c6f8 100644 (file)
@@ -4,7 +4,12 @@
 #
 
 asflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS
-ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS
+
+# Tracepoint and MMIO logging symbols should not be visible at nVHE KVM as
+# there is no way to execute them and any such MMIO access from nVHE KVM
+# will explode instantly (Words of Marc Zyngier). So introduce a generic flag
+# __DISABLE_TRACE_MMIO__ to disable MMIO tracing for nVHE KVM.
+ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS -D__DISABLE_TRACE_MMIO__
 
 hostprogs := gen-hyprel
 HOST_EXTRACFLAGS += -I$(objtree)/include