summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/kvm_book3s.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2012-11-21 23:28:41 (GMT)
committerAlexander Graf <agraf@suse.de>2012-12-06 00:34:00 (GMT)
commit1cc8ed0b13ae6e076a1dd1f18da508b48c7aa05a (patch)
treec3c6a12177806a4df19f8ec003c1a609d871707d /arch/powerpc/include/asm/kvm_book3s.h
parent05dd85f7933ffbe6d71415e631c95ca615ae1e81 (diff)
downloadlinux-fsl-qoriq-1cc8ed0b13ae6e076a1dd1f18da508b48c7aa05a.tar.xz
KVM: PPC: Book3S HV: Don't give the guest RW access to RO pages
Currently, if the guest does an H_PROTECT hcall requesting that the permissions on a HPT entry be changed to allow writing, we make the requested change even if the page is marked read-only in the host Linux page tables. This is a problem since it would for instance allow a guest to modify a page that KSM has decided can be shared between multiple guests. To fix this, if the new permissions for the page allow writing, we need to look up the memslot for the page, work out the host virtual address, and look up the Linux page tables to get the PTE for the page. If that PTE is read-only, we reduce the HPTE permissions to read-only. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s.h')
0 files changed, 0 insertions, 0 deletions