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 | 3 ++- tests/qemuxml2argvdata/pseries-features.xml | 1 + tests/qemuxml2argvtest.c | 1 + tests/qemuxml2xmltest.c | 1 + 10 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index eaec426121..1a1e87ce31 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4807,6 +4807,11 @@ <ref name="hwbugstate"/> </element> </optional> + <optional> + <element name="cfpc"> + <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 a112215560..7aa6c7d134 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -154,6 +154,7 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST, "vmcoreinfo", "htm", "sbbc", + "cfpc", ); VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST, @@ -19363,6 +19364,7 @@ virDomainDefParseXML(xmlDocPtr xml, break; case VIR_DOMAIN_FEATURE_SBBC: + case VIR_DOMAIN_FEATURE_CFPC: if (!(tmp = virXMLPropString(nodes[i], "state"))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("missing state attribute '%s' of feature '%s'"), @@ -21547,6 +21549,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDefPtr src, break; case VIR_DOMAIN_FEATURE_SBBC: + case VIR_DOMAIN_FEATURE_CFPC: if (src->features[i] != dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("State of feature '%s' differs: " @@ -27090,6 +27093,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, break; case VIR_DOMAIN_FEATURE_SBBC: + case VIR_DOMAIN_FEATURE_CFPC: if (def->features[i] == VIR_DOMAIN_HWBUG_NONE) break; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a907df7830..8f1d64b800 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1748,6 +1748,7 @@ typedef enum { VIR_DOMAIN_FEATURE_VMCOREINFO, VIR_DOMAIN_FEATURE_HTM, VIR_DOMAIN_FEATURE_SBBC, + VIR_DOMAIN_FEATURE_CFPC, VIR_DOMAIN_FEATURE_LAST } virDomainFeature; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1d781d1abd..70082cafd8 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7125,6 +7125,8 @@ virDomainFeatureToQEMUCaps(int feature) return QEMU_CAPS_MACHINE_PSERIES_CAP_HTM; case VIR_DOMAIN_FEATURE_SBBC: return QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC; + case VIR_DOMAIN_FEATURE_CFPC: + return QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC; case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_APIC: case VIR_DOMAIN_FEATURE_PAE: @@ -7157,6 +7159,8 @@ virDomainFeatureToMachineOption(int feature) return "cap-htm"; case VIR_DOMAIN_FEATURE_SBBC: return "cap-sbbc"; + case VIR_DOMAIN_FEATURE_CFPC: + return "cap-cfpc"; case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_APIC: case VIR_DOMAIN_FEATURE_PAE: @@ -7468,6 +7472,7 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, break; case VIR_DOMAIN_FEATURE_SBBC: + case VIR_DOMAIN_FEATURE_CFPC: if (def->features[i] == VIR_DOMAIN_HWBUG_NONE) break; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 38059215c6..2637c014e8 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3391,6 +3391,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def) break; case VIR_DOMAIN_FEATURE_SBBC: + case VIR_DOMAIN_FEATURE_CFPC: 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 0a6fcedc0c..1a59772341 100644 --- a/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml +++ b/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml @@ -11,6 +11,7 @@ <hpt resizing='enabled'/> <htm state='on'/> <sbbc state='broken'/> + <cfpc state='workaround'/> </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 7c9b803af9..7c4bf5a2ef 100644 --- a/tests/qemuxml2argvdata/pseries-features.args +++ b/tests/qemuxml2argvdata/pseries-features.args @@ -7,7 +7,8 @@ QEMU_AUDIO_DRV=none \ /usr/bin/qemu-system-ppc64 \ -name guest \ -S \ --machine pseries,accel=tcg,resize-hpt=required,cap-htm=on,cap-sbbc=broken \ +-machine pseries,accel=tcg,resize-hpt=required,cap-htm=on,cap-sbbc=broken,\ +cap-cfpc=workaround \ -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 273f74c285..a0a60a4917 100644 --- a/tests/qemuxml2argvdata/pseries-features.xml +++ b/tests/qemuxml2argvdata/pseries-features.xml @@ -12,6 +12,7 @@ <hpt resizing='required'/> <htm state='on'/> <sbbc state='broken'/> + <cfpc state='workaround'/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 284cb7fb68..86bf565f52 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1900,6 +1900,7 @@ mymain(void) QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC, + QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC, 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 a063e8a7a3..07f89291a0 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -767,6 +767,7 @@ mymain(void) QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC, + QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC, 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