[RFC PATCH v3 9/9] qemu: Implement the IBS pSeries feature

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

 



Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 docs/schemas/domaincommon.rng                               | 5 +++++
 src/conf/domain_conf.c                                      | 4 ++++
 src/conf/domain_conf.h                                      | 1 +
 src/qemu/qemu_command.c                                     | 5 +++++
 src/qemu/qemu_domain.c                                      | 1 +
 tests/qemuxml2argvdata/pseries-features-invalid-machine.xml | 1 +
 tests/qemuxml2argvdata/pseries-features.args                | 2 +-
 tests/qemuxml2argvdata/pseries-features.xml                 | 1 +
 tests/qemuxml2argvtest.c                                    | 1 +
 tests/qemuxml2xmltest.c                                     | 1 +
 10 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 1a1e87ce31..59da540841 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4812,6 +4812,11 @@
               <ref name="hwbugstate"/>
             </element>
           </optional>
+          <optional>
+            <element name="ibs">
+              <ref name="hwbugstate"/>
+            </element>
+          </optional>
           <optional>
             <ref name="vmcoreinfo"/>
           </optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7aa6c7d134..867ba2465e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -155,6 +155,7 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
               "htm",
               "sbbc",
               "cfpc",
+              "ibs",
 );
 
 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
@@ -19365,6 +19366,7 @@ virDomainDefParseXML(xmlDocPtr xml,
 
         case VIR_DOMAIN_FEATURE_SBBC:
         case VIR_DOMAIN_FEATURE_CFPC:
+        case VIR_DOMAIN_FEATURE_IBS:
             if (!(tmp = virXMLPropString(nodes[i], "state"))) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                                _("missing state attribute '%s' of feature '%s'"),
@@ -21550,6 +21552,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDefPtr src,
 
         case VIR_DOMAIN_FEATURE_SBBC:
         case VIR_DOMAIN_FEATURE_CFPC:
+        case VIR_DOMAIN_FEATURE_IBS:
             if (src->features[i] != dst->features[i]) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                                _("State of feature '%s' differs: "
@@ -27094,6 +27097,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
 
             case VIR_DOMAIN_FEATURE_SBBC:
             case VIR_DOMAIN_FEATURE_CFPC:
+            case VIR_DOMAIN_FEATURE_IBS:
                 if (def->features[i] == VIR_DOMAIN_HWBUG_NONE)
                     break;
 
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 8f1d64b800..d595aad897 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1749,6 +1749,7 @@ typedef enum {
     VIR_DOMAIN_FEATURE_HTM,
     VIR_DOMAIN_FEATURE_SBBC,
     VIR_DOMAIN_FEATURE_CFPC,
+    VIR_DOMAIN_FEATURE_IBS,
 
     VIR_DOMAIN_FEATURE_LAST
 } virDomainFeature;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 70082cafd8..1f42fc367f 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7127,6 +7127,8 @@ virDomainFeatureToQEMUCaps(int feature)
         return QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC;
     case VIR_DOMAIN_FEATURE_CFPC:
         return QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC;
+    case VIR_DOMAIN_FEATURE_IBS:
+        return QEMU_CAPS_MACHINE_PSERIES_CAP_IBS;
     case VIR_DOMAIN_FEATURE_ACPI:
     case VIR_DOMAIN_FEATURE_APIC:
     case VIR_DOMAIN_FEATURE_PAE:
@@ -7161,6 +7163,8 @@ virDomainFeatureToMachineOption(int feature)
         return "cap-sbbc";
     case VIR_DOMAIN_FEATURE_CFPC:
         return "cap-cfpc";
+    case VIR_DOMAIN_FEATURE_IBS:
+        return "cap-ibs";
     case VIR_DOMAIN_FEATURE_ACPI:
     case VIR_DOMAIN_FEATURE_APIC:
     case VIR_DOMAIN_FEATURE_PAE:
@@ -7473,6 +7477,7 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
 
             case VIR_DOMAIN_FEATURE_SBBC:
             case VIR_DOMAIN_FEATURE_CFPC:
+            case VIR_DOMAIN_FEATURE_IBS:
                 if (def->features[i] == VIR_DOMAIN_HWBUG_NONE)
                     break;
 
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 2637c014e8..d2fb3f9d3c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3392,6 +3392,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def)
 
         case VIR_DOMAIN_FEATURE_SBBC:
         case VIR_DOMAIN_FEATURE_CFPC:
+        case VIR_DOMAIN_FEATURE_IBS:
             if (def->features[i] != VIR_DOMAIN_HWBUG_NONE &&
                 !qemuDomainIsPSeries(def)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
diff --git a/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml b/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml
index 1a59772341..2284e0eae2 100644
--- a/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml
+++ b/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml
@@ -12,6 +12,7 @@
     <htm state='on'/>
     <sbbc state='broken'/>
     <cfpc state='workaround'/>
+    <ibs state='fixed'/>
   </features>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
diff --git a/tests/qemuxml2argvdata/pseries-features.args b/tests/qemuxml2argvdata/pseries-features.args
index 7c4bf5a2ef..9529c38264 100644
--- a/tests/qemuxml2argvdata/pseries-features.args
+++ b/tests/qemuxml2argvdata/pseries-features.args
@@ -8,7 +8,7 @@ QEMU_AUDIO_DRV=none \
 -name guest \
 -S \
 -machine pseries,accel=tcg,resize-hpt=required,cap-htm=on,cap-sbbc=broken,\
-cap-cfpc=workaround \
+cap-cfpc=workaround,cap-ibs=fixed \
 -m 512 \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
diff --git a/tests/qemuxml2argvdata/pseries-features.xml b/tests/qemuxml2argvdata/pseries-features.xml
index a0a60a4917..af19079ab3 100644
--- a/tests/qemuxml2argvdata/pseries-features.xml
+++ b/tests/qemuxml2argvdata/pseries-features.xml
@@ -13,6 +13,7 @@
     <htm state='on'/>
     <sbbc state='broken'/>
     <cfpc state='workaround'/>
+    <ibs state='fixed'/>
   </features>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 86bf565f52..0778254ca8 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1901,6 +1901,7 @@ mymain(void)
             QEMU_CAPS_MACHINE_PSERIES_CAP_HTM,
             QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC,
             QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC,
+            QEMU_CAPS_MACHINE_PSERIES_CAP_IBS,
             QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
     DO_TEST_FAILURE("pseries-features",
                     QEMU_CAPS_MACHINE_OPT);
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 07f89291a0..d85e312ef8 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -768,6 +768,7 @@ mymain(void)
             QEMU_CAPS_MACHINE_PSERIES_CAP_HTM,
             QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC,
             QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC,
+            QEMU_CAPS_MACHINE_PSERIES_CAP_IBS,
             QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
 
     DO_TEST("pseries-serial-native",
-- 
2.14.3

--
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]

  Powered by Linux