[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] VT-d: drop flush_dev_iotlb parameter from IOTLB flush hook



commit 673d9dd8a590fa61dd9ffed48c3c64ee3b0a23ff
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Jan 7 16:00:19 2026 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jan 8 08:07:19 2026 +0100

    VT-d: drop flush_dev_iotlb parameter from IOTLB flush hook
    
    All call sites pass it using the flag from the IOMMU which they also
    pass.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/drivers/passthrough/vtd/extern.h | 3 +--
 xen/drivers/passthrough/vtd/iommu.c  | 9 ++++-----
 xen/drivers/passthrough/vtd/iommu.h  | 3 +--
 xen/drivers/passthrough/vtd/qinval.c | 7 +++----
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/extern.h 
b/xen/drivers/passthrough/vtd/extern.h
index 65f81a8bf1..1a9a439fb5 100644
--- a/xen/drivers/passthrough/vtd/extern.h
+++ b/xen/drivers/passthrough/vtd/extern.h
@@ -57,8 +57,7 @@ int __must_check cf_check vtd_flush_context_reg(
     uint8_t function_mask, uint64_t type, bool flush_non_present_entry);
 int __must_check cf_check vtd_flush_iotlb_reg(
     struct vtd_iommu *iommu, uint16_t did, uint64_t addr,
-    unsigned int size_order, uint64_t type, bool flush_non_present_entry,
-    bool flush_dev_iotlb);
+    unsigned int size_order, uint64_t type, bool flush_non_present_entry);
 
 struct vtd_iommu *ioapic_to_iommu(unsigned int apic_id);
 struct vtd_iommu *hpet_to_iommu(unsigned int hpet_id);
diff --git a/xen/drivers/passthrough/vtd/iommu.c 
b/xen/drivers/passthrough/vtd/iommu.c
index 53e9165fc7..e7049456bf 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -569,8 +569,7 @@ static int __must_check iommu_flush_context_device(struct 
vtd_iommu *iommu,
 /* return value determine if we need a write buffer flush */
 int cf_check vtd_flush_iotlb_reg(
     struct vtd_iommu *iommu, uint16_t did, uint64_t addr,
-    unsigned int size_order, uint64_t type, bool flush_non_present_entry,
-    bool flush_dev_iotlb)
+    unsigned int size_order, uint64_t type, bool flush_non_present_entry)
 {
     int tlb_offset = ecap_iotlb_offset(iommu->ecap);
     uint64_t val = type | DMA_TLB_IVT;
@@ -635,7 +634,7 @@ static int __must_check iommu_flush_iotlb_global(struct 
vtd_iommu *iommu,
     vtd_ops_preamble_quirk(iommu);
 
     status = iommu->flush.iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH,
-                                flush_non_present_entry, 
iommu->flush_dev_iotlb);
+                                flush_non_present_entry);
 
     /* undo platform specific errata workarounds */
     vtd_ops_postamble_quirk(iommu);
@@ -652,7 +651,7 @@ static int __must_check iommu_flush_iotlb_dsi(struct 
vtd_iommu *iommu, u16 did,
     vtd_ops_preamble_quirk(iommu);
 
     status = iommu->flush.iotlb(iommu, did, 0, 0, DMA_TLB_DSI_FLUSH,
-                                flush_non_present_entry, 
iommu->flush_dev_iotlb);
+                                flush_non_present_entry);
 
     /* undo platform specific errata workarounds */
     vtd_ops_postamble_quirk(iommu);
@@ -678,7 +677,7 @@ static int __must_check iommu_flush_iotlb_psi(struct 
vtd_iommu *iommu, u16 did,
     vtd_ops_preamble_quirk(iommu);
 
     status = iommu->flush.iotlb(iommu, did, addr, order, DMA_TLB_PSI_FLUSH,
-                                flush_non_present_entry, 
iommu->flush_dev_iotlb);
+                                flush_non_present_entry);
 
     /* undo platform specific errata workarounds */
     vtd_ops_postamble_quirk(iommu);
diff --git a/xen/drivers/passthrough/vtd/iommu.h 
b/xen/drivers/passthrough/vtd/iommu.h
index 0d96b76bce..ccb00889d7 100644
--- a/xen/drivers/passthrough/vtd/iommu.h
+++ b/xen/drivers/passthrough/vtd/iommu.h
@@ -502,8 +502,7 @@ struct vtd_iommu {
                                     bool non_present_entry_flush);
         int __must_check (*iotlb)(struct vtd_iommu *iommu, u16 did, u64 addr,
                                   unsigned int size_order, u64 type,
-                                  bool flush_non_present_entry,
-                                  bool flush_dev_iotlb);
+                                  bool flush_non_present_entry);
     } flush;
 
     struct list_head ats_devices;
diff --git a/xen/drivers/passthrough/vtd/qinval.c 
b/xen/drivers/passthrough/vtd/qinval.c
index c79927b09f..1dde44b105 100644
--- a/xen/drivers/passthrough/vtd/qinval.c
+++ b/xen/drivers/passthrough/vtd/qinval.c
@@ -452,7 +452,7 @@ static int __must_check cf_check flush_context_qi(
 
 static int __must_check cf_check flush_iotlb_qi(
     struct vtd_iommu *iommu, u16 did, u64 addr, unsigned int size_order,
-    u64 type, bool flush_non_present_entry, bool flush_dev_iotlb)
+    u64 type, bool flush_non_present_entry)
 {
     u8 dr = 0, dw = 0;
     int ret = 0, rc;
@@ -478,7 +478,7 @@ static int __must_check cf_check flush_iotlb_qi(
     if ( !ret )
         ret = rc;
 
-    if ( flush_dev_iotlb )
+    if ( iommu->flush_dev_iotlb )
     {
         rc = dev_invalidate_iotlb(iommu, did, addr, size_order, type);
         if ( !ret )
@@ -573,8 +573,7 @@ static int cf_check vtd_flush_context_noop(
 
 static int cf_check vtd_flush_iotlb_noop(
     struct vtd_iommu *iommu, uint16_t did, uint64_t addr,
-    unsigned int size_order, uint64_t type, bool flush_non_present_entry,
-    bool flush_dev_iotlb)
+    unsigned int size_order, uint64_t type, bool flush_non_present_entry)
 {
     WARN();
     return -EIO;
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.