Re: [PATCH v2 01/29] qemu_domain.c: add PowerNV machine helpers

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

 





On 2/21/22 09:47, Ján Tomko wrote:
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/

I think I've been using capital L for a long time now. I'll make sure to pay
attention next time.



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 <pkrempa@xxxxxxxxxx>
Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
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.


True. I removed the comment.


Thanks,


Daniel


+ */
+bool
+qemuDomainIsPowerNV(const virDomainDef *def)
+{
+    if (STRPREFIX(def->os.machine, "powernv"))
+        return true;
+
+    return false;
+}
+
+

Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano




[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