vtd: do FLR before xc.domain_destroy()
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 26 Aug 2008 13:11:39 +0000 (14:11 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 26 Aug 2008 13:11:39 +0000 (14:11 +0100)
commit43e1fddd0ce075771ad410efea5d44c25f66be24
tree4a264a87d29f7b3dc2af8433f1185c451cbcca23
parent81abef044859ef503a13d567ede25d8bf3875844
vtd: do FLR before xc.domain_destroy()

When we "xm destroy" a guest with assigned devices, in
xen/common/domain.c:domain_kill(), we relinquish guest's memory first,
then invoke domain_destroy() -> complete_domain_destroy() ->
arch_domain_destroy() -> pci_release_devices()/iommu_domain_destroy().

Between relinquish_memory() and domain_destroy(), a device may be
issuing DMA request and access guest's relinquished  memory.

We can do_FLR() to quiesce devices before xc.domain_destroy().

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
tools/python/xen/util/pci.py
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/server/DevController.py
tools/python/xen/xend/server/pciif.py