summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/book3s_hv_builtin.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2017-09-13 16:29:22 +1000
committerPaul Mackerras <paulus@ozlabs.org>2017-10-16 08:09:53 +1100
commit891f1ebf659edd24bba93182a8de0ba082dcff72 (patch)
tree3515c62ac031ee3ae50ef892e605b7dc6004d087 /arch/powerpc/kvm/book3s_hv_builtin.c
parent3f2bb76433bb4348cd9076e4d305a040ff2012a9 (diff)
KVM: PPC: Book3S HV: Explicitly disable HPT operations on radix guests
This adds code to make sure that we don't try to access the non-existent HPT for a radix guest using the htab file for the VM in debugfs, a file descriptor obtained using the KVM_PPC_GET_HTAB_FD ioctl, or via the KVM_PPC_RESIZE_HPT_{PREPARE,COMMIT} ioctls. At present nothing bad happens if userspace does access these interfaces on a radix guest, mostly because kvmppc_hpt_npte() gives 0 for a radix guest, which in turn is because 1 << -4 comes out as 0 on POWER processors. However, that relies on undefined behaviour, so it is better to be explicit about not accessing the HPT for a radix guest. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv_builtin.c')
0 files changed, 0 insertions, 0 deletions