Cui, Dexuan
2009-Mar-27 08:10 UTC
[Xen-devel] [PATCH] vtd: fix multiple Dom0 S3 on hosts that support Queued Invalidation.
On such hosts we can''t do multiple Dom0 S3 when VT-d is enabled. The cause is: during the first S3 resume, init_vtd_hw() initializes the invalidation function pointers to the register-based ones and later enable_qinval() forgets to overwrite the flush function pointers to queued-based ones, so actually Queued Invalidaton is enabled, but we actually use the register-based invalidation function! Later during the second Dom0 S3, in iommu_suspend() -> iommu_flush_all(), we try to use the register-based invalidation functions to perform global flush while Queued Invalidation is enabed, and this can cause a host reset because VT-d spec says: when the queued invalidation is enabled, software must submit invalidation commands only through the IQ (and not through any invalidation command registers). The attached patch fixes the buggy enable_qinval(). And in iommu_resume(), we invoke iommu_flush_all() for safety. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel