qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] hw/arm/virt: Use kvm_arch_get_default_type()


From: Gavin Shan
Subject: Re: [PATCH 3/4] hw/arm/virt: Use kvm_arch_get_default_type()
Date: Fri, 9 Aug 2024 19:58:37 +1000
User-agent: Mozilla Thunderbird

On 8/9/24 6:59 PM, Peter Maydell wrote:
On Fri, 9 Aug 2024 at 04:52, Gavin Shan <gshan@redhat.com> wrote:

kvm_arch_get_default_type() and kvm_arm_get_max_vm_ipa_size() are
interchangeable since the type is equivalent to IPA size (bits)
with one exception that IPA size (bits) is 40 when the type is zero.

Well, sort of, but they're conceptually different.

kvm_arch_get_default_type() is the API for "give me the value
I need to pass to kvm_ioctl(s, KVM_CREATE_VM, type)"; it's
architecture independent and different architectures do
different things. In the future Arm might need to do something
other than "just pass in the IPA size".

kvm_arm_get_max_vm_ipa_size() does exactly what it says on the
tin: it is an Arm specific function that returns the maximum
supported IPA size.

I would prefer not to conflate the two.


Agreed. Thanks for the explanation. Lets keep them separate and ignore
this series.

By the way, mc->kvm_type() can be used if one machine (platform) needs
to do more things than kvm_arch_get_default_type(), similar to what we're
doing on 'virt' machine currently.

Thanks,
Gavin







reply via email to

[Prev in Thread] Current Thread [Next in Thread]