All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xenia Ragiadakou <burzalodowa@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: "Jan Beulich" <jbeulich@suse.com>, "Paul Durrant" <paul@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH v3 2/8] x86/iommu: iommu_igfx and iommu_qinval are Intel VT-d specific
Date: Mon, 16 Jan 2023 09:04:25 +0200	[thread overview]
Message-ID: <20230116070431.905594-3-burzalodowa@gmail.com> (raw)
In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com>

Use CONFIG_INTEL_IOMMU to guard the usage of iommu_igfx and iommu_qinval
in common code.

No functional change intended.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
---

Changes in v3:
  - handle iommu_snoop case in a different patch and update commit msg
  - use no_config_param() to print a warning when the user sets an INTEL_IOMMU
    specific string in the iommu boot parameter and INTEL_IOMMU is disabled

 xen/drivers/passthrough/iommu.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 9d95fb27d0..b4dfa95dfd 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -82,11 +82,19 @@ static int __init cf_check parse_iommu_param(const char *s)
         else if ( ss == s + 23 && !strncmp(s, "quarantine=scratch-page", 23) )
             iommu_quarantine = IOMMU_quarantine_scratch_page;
 #endif
-#ifdef CONFIG_X86
         else if ( (val = parse_boolean("igfx", s, ss)) >= 0 )
+#ifdef CONFIG_INTEL_IOMMU
             iommu_igfx = val;
+#else
+            no_config_param("INTEL_IOMMU", "iommu", s, ss);
+#endif
         else if ( (val = parse_boolean("qinval", s, ss)) >= 0 )
+#ifdef CONFIG_INTEL_IOMMU
             iommu_qinval = val;
+#else
+            no_config_param("INTEL_IOMMU", "iommu", s, ss);
+#endif
+#ifdef CONFIG_X86
         else if ( (val = parse_boolean("superpages", s, ss)) >= 0 )
             iommu_superpages = val;
 #endif
-- 
2.37.2



  parent reply	other threads:[~2023-01-16  7:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16  7:04 [PATCH v3 0/8] Make x86 IOMMU driver support configurable Xenia Ragiadakou
2023-01-16  7:04 ` [PATCH v3 1/8] x86/iommu: amd_iommu_perdev_intremap is AMD-Vi specific Xenia Ragiadakou
2023-01-16 16:36   ` Jan Beulich
2023-01-16  7:04 ` Xenia Ragiadakou [this message]
2023-01-16 16:38   ` [PATCH v3 2/8] x86/iommu: iommu_igfx and iommu_qinval are Intel VT-d specific Jan Beulich
2023-01-16  7:04 ` [PATCH v3 3/8] x86/iommu: snoop control is allowed only by Intel VT-d Xenia Ragiadakou
2023-01-16 16:39   ` Jan Beulich
2023-01-16  7:04 ` [PATCH v3 4/8] x86/acpi: separate AMD-Vi and VT-d specific functions Xenia Ragiadakou
2023-01-16 16:43   ` Jan Beulich
2023-01-16  7:04 ` [PATCH v3 5/8] x86/iommu: make code addressing CVE-2011-1898 no VT-d specific Xenia Ragiadakou
2023-01-16  7:21   ` Xenia Ragiadakou
2023-01-16 16:49     ` Jan Beulich
2023-01-16 17:21       ` Xenia Ragiadakou
2023-01-16  7:04 ` [PATCH v3 6/8] x86/iommu: call pi_update_irte through an hvm_function callback Xenia Ragiadakou
2023-01-16  9:35   ` Xenia Ragiadakou
2023-01-16  7:04 ` [PATCH v3 7/8] x86/dpci: move hvm_dpci_isairq_eoi() to generic HVM code Xenia Ragiadakou
2023-01-16  7:04 ` [PATCH v3 8/8] x86/iommu: make AMD-Vi and Intel VT-d support configurable Xenia Ragiadakou

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=20230116070431.905594-3-burzalodowa@gmail.com \
    --to=burzalodowa@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=paul@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.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.