]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: make Hyperv settings exclusive to x86 and aarch64
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Tue, 24 Mar 2020 17:33:23 +0000 (14:33 -0300)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 25 Mar 2020 13:55:18 +0000 (14:55 +0100)
commitf1ea75233b6f460ed13d6f2dbb849c91e85e5f48
tree9267502dd0898c99ae3b013ac313e74df6cf0882
parentda7485c54eb2bf5b1635e67ba2ae4b5323d97a88
qemu: make Hyperv settings exclusive to x86 and aarch64

Hyperv features are supported by both x86 and aarch64. The <hyperv/>
declaration in the XML by itself is benign to other architectures,
but any of its 14 current features will break QEMU with an error
like this (from ppc64):

qemu-kvm: Expected key=value format, found hv_relaxed

This is a more extreme case than the one for apic eoi because we
would need an extra 'switch' statement, with all current Hyperv
features in the body of qemuDomainDefValidateFeatures(), to
check if the user attempted to activate any of them. It's easier to
simply fail to launch with any 'hyperv' declaration in the XML for
every arch which is not x86 and aarch64.

A fair disclaimer about Windows and PowerPC: the last Windows version
that ran in the architecture is the hall of famer Windows NT 4.0,
launched in 1996 and with end of extended support for the Server
version in 2004 [1]. I am acknowledging that there might be Windows
NT 4.0 users running in PowerPC, but not enough people running it
under KVM/QEMU to justify Libvirt allowing 'hyperv' to exist in the
domain XML of ppc64 domains.

[1] https://en.wikipedia.org/wiki/Windows_NT_4.0

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_domain.c