Some updated notes on KVMPPC


A couple quick notes on KVMPPC that came out of the last article on Mac OS 9 in QEMU:

  • If you get a kernel Oops when unloading kvm_hv, you are bitten by this bug which should be fixed in recent kernel releases. (Thanks, Paul Mackerras.)

  • However, you don't have to do that anymore to use KVM-PR anyway. With QEMU 4.2 (at least on this Talos II running Fedora 31), if you use qemu-system-ppc64 with -M accel=kvm and explicitly specify a CPU which requires KVM-PR (such as, in our previous articles, a Motorola G4/7410 with -cpu nitro), then it will be used without having to unload KVM-HV. In the examples in the second half of the article, just change qemu-system-ppc to qemu-system-ppc64 and it will now "just work" (otherwise you'll get a weird error trying to start QEMU). That is, of course, assuming you have your kernel in HPT mode instead of radix, which is the default on POWER9.

  • Likewise, if you specify -cpu host (or power8 on a POWER9), KVM-HV should be used automatically, though you can explicitly specify you want HV with -M accel=kvm,kvm-type=HV as in our AIX on OpenPOWER example. Just don't tell IBM.

If you don't understand what all that meant, read our original article for a brief primer.

Comments

  1. Thanks, that clarifies it a lot. I would've responded back, but I was trying to track down why using mac99 as the machine was always crashing my BB, and if that was just a GPU error (I use a Radeon RX560 for low power but better than the integrated graphics) or if it was actually locking up. Serial was also refusing to respond, so I wasn't getting great output, and the two firmware impressed things only got me to figuring out that an invalid register access was there.
    qemu-system-ppc64 -M mac99,accel=kvm -cpu nitro
    just instantly works without crashing, so this is pretty great.

    ReplyDelete
  2. Interesting.

    Out of curiosity, have you ever gotten around to trying MorphOS, or AmigaOS, with QEMU/KVM, on POWER9, or seeing if the PowerPC version of Windows NT, or Solaris can run, considering that they used the little-endian mode, of older CPUs?

    ReplyDelete
    Replies
    1. Keep in mind that the older CPUs that offered a "little endian" mode was only with respect to external devices. The only true little-endian Power Architecture systems are OpenPOWER, and only if run in that mode.

      That said, I've run MorphOS under QEMU, but at the time it didn't like KVM much. I can't imagine AmigaOS would be much better. Those, at least, run something approaching a G4. The PPC WinNT and Solaris expect 60x series chips and I don't know if KVM-PR's support for that is tested to any reasonable extent. I do have NT 4.0 universal around here somewhere ...

      Delete
    2. Windows NT for PPC requires a specific boot ROM that is very rough to obtain, and even rougher to run under QEMU. See https://www.flamingspork.com/blog/2016/10/30/windows-nt4-for-powerpc-guest-on-opal-on-power8-in-qemu/ for more.

      Delete

Post a Comment

Comments are subject to moderation. Be nice.