|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [Patch RFC 06/13] vt-d: Introduce a new per-domain flag - qi_flag.
The qi_flag is Set when submit Device-TLB invalidation requests. The
qi_flag will be Clear in QI interrupt handler if there are no in-flight
Device-TLB invalidation requests.
Signed-off-by: Quan Xu <quan.xu@xxxxxxxxx>
---
xen/drivers/passthrough/vtd/iommu.c | 1 +
xen/drivers/passthrough/vtd/qinval.c | 1 +
xen/include/xen/hvm/iommu.h | 3 +++
3 files changed, 5 insertions(+)
diff --git a/xen/drivers/passthrough/vtd/iommu.c
b/xen/drivers/passthrough/vtd/iommu.c
index e3acea5..fda9a84 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1144,6 +1144,7 @@ scan_again:
{
qi_table_data(d) = 0;
qi_table_pollslot(d) = 0;
+ QI_FLUSHING(d) = 0;
}
rcu_unlock_domain(d);
}
diff --git a/xen/drivers/passthrough/vtd/qinval.c
b/xen/drivers/passthrough/vtd/qinval.c
index abe6e9c..0d85ce7 100644
--- a/xen/drivers/passthrough/vtd/qinval.c
+++ b/xen/drivers/passthrough/vtd/qinval.c
@@ -165,6 +165,7 @@ static int queue_invalidate_wait(struct iommu *iommu,
qinval_entry->q.inv_wait_dsc.lo.sdata = ++ qi_table_data(d);
qinval_entry->q.inv_wait_dsc.hi.saddr = virt_to_maddr(
&qi_table_pollslot(d)) >> 2;
+ QI_FLUSHING(d) = 1;
rcu_unlock_domain(d);
} else {
qinval_entry->q.inv_wait_dsc.lo.sdata = QINVAL_STAT_DONE;
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
index 28e7fc3..e838905 100644
--- a/xen/include/xen/hvm/iommu.h
+++ b/xen/include/xen/hvm/iommu.h
@@ -51,6 +51,7 @@ struct hvm_iommu {
/* IOMMU Queued Invalidation(QI) */
struct qi_talbe talbe;
+ bool_t qi_flag;
/* Features supported by the IOMMU */
DECLARE_BITMAP(features, IOMMU_FEAT_count);
@@ -63,5 +64,7 @@ struct hvm_iommu {
(d->arch.hvm_domain.hvm_iommu.talbe.qi_table_status_data)
#define qi_table_pollslot(d) \
(d->arch.hvm_domain.hvm_iommu.talbe.qi_table_poll_slot)
+#define QI_FLUSHING(d) \
+ (d->arch.hvm_domain.hvm_iommu.qi_flag)
#endif /* __XEN_HVM_IOMMU_H__ */
--
1.8.3.2
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |