diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2017-02-15 14:30:17 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2017-06-19 14:08:02 +1000 |
commit | 769377f77ca2087baeaf97ce0b7026abeba3b581 (patch) | |
tree | d5929c25560ffccb100947b9d27e5d7e84338963 /arch/powerpc/include/asm/kvm_host.h | |
parent | 1da4e2f4fbd99f3fbf4275fc89617ffd671af95d (diff) | |
download | linux-769377f77ca2087baeaf97ce0b7026abeba3b581.tar.bz2 |
KVM: PPC: Book3S HV: Context-switch HFSCR between host and guest on POWER9
This adds code to allow us to use a different value for the HFSCR
(Hypervisor Facilities Status and Control Register) when running the
guest from that which applies in the host. The reason for doing this
is to allow us to trap the msgsndp instruction and related operations
in future so that they can be virtualized. We also save the value of
HFSCR when a hypervisor facility unavailable interrupt occurs, because
the high byte of HFSCR indicates which facility the guest attempted to
access.
We save and restore the host value on guest entry/exit because some
bits of it affect host userspace execution.
We only do all this on POWER9, not on POWER8, because we are not
intending to virtualize any of the facilities controlled by HFSCR on
POWER8. In particular, the HFSCR bit that controls execution of
msgsndp and related operations does not exist on POWER8. The HFSCR
doesn't exist at all on POWER7.
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 3f879c802feb..d3aae32acb54 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -566,6 +566,7 @@ struct kvm_vcpu_arch { ulong wort; ulong tid; ulong psscr; + ulong hfscr; ulong shadow_srr1; #endif u32 vrsave; /* also USPRG0 */ |