mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
227475c278
commit
673d9dd8a5
4 files changed
+9
-13
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||