From: Auger Eric <eric.auger@redhat.com>
To: Andrew Jones <drjones@redhat.com>,
qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, pbonzini@redhat.com, maz@kernel.org
Subject: Re: [PATCH v2 1/2] accel: kvm: Fix kvm_type invocation
Date: Wed, 10 Mar 2021 15:19:58 +0100 [thread overview]
Message-ID: <f35899be-38f7-8648-fe65-d0555a4001de@redhat.com> (raw)
In-Reply-To: <20210310135218.255205-2-drjones@redhat.com>
Hi Drew,
On 3/10/21 2:52 PM, Andrew Jones wrote:
> Prior to commit f2ce39b4f067 a MachineClass kvm_type method
> only needed to be registered to ensure it would be executed.
> With commit f2ce39b4f067 a kvm-type machine property must also
> be specified. hw/arm/virt relies on the kvm_type method to pass
> its selected IPA limit to KVM, but this is not exposed as a
> machine property. Restore the previous functionality of invoking
> kvm_type when it's present.
Ouch, good catch for this regression
>
> Fixes: f2ce39b4f067 ("vl: make qemu_get_machine_opts static")
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
> accel/kvm/kvm-all.c | 2 ++
> include/hw/boards.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
> index f88a52393fe0..37b0a1861e72 100644
> --- a/accel/kvm/kvm-all.c
> +++ b/accel/kvm/kvm-all.c
> @@ -2068,6 +2068,8 @@ static int kvm_init(MachineState *ms)
> "kvm-type",
> &error_abort);
> type = mc->kvm_type(ms, kvm_type);
> + } else if (mc->kvm_type) {
> + type = mc->kvm_type(ms, NULL);
> }
>
> do {
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index a46dfe5d1a6a..327949967609 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -128,6 +128,7 @@ typedef struct {
> * @kvm_type:
> * Return the type of KVM corresponding to the kvm-type string option or
> * computed based on other criteria such as the host kernel capabilities.
> + * kvm-type may be NULL if it is not needed.
> * @numa_mem_supported:
> * true if '--numa node.mem' option is supported and false otherwise
> * @smp_parse:
>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Eric
next prev parent reply other threads:[~2021-03-10 14:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 13:52 [PATCH v2 0/2] hw/arm/virt: KVM: Set IPA limit when possible Andrew Jones
2021-03-10 13:52 ` [PATCH v2 1/2] accel: kvm: Fix kvm_type invocation Andrew Jones
2021-03-10 14:19 ` Auger Eric [this message]
2021-03-10 13:52 ` [PATCH v2 2/2] hw/arm/virt: KVM: The IPA lower bound is 32 Andrew Jones
2021-03-10 14:58 ` Auger Eric
2021-03-11 9:59 ` Marc Zyngier
2021-03-12 12:47 ` [PATCH v2 0/2] hw/arm/virt: KVM: Set IPA limit when possible Peter Maydell
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=f35899be-38f7-8648-fe65-d0555a4001de@redhat.com \
--to=eric.auger@redhat.com \
--cc=drjones@redhat.com \
--cc=maz@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).