]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Enable guests to use large decrementer mode on POWER9
authorPaul Mackerras <paulus@ozlabs.org>
Mon, 22 May 2017 06:55:16 +0000 (16:55 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 19 Jun 2017 04:02:04 +0000 (14:02 +1000)
commitdc0ebd777461b92af4d3e78dcf5dfe15cf7d7f9a
tree9ebed7c173b556ce8434da58b09d7794faca9508
parent37558f2c451d371408339010728616953f3dab02
KVM: PPC: Book3S HV: Enable guests to use large decrementer mode on POWER9

This allows userspace (e.g. QEMU) to enable large decrementer mode for
the guest when running on a POWER9 host, by setting the LPCR_LD bit in
the guest LPCR value.  With this, the guest exit code saves 64 bits of
the guest DEC value on exit.  Other places that use the guest DEC
value check the LPCR_LD bit in the guest LPCR value, and if it is set,
omit the 32-bit sign extension that would otherwise be done.

This doesn't change the DEC emulation used by PR KVM because PR KVM
is not supported on POWER9 yet.

This is partly based on an earlier patch by Oliver O'Halloran.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/emulate.c