aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/irq.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-02-15 14:13:17 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-02-15 14:13:17 +0000
commit3bbf83843ccc4547c839c4cfe05cb70e3dc92a49 (patch)
treeaa67fdee6d43f1daaa9f4aa3f95636e335528d67 /xen/arch/x86/hvm/irq.c
parent1546fd3f23cfb591cf02ef7da72d6e7e908e3504 (diff)
downloadxen-3bbf83843ccc4547c839c4cfe05cb70e3dc92a49.tar.gz
xen-3bbf83843ccc4547c839c4cfe05cb70e3dc92a49.tar.bz2
xen-3bbf83843ccc4547c839c4cfe05cb70e3dc92a49.zip
Enable HVM guest VT-d device hotplug via a simple ACPI hotplug device model.
** Currently only 2 virtual hotplug pci slots(6~7) are created so more than 2 vtd dev can't be hotplugged, but we can easily extend it in future. Three new commands are added: "xm pci-list domid" show the current assigned vtd device, like: VSlt domain bus slot func 0x6 0x0 0x02 0x00 0x0 "xm pci-detach" hot remove the specified vtd device by the virtual slot, like: xm pci-detach EdwinHVMDomainVtd 6 "xm pci-attach DomainID dom bus dev func [vslot]" hot add a new vtd device in the vslot. If no vslot specified, a free slot will be picked up. e.g. to insert '0000:03:00.0': xm pci-attach EdwinHVMDomainVtd 0 3 0 0 ** guest pci hotplug linux: pls. use 2.6.X and enable ACPI PCI hotplug ( Bus options=> PCI hotplug => ACPI PCI hotplug driver ) windows: 2000/xp/2003/vista are all okay Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Diffstat (limited to 'xen/arch/x86/hvm/irq.c')
-rw-r--r--xen/arch/x86/hvm/irq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c
index 072452a861..97eb25f9cb 100644
--- a/xen/arch/x86/hvm/irq.c
+++ b/xen/arch/x86/hvm/irq.c
@@ -211,8 +211,7 @@ void hvm_set_pci_link_route(struct domain *d, u8 link, u8 isa_irq)
clear_bit(old_isa_irq, &hvm_irq->dpci->isairq_map);
for ( i = 0; i < NR_LINK; i++ )
- if ( test_bit(i, &hvm_irq->dpci->link_map) &&
- hvm_irq->pci_link.route[i] )
+ if ( hvm_irq->dpci->link_cnt[i] && hvm_irq->pci_link.route[i] )
set_bit(hvm_irq->pci_link.route[i],
&hvm_irq->dpci->isairq_map);
}