On a Tuesday in 2022, Daniel Henrique Barboza wrote:
The PowerNV (Power Non-Virtualized) QEMU ppc64 machine is the emulation of a bare-metal IBM Power host. It follows the OPAL (OpenPower Abstration Layer) API/ABI, most specifically Skiboot [1]. For now, Libvirt has support for the pSeries QEMU machine, which is the emulation
s/Libvirt/libvirt/
of a logical partition (guest) that would run on top of a bare-metal system. This patch introduces the helpers that are going to be used to add a basic support for PowerNV domains in Libvirt. Given that there are quite
s/Libvirt/libvirt/
a few similarities in how pSeries and PowerNVv should be handled, we're also adding a 'qemuDomainIsPowerPC' helper that will be used in those instances. [1] https://open-power.github.io/skiboot/doc/overview.html Reviewed-by: Peter Krempa <pkre...@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb...@gmail.com> --- src/qemu/qemu_domain.c | 41 +++++++++++++++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 4 ++++ 2 files changed, 45 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index aa8f6b8d05..2e21a95f38 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8719,6 +8719,47 @@ qemuDomainIsPSeries(const virDomainDef *def) } +/* + * The PowerNV machine does not support KVM acceleration in Power + * hosts.
We can skip the usual ARCH_IS_PPC64() since this machine + * is usable with TCG in all host archs.
I don't understand the comment. We use these ARCH_ macros to check the guest arch, not the host arch. So the check should be here too.
+ */ +bool +qemuDomainIsPowerNV(const virDomainDef *def) +{ + if (STRPREFIX(def->os.machine, "powernv")) + return true; + + return false; +} + +
Reviewed-by: Ján Tomko <jto...@redhat.com> Jano
signature.asc
Description: PGP signature