diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2017-05-22 16:55:16 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2017-06-19 14:02:04 +1000 |
commit | 1bc3fe818c9e823248f6ec299b1c518aa2df347c (patch) | |
tree | 9ebed7c173b556ce8434da58b09d7794faca9508 /arch/powerpc/include/asm/kvm_host.h | |
parent | 3d3efb68c19e539f0535c93a5258c1299270215f (diff) | |
download | op-kernel-dev-1bc3fe818c9e823248f6ec299b1c518aa2df347c.zip op-kernel-dev-1bc3fe818c9e823248f6ec299b1c518aa2df347c.tar.gz |
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>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_host.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 9c51ac4..3f879c8 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -579,7 +579,7 @@ struct kvm_vcpu_arch { ulong mcsrr0; ulong mcsrr1; ulong mcsr; - u32 dec; + ulong dec; #ifdef CONFIG_BOOKE u32 decar; #endif |