From: Gavin Shan <gshan@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, pbonzini@redhat.com,
philmd@linaro.org, richard.henderson@linaro.org,
shan.gavin@gmail.com
Subject: Re: [PATCH 3/4] hw/arm/virt: Use kvm_arch_get_default_type()
Date: Fri, 9 Aug 2024 19:58:37 +1000 [thread overview]
Message-ID: <bc15d4c3-65f6-45cf-8069-71eabcb97fc5@redhat.com> (raw)
In-Reply-To: <CAFEAcA_bfBNFBeJ-cMS+KACaC6Sw2VAAdg_gb5xn6-TE5C-7nA@mail.gmail.com>
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
next prev parent reply other threads:[~2024-08-09 9:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 3:51 [PATCH 0/4] hw/arm/virt: Improve virt_kvm_type() Gavin Shan
2024-08-09 3:51 ` [PATCH 1/4] hw/arm/virt: hide virt_kvm_type() on !CONFIG_KVM Gavin Shan
2024-08-09 9:00 ` Peter Maydell
2024-08-09 9:39 ` Gavin Shan
2024-08-09 3:51 ` [PATCH 2/4] hw/arm/virt: Avoid multiple lines of comments in virt_kvm_type() Gavin Shan
2024-08-09 3:51 ` [PATCH 3/4] hw/arm/virt: Use kvm_arch_get_default_type() Gavin Shan
2024-08-09 8:59 ` Peter Maydell
2024-08-09 9:58 ` Gavin Shan [this message]
2024-08-09 10:01 ` Gavin Shan
2024-08-09 3:51 ` [PATCH 4/4] target/arm/kvm: Remove kvm_arm_get_max_vm_ipa_size() Gavin Shan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc15d4c3-65f6-45cf-8069-71eabcb97fc5@redhat.com \
--to=gshan@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shan.gavin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).