aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/domain.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-02-24 11:46:32 +0100
committerJan Beulich <jbeulich@suse.com>2012-02-24 11:46:32 +0100
commita8078b02351eb5085afb1941175bb3977863e849 (patch)
treed4dd3e2617c368507152d1af19ea7d448bbc268b /xen/arch/x86/domain.c
parente1dc98e3c3619cf7a050cc898ecb9288eceb5915 (diff)
downloadxen-a8078b02351eb5085afb1941175bb3977863e849.tar.gz
xen-a8078b02351eb5085afb1941175bb3977863e849.tar.bz2
xen-a8078b02351eb5085afb1941175bb3977863e849.zip
passthrough: release assigned PCI devices earlier during domain shutdown
At least with xend, where there's not even a tool stack side attempt to de-assign devices during domain shutdown, this allows immediate re- starts of a domain to work reliably. (There's no apparent reason why c/s 18010:c1577f094ae4 chose to put this in the asynchronous part of domain destruction). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/domain.c')
-rw-r--r--xen/arch/x86/domain.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index f7182e73ec..79d1ca229f 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -657,7 +657,6 @@ void arch_domain_destroy(struct domain *d)
xfree(d->arch.pv_domain.e820);
vmce_destroy_msr(d);
- pci_release_devices(d);
free_domain_pirqs(d);
if ( !is_idle_domain(d) )
iommu_domain_destroy(d);
@@ -2101,6 +2100,8 @@ int domain_relinquish_resources(struct domain *d)
switch ( d->arch.relmem )
{
case RELMEM_not_started:
+ pci_release_devices(d);
+
/* Tear down paging-assistance stuff. */
paging_teardown(d);