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