[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: |
Peter Maydell |
|
Subject: |
Re: [PATCH 3/4] hw/arm/virt: Use kvm_arch_get_default_type() |
|
Date: |
Fri, 9 Aug 2024 09:59:52 +0100 |
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.
thanks
-- PMM