From f67a46f4aa1212b38696ac6b6a82b4323cea61aa Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Wed, 10 Oct 2007 19:25:50 -0500 Subject: KVM: MMU: Clean up MMU functions to take struct kvm when appropriate Some of the MMU functions take a struct kvm_vcpu even though they affect all VCPUs. This patch cleans up some of them to instead take a struct kvm. This makes things a bit more clear. The main thing that was confusing me was whether certain functions need to be called on all VCPUs. Signed-off-by: Anthony Liguori Signed-off-by: Avi Kivity --- drivers/kvm/paging_tmpl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/kvm/paging_tmpl.h') diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index 447d2c31f0cb..4f6edf85d13f 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h @@ -268,11 +268,11 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu, spte |= PT_WRITABLE_MASK; if (user_fault) { - mmu_unshadow(vcpu, gfn); + mmu_unshadow(vcpu->kvm, gfn); goto unshadowed; } - shadow = kvm_mmu_lookup_page(vcpu, gfn); + shadow = kvm_mmu_lookup_page(vcpu->kvm, gfn); if (shadow) { pgprintk("%s: found shadow page for %lx, marking ro\n", __FUNCTION__, gfn); -- cgit v1.2.3