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

[libvirt] [rebased][PATCH 1/4] add pci-bridge controller type



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 cn fujitsu com>
---
 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 8dbfb96..16d84b6 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -269,7 +269,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",
@@ -4493,6 +4494,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 9a9e0b1..a93562d 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -661,6 +661,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


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