Blob Blame History Raw
From 851635352b217b63e7defc703f8a3f2a6719b490 Mon Sep 17 00:00:00 2001
Message-Id: <851635352b217b63e7defc703f8a3f2a6719b490@dist-git>
From: Andrea Bolognani <abologna@redhat.com>
Date: Mon, 17 Jul 2017 12:09:08 +0200
Subject: [PATCH] conf: Add 'spapr-pci-host-bridge' controller model

Adding it to the virDomainControllerPCIModelName enumeration
is enough for existing code to handle it, so parsing and
formatting will work without further tweaking.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
(cherry picked from commit 90855eca3f7ceee964727c1d0f54541373d31908)

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1431193

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 docs/schemas/domaincommon.rng | 2 ++
 src/conf/domain_conf.c        | 1 +
 src/conf/domain_conf.h        | 1 +
 3 files changed, 4 insertions(+)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 78023ff4af..964e5c5bd5 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1900,6 +1900,8 @@
               <element name="model">
                 <attribute name="name">
                   <choice>
+                    <!-- implementations of 'pci-root' -->
+                    <value>spapr-pci-host-bridge</value>
                     <!-- implementations of 'pci-bridge' -->
                     <value>pci-bridge</value>
                     <!-- implementations of 'dmi-to-pci-bridge' -->
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 8e5c487df8..8a030c9b68 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -349,6 +349,7 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName,
               "pxb",
               "pxb-pcie",
               "pcie-root-port",
+              "spapr-pci-host-bridge",
 );
 
 VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4c33b0d15e..e287e6d7f3 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -710,6 +710,7 @@ typedef enum {
     VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PXB,
     VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PXB_PCIE,
     VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT,
+    VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_SPAPR_PCI_HOST_BRIDGE,
 
     VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST
 } virDomainControllerPCIModelName;
-- 
2.13.3