Pablo Greco e6a3ae
From 8954b0306e2179987cd097d203057e780808b0ba Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: Peter Xu <peterx@redhat.com>
Pablo Greco e6a3ae
Date: Wed, 9 Oct 2019 12:39:43 +0100
Pablo Greco e6a3ae
Subject: [PATCH 17/22] intel_iommu: Correct caching-mode error message
Pablo Greco e6a3ae
MIME-Version: 1.0
Pablo Greco e6a3ae
Content-Type: text/plain; charset=UTF-8
Pablo Greco e6a3ae
Content-Transfer-Encoding: 8bit
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: Peter Xu <peterx@redhat.com>
Pablo Greco e6a3ae
Message-id: <20191009123947.21505-2-peterx@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 91350
Pablo Greco e6a3ae
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH 1/5] intel_iommu: Correct caching-mode error message
Pablo Greco e6a3ae
Bugzilla: 1738440
Pablo Greco e6a3ae
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
From: Alex Williamson <alex.williamson@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
If we try to use the intel-iommu device with vfio-pci devices without
Pablo Greco e6a3ae
caching mode enabled, we're told:
Pablo Greco e6a3ae
Pablo Greco e6a3ae
  qemu-system-x86_64: We need to set caching-mode=1 for intel-iommu to enable
Pablo Greco e6a3ae
  device assignment with IOMMU protection.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
But to enable caching mode, the option is actually "caching-mode=on".
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Pablo Greco e6a3ae
Message-Id: <155364147432.16467.15898335025013220939.stgit@gimli.home>
Pablo Greco e6a3ae
Reviewed-by: Peter Xu <peterx@redhat.com>
Pablo Greco e6a3ae
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Pablo Greco e6a3ae
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Pablo Greco e6a3ae
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Pablo Greco e6a3ae
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Pablo Greco e6a3ae
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Pablo Greco e6a3ae
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Pablo Greco e6a3ae
(cherry picked from commit 75c5626c88a9675010018849ca9abc8d56045425)
Pablo Greco e6a3ae
Signed-off-by: Peter Xu <peterx@redhat.com>
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 hw/i386/intel_iommu.c | 2 +-
Pablo Greco e6a3ae
 1 file changed, 1 insertion(+), 1 deletion(-)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
Pablo Greco e6a3ae
index e827c5a..22d2e52 100644
Pablo Greco e6a3ae
--- a/hw/i386/intel_iommu.c
Pablo Greco e6a3ae
+++ b/hw/i386/intel_iommu.c
Pablo Greco e6a3ae
@@ -2554,7 +2554,7 @@ static void vtd_iommu_notify_flag_changed(IOMMUMemoryRegion *iommu,
Pablo Greco e6a3ae
     IntelIOMMUState *s = vtd_as->iommu_state;
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
     if (!s->caching_mode && new & IOMMU_NOTIFIER_MAP) {
Pablo Greco e6a3ae
-        error_report("We need to set caching-mode=1 for intel-iommu to enable "
Pablo Greco e6a3ae
+        error_report("We need to set caching-mode=on for intel-iommu to enable "
Pablo Greco e6a3ae
                      "device assignment with IOMMU protection.");
Pablo Greco e6a3ae
         exit(1);
Pablo Greco e6a3ae
     }
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae