All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	Sergio Lopez <slp@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Cameron Esfahani <dirty@apple.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>,
	Alexander Graf <agraf@csgraf.de>, qemu-arm <qemu-arm@nongnu.org>,
	Frank Yang <lfy@google.com>, Paolo Bonzini <pbonzini@redhat.com>,
	Peter Collingbourne <pcc@google.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: [PATCH v12 00/10] hvf: Implement Apple Silicon Support
Date: Sat, 25 Sep 2021 19:09:56 +0100	[thread overview]
Message-ID: <CAFEAcA-hxM3b-zS2s8FbWG=SogNdp+o=X1K45kYqXK=OhBCUbg@mail.gmail.com> (raw)
In-Reply-To: <2db79dcb-feba-4175-6805-5b365b30d819@amsat.org>

On Sat, 25 Sept 2021 at 18:22, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> So this part of Xilinx Versal:
>
>      * When loading an OS, we turn on QEMU's PSCI implementation with SMC
>      * as the PSCI conduit. When there's no -kernel, we assume the user
>      * provides EL3 firmware to handle PSCI.
>      */
>     if (machine->kernel_filename) {
>         psci_conduit = QEMU_PSCI_CONDUIT_SMC;
>     }
>
> abuses the fact that -kernel command line expect a *Linux* kernel able
> to read the provided dtb which describe SMC. >This won't work if we
> manually provide a crafted dtb with another conduit

...which is not a supported thing to do (it won't work with the
'virt' board either)...

>, or if we pass any
> other binary (not Linux, not particularly ELF, since -kernel can load
> many formats).

-kernel means "assume I am a Linux kernel and boot me accordingly".
Sometimes it works for other things, but there are no guarantees.
Among other things it always means "start me at EL2 or EL1, not EL3",
so PSCI handling via SMC doesn't get in anybody's way even if they're
not using it. (People who want a pure "load this ELF file" should
use the generic-loader.)

The basic distinction the versal-virt board is making here is
"we have EL3 firmware to run in the guest" vs "we don't";
for the same reason that the virt board does, in the former
case we disable QEMU's internal PSCI implementation, and in
the latter we enable it. In theory the orangepi board code
should do the same, because if we're really running guest
code at EL3 it probably is going to assume it has SMC, and
QEMU taking control instead is going to confuse it.

-- PMM


      reply	other threads:[~2021-09-25 18:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 15:53 [PATCH v12 00/10] hvf: Implement Apple Silicon Support Alexander Graf
2021-09-16 15:53 ` [PATCH v12 01/10] arm: Move PMC register definitions to internals.h Alexander Graf
2021-09-16 15:53 ` [PATCH v12 02/10] hvf: Add execute to dirty log permission bitmap Alexander Graf
2021-09-16 15:53 ` [PATCH v12 03/10] hvf: Introduce hvf_arch_init() callback Alexander Graf
2021-09-16 15:53 ` [PATCH v12 04/10] hvf: Add Apple Silicon support Alexander Graf
2021-09-21 15:30   ` Peter Maydell
2021-09-21 17:05     ` Alexander Graf
2023-11-30 14:17   ` Philippe Mathieu-Daudé
2023-12-01  9:40     ` Alexander Graf
2021-09-16 15:53 ` [PATCH v12 05/10] arm/hvf: Add a WFI handler Alexander Graf
2021-09-16 15:54 ` [PATCH v12 06/10] hvf: arm: Implement -cpu host Alexander Graf
2021-09-16 16:08   ` Philippe Mathieu-Daudé
2021-09-20  9:19     ` Peter Maydell
2021-09-16 15:54 ` [PATCH v12 07/10] hvf: arm: Implement PSCI handling Alexander Graf
2021-09-16 15:54 ` [PATCH v12 08/10] arm: Add Hypervisor.framework build target Alexander Graf
2021-09-16 15:54 ` [PATCH v12 09/10] hvf: arm: Add rudimentary PMC support Alexander Graf
2021-09-16 15:54 ` [PATCH v12 10/10] arm: tcg: Adhere to SMCCC 1.3 section 5.2 Alexander Graf
2021-09-27 10:45   ` Peter Maydell
2021-09-20 10:11 ` [PATCH v12 00/10] hvf: Implement Apple Silicon Support Peter Maydell
2021-09-20 13:15   ` Peter Maydell
2021-09-20 16:17     ` Philippe Mathieu-Daudé
2021-09-20 20:21       ` Alexander Graf
2021-09-21  9:29         ` Philippe Mathieu-Daudé
2021-09-21 13:30           ` Alexander Graf
2021-09-25 17:22             ` Philippe Mathieu-Daudé
2021-09-25 18:09               ` Peter Maydell [this message]

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='CAFEAcA-hxM3b-zS2s8FbWG=SogNdp+o=X1K45kYqXK=OhBCUbg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=agraf@csgraf.de \
    --cc=dirty@apple.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=lfy@google.com \
    --cc=pbonzini@redhat.com \
    --cc=pcc@google.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    --cc=richard.henderson@linaro.org \
    --cc=slp@redhat.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 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.