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@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
Jan Beulich committed 2026-01-08 08:07:19 +01:00
1 parent 227475c278
commit 673d9dd8a5
4 files changed
+9 -13

No files matched your search

+1 -2
View File
@@ -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);
+4 -5
View File
@@ -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);
+1 -2
View File
@@ -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;
+3 -4
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.