[PATCH v3 1/3] add pci-bridge controller type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



add a new controller type, then one can
define a pci-bridge controller like this:
    <controller type='pci-bridge' index='0'/>
    <controller type='pci-bridge' index='1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
actually, it works as a pci-bus, so as to support
multi-pci-bus via pci-to-pci bridge

Signed-off-by: liguang <lig.fnst@xxxxxxxxxxxxxx>
---
 src/conf/domain_conf.c |    5 ++++-
 src/conf/domain_conf.h |    1 +
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6a7646e..8ebe77d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -264,7 +264,8 @@ VIR_ENUM_IMPL(virDomainController, VIR_DOMAIN_CONTROLLER_TYPE_LAST,
               "sata",
               "virtio-serial",
               "ccid",
-              "usb")
+              "usb",
+              "pci-bridge")
 
 VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST,
               "auto",
@@ -4479,6 +4480,8 @@ virDomainControllerDefParseXML(xmlNodePtr node,
         goto error;
 
     switch (def->type) {
+    case VIR_DOMAIN_CONTROLLER_TYPE_PCIBRIDGE:
+        break;
     case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL: {
         char *ports = virXMLPropString(node, "ports");
         if (ports) {
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 5062e07..56e5a40 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -652,6 +652,7 @@ enum virDomainControllerType {
     VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL,
     VIR_DOMAIN_CONTROLLER_TYPE_CCID,
     VIR_DOMAIN_CONTROLLER_TYPE_USB,
+    VIR_DOMAIN_CONTROLLER_TYPE_PCIBRIDGE,
 
     VIR_DOMAIN_CONTROLLER_TYPE_LAST
 };
-- 
1.7.2.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]