Re: QEMU-KVM offers OPAL firmware interface? OpenBSD guest support?

David Gibson <[email protected]> Tue, 31 Aug 2021 10:45:21 +1000
Newsgroups gmane.comp.emulators.qemu,gmane.os.openbsd.ppc
Message-ID <YS17oUzgIY0TIjzT@yekko>
On Mon, Aug 30, 2021 at 06:04:31PM +0200, Michal Suchánek wrote:
> On Mon, Aug 30, 2021 at 04:57:21PM +1000, David Gibson wrote:
> > On Sun, Aug 29, 2021 at 04:09:54AM +0000, Joseph wrote:
> > > Hi Mark, Cédric, Greg at the openbsd-ppc ML,
> 
> > 
> > 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).
> 
> Hello,
> 
> what is stopping powernv support other than lack of firmware
> support?

The virtualization features of the CPU simply aren't designed to do
full virtualization, only para-virtualization (which is what PAPR
is).  A guest in the POWER model is *aware* that it doesn't have
hypervisor privilege, but a powernv OS expects to have hypervisor
privilege.

I don't know that it's strictly impossible to provide a virtualized
powernv environment.  Specifically, it might be possible to take an
approach similar to KVM PR at a higher level: run the guest in
supervisor mode, but trap and emulate all hypervisor privileged
instructions.  However, I'm not certain that all the things that need
to be trapped do in fact trap, it would require a bunch of careful
research.  Even if it's possible, it would be a big job: essentially a
completely new KVM implementation.

> Doesn't PowerVM use teh very same vrtualization features that KVM
> does?

Yes, that's exactly the point.  The (para-)virtualized guest
environment provided by both PowerVM and KVM is PAPR (the "pseries"
machine type in qemu terms).  "powernv" is the bare metal,
hypervisor-privileged, host environment (that's even where the name
comes from "POWER Non Virtualized").

-- 
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmEte58ACgkQbDjKyiDZ
s5I+RxAAxy/flmcF+SM88zIhn/4uAkBk/YVtloFHi1ZtinCxDlt6sCTOJfh/7VQc
tz07nqoE34uTblwbw1bi1LDYsP8YcCA1O5IK0tXqGJE9XfwHy1Oi5lNUTfU8lupF
62vWiLPyglXcZGcYuw4fpe0tU5aKQIgveIL7fYM3LRMN4dezW/QxhZDNrdPHsb1b
+IUzuAZ0662lbBAAUfCFU5fXwhegMzQ2WN51DvFSl06i05746eCRa0PfHcZVVYXz
PpqIOExxiYK4k93tDnDppK/z4w9kfmooWPhHlq7tgn6twHL5TBy2tN10ID0LgkR0
x83jNz5sBM0l6nTFQx7yWfRVWD6om4tSbcLDeO3zYjlrgBvzqDAPGNhEZlNOPqrp
ind1DK5jHgcGTdiL5bKVKvxil0RNIsImdUnrsGmCDUYHeOhB/SdNnkExs0IudiGF
emshdICFoch54I69kyBF/FOEuyVRhtO6C+CmiHnOQAsinrDBiHrKmpsBRJUV28Jl
4sxDIEPm8Laat4uP6bp9rf8T5HjG2ZhqISOl8xlZ1x+yg5jRUkC3KHLqWlrJyO1O
jm+IP/y0RhS9jl+AyIRELBPQ29or5PElbP++Z34sGBWvN5MbbJ4xdILqxuSbXji8
I/oPd0ZadvYvUGh8q3dr6TuIzXMYt/EW0MWMEkOrEAVvqeci4Kg=
=UwvP
-----END PGP SIGNATURE-----