Skip to contentSkip to conversation

VT-d: Chop down the DMAR_OPERATION_TIMEOUT to a low number of milliseconds.

PATCH In review Quan Xu 3 participants 4 messages Mar 14, 2016 – Mar 15, 2016

lore
Share & tools
lore

Quan Xu

author
#0 lore raw

PATCH 1/1 VT-d: Chop down the DMAR_OPERATION_TIMEOUT to a low number of milliseconds.

We confirmed with VT-d hardware team that 1ms is large enough for IOMMU internal flush. So We can change the DMAR_OPERATION_TIMEOUT from 1000 ms to 1 ms.

CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>
CC Feng Wu <[email protected]>
CC Kevin Tian <[email protected]>
---
 xen/drivers/passthrough/vtd/dmar.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/passthrough/vtd/dmar.h +1 -1
index 729b603..4b14368 100644
@@ -106,7 +106,7 @@ struct acpi_atsr_unit *acpi_find_matched_atsr_unit(const struct pci_dev *);
 #define RMRR_TYPE 2
 #define ATSR_TYPE 3
 
-#define DMAR_OPERATION_TIMEOUT MILLISECS(1000)
+#define DMAR_OPERATION_TIMEOUT MILLISECS(1)
 
 #define IOMMU_WAIT_OP(iommu, offset, op, cond, sts) \
 do {                                                \
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
author
#2 lore raw
Quoted 5 lines · Kevin
Quoted 5 lines

From: Xu, Quan
Sent: Monday, March 14, 2016 3:16 PM

We confirmed with VT-d hardware team that 1ms is large enough for IOMMU internal flush. So We can change the DMAR_OPERATION_TIMEOUT

Quoted 7 lines

from

Quoted 4 lines

1000 ms to 1 ms.

Kevin, thanks!!
Quan

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
In reply to Quan Xu
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 14.03.16 at 08:16, <[email protected]> wrote:

We confirmed with VT-d hardware team that 1ms is large enough for IOMMU internal flush. So We can change the DMAR_OPERATION_TIMEOUT from 1000 ms to 1 ms.

First of all the description mentions just one of the two uses of this constant. And then I'm hesitant to commit this as long as the panic()-s are still there when that timeout expires - reducing the timeout (the more this significantly) will raise the (theoretical) chance of actually invoking one of them. Hence the proper order in which I would like to see things happen is for this to be reduced only after having
- eliminated the panic()-s
- decoupled the device IOTLB invalidation from this path (after all right now flush_iotlb_qi() uses invalidate_sync() for both, and hence the shortened timeout now pretty certainly is too short for the device IOTLB case)

Temporarily it may be sufficient to just eliminate the panic()-s, provided the timeout value would then be made dependent on ats_enabled.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel