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

Daniel Henrique Barboza danielhb413 at gmail.com
Mon Feb 21 20:05:45 UTC 2022



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 at redhat.com>
>> Signed-off-by: Daniel Henrique Barboza <danielhb413 at 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.


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 at redhat.com>
> 
> Jano




More information about the libvir-list mailing list