Documentation/Platforms/POWER

From QEMU
Revision as of 11:30, 1 April 2016 by Huth (talk | contribs) (Add some information about running pseries guests on QEMU)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page lists some information about running POWER Linux guests with QEMU (aka. sPAPR / pSeries / System p guests). You can select this machine type by running qemu-system-ppc64 with the "-M pseries" option (or simply omit the machine option since it is currently the default for the qemu-system-ppc64 binary).

Switching between the KVM-PR and KVM-HV kernel module

Currently, there are two implementations of KVM on POWER, kvm_hv.ko and kvm_pr.ko:

  1. KVM-PR:
    • Uses the so-called "PRoblem state" of the ppc CPUs to run the guests, i.e. the VM is run in user mode and all privileged instructions trap and have to be emulated by the host.
    • Guests that use a lot of privileged instructions are running quite slow this way...
    • ... but the benefit is that this kernel module should run on pretty much every PPC hardware, and is able to emulate a lot of guest CPUs.
    • Can also be used to run other PowerPC guests like an emulated PowerMac.
  2. KVM-HV:
    • Requires hardware support of modern POWER server CPUs (like the recent POWER7/POWER8 CPUs).
    • Guests that use a lot of privileged instructions are running much faster than with KVM-PR.
    • The guest CPU has to be very similar to the host CPU this way (e.g. you can not specify an embedded PPC CPU for the guest with KVM-HV).
    • Can only be used to run sPAPR (pseries) guests.

If your host supports both KVM modes, and both KVM kernel modules are loaded, you can switch between the two modes with the "kvm-type" parameter:

  • Use "qemu-system-ppc64 -M pseries,kvm-type=PR" to use the kvm_pr.ko kernel module.
  • Use "qemu-system-ppc64 -M pseries,kvm-type=HV" to use kvm_hv.ko instead.

Links