All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
To: <arnd@arndb.de>, <catalin.marinas@arm.com>,
	<gregkh@linuxfoundation.org>, <rostedt@goodmis.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<maz@kernel.org>, <quic_psodagud@quicinc.com>,
	<quic_tsoni@quicinc.com>, <will@kernel.org>,
	Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Subject: [PATCHv12 6/9] KVM: arm64: Add a flag to disable MMIO trace for nVHE KVM
Date: Thu, 28 Apr 2022 15:25:29 +0530	[thread overview]
Message-ID: <1517201c3424214edd2d5385eeb10ac106b67d1c.1651139070.git.quic_saipraka@quicinc.com> (raw)
In-Reply-To: <cover.1651139070.git.quic_saipraka@quicinc.com>

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>
---
 arch/arm64/kvm/hyp/nvhe/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile
index f9fe4dc21b1f..87d22a18b7a5 100644
--- a/arch/arm64/kvm/hyp/nvhe/Makefile
+++ b/arch/arm64/kvm/hyp/nvhe/Makefile
@@ -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
-- 
2.33.1


WARNING: multiple messages have this Message-ID (diff)
From: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
To: <arnd@arndb.de>, <catalin.marinas@arm.com>,
	<gregkh@linuxfoundation.org>,  <rostedt@goodmis.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<maz@kernel.org>, <quic_psodagud@quicinc.com>,
	<quic_tsoni@quicinc.com>, <will@kernel.org>,
	Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Subject: [PATCHv12 6/9] KVM: arm64: Add a flag to disable MMIO trace for nVHE KVM
Date: Thu, 28 Apr 2022 15:25:29 +0530	[thread overview]
Message-ID: <1517201c3424214edd2d5385eeb10ac106b67d1c.1651139070.git.quic_saipraka@quicinc.com> (raw)
In-Reply-To: <cover.1651139070.git.quic_saipraka@quicinc.com>

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>
---
 arch/arm64/kvm/hyp/nvhe/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile
index f9fe4dc21b1f..87d22a18b7a5 100644
--- a/arch/arm64/kvm/hyp/nvhe/Makefile
+++ b/arch/arm64/kvm/hyp/nvhe/Makefile
@@ -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
-- 
2.33.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-04-28 10:04 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28  9:55 [PATCHv12 0/9] lib/rwmmio/arm64: Add support to trace register reads/writes Sai Prakash Ranjan
2022-04-28  9:55 ` Sai Prakash Ranjan
2022-04-28  9:55 ` [PATCHv12 1/9] arm64: io: Use asm-generic high level MMIO accessors Sai Prakash Ranjan
2022-04-28  9:55   ` Sai Prakash Ranjan
2022-04-28  9:55 ` [PATCHv12 2/9] coresight: etm4x: Use asm-generic IO memory barriers Sai Prakash Ranjan
2022-04-28  9:55   ` Sai Prakash Ranjan
2022-04-28  9:55 ` [PATCHv12 3/9] irqchip/tegra: Fix overflow implicit truncation warnings Sai Prakash Ranjan
2022-04-28  9:55   ` Sai Prakash Ranjan
2022-04-28  9:55 ` [PATCHv12 4/9] drm/meson: " Sai Prakash Ranjan
2022-04-28  9:55   ` Sai Prakash Ranjan
2022-04-28  9:55 ` [PATCHv12 5/9] lib: Add register read/write tracing support Sai Prakash Ranjan
2022-04-28  9:55   ` Sai Prakash Ranjan
2022-04-28  9:55 ` Sai Prakash Ranjan [this message]
2022-04-28  9:55   ` [PATCHv12 6/9] KVM: arm64: Add a flag to disable MMIO trace for nVHE KVM Sai Prakash Ranjan
2022-04-28  9:55 ` [PATCHv12 7/9] asm-generic/io: Add logging support for MMIO accessors Sai Prakash Ranjan
2022-04-28  9:55   ` Sai Prakash Ranjan
2022-04-28 10:51   ` Greg KH
2022-04-28 10:51     ` Greg KH
2022-04-28 11:21     ` Sai Prakash Ranjan
2022-04-28 11:21       ` Sai Prakash Ranjan
2022-04-28 12:02       ` Greg KH
2022-04-28 12:02         ` Greg KH
2022-04-28 12:29         ` Sai Prakash Ranjan
2022-04-28 12:29           ` Sai Prakash Ranjan
2022-04-28  9:55 ` [PATCHv12 8/9] serial: qcom_geni_serial: Disable MMIO tracing for geni serial Sai Prakash Ranjan
2022-04-28  9:55   ` Sai Prakash Ranjan
2022-04-28 10:50   ` Greg KH
2022-04-28 10:50     ` Greg KH
2022-04-28 11:30     ` Sai Prakash Ranjan
2022-04-28 11:30       ` Sai Prakash Ranjan
2022-04-28 16:31     ` Trilok Soni
2022-04-28 16:31       ` Trilok Soni
2022-04-28 16:49       ` Greg KH
2022-04-28 16:49         ` Greg KH
2022-04-28 17:00         ` Trilok Soni
2022-04-28 17:00           ` Trilok Soni
2022-04-29 13:00           ` Sai Prakash Ranjan
2022-04-29 13:00             ` Sai Prakash Ranjan
2022-04-28  9:55 ` [PATCHv12 9/9] soc: qcom: geni: Disable MMIO tracing for GENI SE Sai Prakash Ranjan
2022-04-28  9:55   ` Sai Prakash Ranjan
2022-04-28 10:50   ` Greg KH
2022-04-28 10:50     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1517201c3424214edd2d5385eeb10ac106b67d1c.1651139070.git.quic_saipraka@quicinc.com \
    --to=quic_saipraka@quicinc.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=quic_psodagud@quicinc.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=rostedt@goodmis.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.