summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/mmu.c
diff options
context:
space:
mode:
authorAvi Kivity2007-12-09 16:00:02 +0100
committerAvi Kivity2008-01-30 16:53:20 +0100
commit41074d07c78b086b18fc2af590caef05dbcca568 (patch)
tree1e07a3d17d718d61bbb45e427c7e7980f2b7ad2e /drivers/kvm/mmu.c
parentKVM: MMU: Move pte access calculation into a helper function (diff)
downloadkernel-qcow2-linux-41074d07c78b086b18fc2af590caef05dbcca568.tar.gz
kernel-qcow2-linux-41074d07c78b086b18fc2af590caef05dbcca568.tar.xz
kernel-qcow2-linux-41074d07c78b086b18fc2af590caef05dbcca568.zip
KVM: MMU: Fix inherited permissions for emulated guest pte updates
When we emulate a guest pte write, we fail to apply the correct inherited permissions from the parent ptes. Now that we store inherited permissions in the shadow page, we can use that to update the pte permissions correctly. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/mmu.c')
-rw-r--r--drivers/kvm/mmu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index f8a2137c64a2..cace1e41b683 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -680,7 +680,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
gva_t gaddr,
unsigned level,
int metaphysical,
- unsigned hugepage_access,
+ unsigned access,
u64 *parent_pte)
{
union kvm_mmu_page_role role;
@@ -694,7 +694,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
role.glevels = vcpu->mmu.root_level;
role.level = level;
role.metaphysical = metaphysical;
- role.hugepage_access = hugepage_access;
+ role.access = access;
if (vcpu->mmu.root_level <= PT32_ROOT_LEVEL) {
quadrant = gaddr >> (PAGE_SHIFT + (PT64_PT_BITS * level));
quadrant &= (1 << ((PT32_PT_BITS - PT64_PT_BITS) * level)) - 1;