qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Joseph <joseph.mayer@protonmail.com>
Cc: pjp@centroid.eu, gardask@gmail.com, rgcinjp@disroot.org,
	daniel@pocock.pro, "QEMU Developers" <qemu-devel@nongnu.org>,
	"Greg Kurz" <groug@kaod.org>,
	kite@centroid.eu, qemu-ppc@nongnu.org,
	"Cédric Le Goater" <clg@kaod.org>,
	siliconbadger@protonmail.com, "ppc@openbsd.org" <ppc@openbsd.org>,
	"Mark Kettenis" <mark.kettenis@xs4all.nl>
Subject: Re: QEMU-KVM offers OPAL firmware interface? OpenBSD guest support?
Date: Mon, 30 Aug 2021 16:57:21 +1000	[thread overview]
Message-ID: <YSyBUSxBiH+UYE/Y@yekko> (raw)
In-Reply-To: <3QoYEEZauH3xXwC2NcJFnrHe4IaWwu2fqEvtR6tR3RHsY_b0bsyz0oQdcI0b1zdwnXbXhl6bCtaUiyWQjbYgnx5U-Ov_Lm3tMGdMkTwZC88=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 3435 bytes --]

On Sun, Aug 29, 2021 at 04:09:54AM +0000, Joseph wrote:
> Hi Mark, Cédric, Greg at the openbsd-ppc ML,
> 
> It is great to talk to you. Thank you for taking on the conversation.
> 
> Right, OpenBSD implements powernv meaning it runs on bare metal on
> Power9, that is great.
> 
> What I wanted to ask about with this thread is:
> 
> To have the same utility of Power9 as of AMD64, it would be great to
> have a high speed virtualizer, like what OpenBSD's VMM or Linux' KVM-
> QEMU accomplish on AMD64.
> 
> Linux KVM-QEMU supports Power9 already so that's a great start: One
> runs Linux powernv bare metal on Power9 hardware. Each VM is a
> KVM-QEMU instance.
> 
> Is there any way today to make Linux-KVM-QEMU as VM host run
> OpenBSD as a high speed (say >90% of bare metal performance, here
> presume KVM uses PCIe passthrough) VM guest -

I'm afraid this is more or less impossible, without adding
PAPR/pseries support to OpenBSD.  The fundamental problem is that the
virtualization facilities on the POWER chip don't really allow
efficient full hardware virtualization, only para-virtualization and
PAPR is that para-virtualized environment.

That's why the "powernv" machine type doesn't utilize KVM and is fully
emulated and therefore slow.  It might be possible to use the
"powernv" machine type with the "PR" implementation of KVM - that's a
KVM implementation which works by running the entire guest in
userspace and emulating all privileged instructions.  But:

 * KVM PR doesn't currently work properly on POWER9, and getting it
   working would be a significant amount of work
 * The way KVM PR works means it's very fiddly to get right, so it's
   unlikely to ever be suitable for production work
 * Depending on host and guest cpu models there might be a few corner
   cases it can never get exactly right
 * KVM PR will never be all that fast, although it will be
   significantly faster than full emulation

> From the discussion I gather it's not possible without OpenBSD being
> extended with pseries mode support, is it so?

Essentially yes.  The situation is different from x86.  On x86 the
bare metal PC platform was the original "normal" one, and then that
platform was made possible as a virtual guest.  There were some
alternative paravirtualized guest platforms (notably XenPV) but they
never really caught on.

On POWER, the paravirtualized PAPR platform was the original "normal"
one, as provided by PowerVM, which was included in the POWER
firmware.  Then bare metal machines became available and the powernv
platform was created.  KVM kept the same paravirtualized PAPR platform
for the guest as PowerVM used for compatibility, rather than inventing
a new one.

> (Great to see that Power hardware is on par with or faster than AMD64,
> so the hardware part of this equation is clearly there: Power10 is
> advertised to be released late this year, lithography will be down
> from 14nm to 7, they say performance will 3x and electricity 1/3.)

So.. if you want to run OpenBSD on POWER10 you will definitely need
PAPR support, because POWER10 won't support bare metal OS access at
all (it will be back to PowerVM always, like POWER5..POWER7).

-- 
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 --]

  parent reply	other threads:[~2021-08-30  7:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7r8MLHEKQicVkfT4tQLsiRXQmt_800XbV1s0mM_QJTgOY7XadpiRcD4HizmXByPaZRsMQV2WbNKDfKU-PdVo3ZO9JC6fJ0MF5LM_j5a2fgA=@protonmail.com>
     [not found] ` <20210827170113.5f4ed260@bahia.lan>
     [not found]   ` <HgtFZEnabNjIrsVI3x8MYs2QYSCG4IFStP0MR3qwPWBmXW9kDmQmIwQEWHMVdJbUCu-XvHdMpZGe3pr-B91s1D7y6cn9SVzhxEYms5c3p0o=@protonmail.com>
     [not found]     ` <20210827180259.3720d58d@bahia.lan>
     [not found]       ` <56141ff67838992a@bloch.sibelius.xs4all.nl>
     [not found]         ` <20210827190053.6c68def5@bahia.lan>
     [not found]           ` <25bfa81c-9498-4e82-a848-1fbb1c188ff1@kaod.org>
     [not found]             ` <561422a20e4f9ae2@bloch.sibelius.xs4all.nl>
2021-08-28 11:06               ` QEMU-KVM offers OPAL firmware interface? OpenBSD guest support? Cédric Le Goater
2021-08-29  4:09                 ` Joseph
2021-08-29  4:20                   ` Joseph
2021-08-30  6:26                     ` Cédric Le Goater
2021-08-30  6:57                   ` David Gibson [this message]
2021-08-30 15:44                     ` BALATON Zoltan
2021-08-31  0:27                       ` David Gibson
2021-08-31 15:12                         ` Fabiano Rosas
2021-08-30 16:04                     ` Michal Suchánek
2021-08-31  0:45                       ` David Gibson
2021-08-31  7:42                       ` Cédric Le Goater
2021-08-31  9:56                         ` 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=YSyBUSxBiH+UYE/Y@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=daniel@pocock.pro \
    --cc=gardask@gmail.com \
    --cc=groug@kaod.org \
    --cc=joseph.mayer@protonmail.com \
    --cc=kite@centroid.eu \
    --cc=mark.kettenis@xs4all.nl \
    --cc=pjp@centroid.eu \
    --cc=ppc@openbsd.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rgcinjp@disroot.org \
    --cc=siliconbadger@protonmail.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).