The Perfomance Monitoring Unit (PMU) feature is not available for
the Power architecture. The "<pmu/>" feature will always have a value
'on' or 'off' after saving the domain XML, and both will be rejected
by QEMU when launching. This is the error message for
"<pmu state='on'/>":
qemu-kvm: can't apply global host-powerpc64-cpu.pmu=on: Property '.pmu' not
found
A similar error message is thrown for "<pmu state='off'/>".
This patch prevents the pseries guest from launching with any
pmu setting with a more informative error message:
error: unsupported configuration: The 'pmu' feature is not
supported for architecture 'ppc64' or machine type 'pseries'
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/qemu/qemu_domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c67abec778..2e5f987a04 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -5282,6 +5282,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def,
break;
case VIR_DOMAIN_FEATURE_PVSPINLOCK:
+ case VIR_DOMAIN_FEATURE_PMU:
if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
ARCH_IS_PPC64(def->os.arch)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@@ -5301,7 +5302,6 @@ qemuDomainDefValidateFeatures(const virDomainDef *def,
case VIR_DOMAIN_FEATURE_PRIVNET:
case VIR_DOMAIN_FEATURE_HYPERV:
case VIR_DOMAIN_FEATURE_CAPABILITIES:
- case VIR_DOMAIN_FEATURE_PMU:
case VIR_DOMAIN_FEATURE_MSRS:
case VIR_DOMAIN_FEATURE_LAST:
break;
--
2.25.1