mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
stubdom: PCI passthrough support via PV-PCI
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
This commit is contained in:
1 parent
dac6f79804
commit
de4e084064
11 files changed
+638
-7
No files matched your search
@@ -358,7 +358,7 @@ VL_OBJS+=tap-win32.o
|
||||
endif
|
||||
|
||||
ifdef CONFIG_STUBDOM
|
||||
#CONFIG_PASSTHROUGH=1
|
||||
CONFIG_PASSTHROUGH=1
|
||||
else
|
||||
ifeq (,$(wildcard /usr/include/pci))
|
||||
$(warning *** pciutils-devl package not found - missing /usr/include/pci)
|
||||
|
||||
@@ -515,6 +515,7 @@ struct pt_dev * register_real_device(PCIBus *e_bus,
|
||||
PT_LOG("Error: couldn't locate device in libpci structures\n");
|
||||
return NULL;
|
||||
}
|
||||
pci_fill_info(pci_dev, PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES);
|
||||
|
||||
if ( e_devfn == PT_VIRT_DEVFN_AUTO ) {
|
||||
/*indicate a static assignment(not hotplug), so find a free PCI hot plug slot */
|
||||
|
||||
@@ -320,7 +320,7 @@ void xenstore_parse_domain_config(int hvm_domid)
|
||||
|
||||
/* get the pci pass-through parameter */
|
||||
if (pasprintf(&buf, "/local/domain/0/backend/pci/%u/%u/num_devs",
|
||||
domid, pci_devid) == -1)
|
||||
hvm_domid, pci_devid) == -1)
|
||||
goto out;
|
||||
|
||||
free(params);
|
||||
@@ -331,7 +331,7 @@ void xenstore_parse_domain_config(int hvm_domid)
|
||||
|
||||
for ( i = 0; i < num; i++ ) {
|
||||
if (pasprintf(&buf, "/local/domain/0/backend/pci/%u/%u/dev-%d",
|
||||
domid, pci_devid, i) != -1) {
|
||||
hvm_domid, pci_devid, i) != -1) {
|
||||
free(dev);
|
||||
dev = xs_read(xsh, XBT_NULL, buf, &len);
|
||||
|
||||
|
||||