]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: PPC: Book3S HV: Update kvmppc_set_arch_compat() for ISA v3.00
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Mon, 14 Nov 2016 00:35:08 +0000 (11:35 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 23 Nov 2016 22:24:23 +0000 (09:24 +1100)
commit2ee13be34b135957733b84ef5f7bd30c80ec3c42
tree4a0954a1060dd3e63faa49b1789ae12b24b10cbc
parent45c940ba490df28cb87b993981a5f63df6bbb8db
KVM: PPC: Book3S HV: Update kvmppc_set_arch_compat() for ISA v3.00

The function kvmppc_set_arch_compat() is used to determine the value of the
processor compatibility register (PCR) for a guest running in a given
compatibility mode. There is currently no support for v3.00 of the ISA.

Add support for v3.00 of the ISA which adds an ISA v2.07 compatilibity mode
to the PCR.

We also add a check to ensure the processor we are running on is capable of
emulating the chosen processor (for example a POWER7 cannot emulate a
POWER8, similarly with a POWER8 and a POWER9).

Based on work by: Paul Mackerras <paulus@ozlabs.org>

[paulus@ozlabs.org - moved dummy PCR_ARCH_300 definition here; set
 guest_pcr_bit when arch_compat == 0, added comment.]

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv.c