From: David Gibson <david@gibson.dropbear.id.au>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH qemu v14] spapr: Implement Open Firmware client interface
Date: Tue, 9 Mar 2021 16:33:25 +1100 [thread overview]
Message-ID: <YEcIpeA/MfvKfwwZ@yekko.fritz.box> (raw)
In-Reply-To: <8bb2465d-9353-ca99-d98a-d91416d7f527@eik.bme.hu>
[-- Attachment #1: Type: text/plain, Size: 2457 bytes --]
On Tue, Mar 02, 2021 at 10:37:59AM +0100, BALATON Zoltan wrote:
> On Tue, 2 Mar 2021, Alexey Kardashevskiy wrote:
> > On 02/03/2021 14:35, David Gibson wrote:
> > > Alexey or Zoltan, any thoughts on how non-PAPR versions of this would
> > > call into qemu to get the non-guest parts of VOF to execute?
> >
> > Non-PAPR could do it as we do it for soft breakpoints in KVM - some
> > predefined illegal instruction which KVM knows that it is used for soft
> > breakpoints.
>
> So far I've thought I'd need to implement TYPE_PPC_VIRTUAL_HYPERVISOR
> interface in the machine for the code in target/ppc/excp_helper.c to forward
> client syscalls to QEMU where I could handle the VOF related calls but not
> sure this is the best way.
I'm not sure that will work on its own. VIRTUAL_HYPERVISOR just traps
the "sc 1" (hypecall instruction). If that's an illegal instruction
for CPU, we can theoretically still use it, but I suspect TCG will
flag it as an illegal instruction and trap before we even get to the
VIRTUAL_HYPERVISOR dispatch point. You'll need to investigate.
> This could be OK for the initial boot when
> nothing else should use syscalls yet but with RTAS this may not work as the
> guest OS could also use syscalls so to avoid conflicts we may need to shut
> down the virtual hypervisor on quiesce
Uh.. no. VIRTUAL_HYPERVISOR doesn't intercept normal system calls,
only "level 1" system calls which are explicitly designated for
hypercalls.
> which means I may need a minimal
> guest only rtas for pegasos2 (which would be OK as I think it's only used
> for shutdown/reboot anyway). Also may need some changes to allow empty
> callbacks in vhyp to be ignored when I only want to implement hypercall
> method but that's just adding checks to only call non-NULL callbacks in
> PPCVirtualHypervisorClass.
>
> There's also an old patch from Benjamin Herrenschmidt to add MOL OSI which
> is a similar hypercall interface:
> https://github.com/ozbenh/qemu/commit/6dc8803641e323030ffd01ad8ce0dcf081896698
> This might also be useful later to use MOL paravirtual drivers to speed up
> MacOSX emulation. but I haven't looked at the details yet.
>
> Any other ideas?
>
> Regards,
> BALATON Zoltan
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-03-09 5:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 5:41 [PATCH qemu v14] spapr: Implement Open Firmware client interface Alexey Kardashevskiy
2021-02-24 5:48 ` no-reply
2021-03-02 2:17 ` David Gibson
2021-03-02 3:35 ` David Gibson
2021-03-02 7:21 ` Alexey Kardashevskiy
2021-03-02 9:37 ` BALATON Zoltan
2021-03-09 5:33 ` David Gibson [this message]
2021-03-09 5:29 ` David Gibson
2021-03-09 7:28 ` Alexey Kardashevskiy
2021-03-09 14:00 ` BALATON Zoltan
2021-03-10 1:55 ` Alexey Kardashevskiy
2021-03-10 2:40 ` David Gibson
2021-03-10 4:52 ` Alexey Kardashevskiy
2021-03-10 4:11 ` David Gibson
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=YEcIpeA/MfvKfwwZ@yekko.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--cc=balaton@eik.bme.hu \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).