All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Luc Michel" <luc@lmichel.fr>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-trivial@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>,
	qemu-devel@nongnu.org,
	Andrew Baumann <Andrew.Baumann@microsoft.com>,
	Laurent Vivier <laurent@vivier.eu>,
	qemu-arm@nongnu.org
Subject: Re: [RFC PATCH 2/2] hw/arm/raspi: Restrict BCM2835 / BCM2836 SoC to TCG
Date: Mon, 1 Feb 2021 10:04:27 +0100	[thread overview]
Message-ID: <2e21d938-20e3-1595-b1aa-6fc2eff087e8@redhat.com> (raw)
In-Reply-To: <337e9fe1-3d84-83a7-20b1-d64aa5125e7c@amsat.org>

On 01/02/21 09:46, Philippe Mathieu-Daudé wrote:
>>> +#ifdef CONFIG_TCG
>> I'm not sure it's enough. TCG and KVM can be enabled in the same
>> binary. You'll have to perform a runtime check here I think.
> If TCG is enabled, all SoC are built in (regardless of KVM enabled).
> If only KVM is enabled, the TCG part is not built in (only ARMv8
> based SoC left).
> 
> The problem is when QOM types are registered, we can not know
> yet if the accelerator is enabled, because accelerators are also
> QOM types and are realized later. So at this point runtime check
> is not possible. See this post:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg777761.html
> 

The check should be done on the CPU type, not on the accelerator.

On top of that you could add a "depends on TCG" to the hw/arm/Kconfig 
file, but Luc is correct that it would be just a nice-to-have and not 
the real fix.

Paolo



  reply	other threads:[~2021-02-01  9:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31 15:14 [RFC PATCH 0/2] hw/arm/raspi: Restrict BCM2835 / BCM2836 SoC to TCG Philippe Mathieu-Daudé
2021-01-31 15:14 ` [RFC PATCH 1/2] hw/arm/raspi: Trivial code movement Philippe Mathieu-Daudé
2021-02-01  8:09   ` Luc Michel
2021-01-31 15:14 ` [RFC PATCH 2/2] hw/arm/raspi: Restrict BCM2835 / BCM2836 SoC to TCG Philippe Mathieu-Daudé
2021-02-01  8:18   ` Luc Michel
2021-02-01  8:46     ` Philippe Mathieu-Daudé
2021-02-01  9:04       ` Paolo Bonzini [this message]
2021-02-02 12:28     ` Peter Maydell
2021-02-02 13:29       ` Philippe Mathieu-Daudé
2021-02-02 13:47         ` Peter Maydell
2021-02-02 14:26           ` Philippe Mathieu-Daudé
2021-02-02 12:25 ` [RFC PATCH 0/2] " 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=2e21d938-20e3-1595-b1aa-6fc2eff087e8@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Andrew.Baumann@microsoft.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=imammedo@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=luc@lmichel.fr \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.