diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2007-10-11 01:08:41 (GMT) |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 15:52:51 (GMT) |
commit | 4a4c99248713e878e1e2880015d01049aec805f3 (patch) | |
tree | a847d398faafef4ccbd44de13cfe5d1040fd1df1 /drivers/kvm/paging_tmpl.h | |
parent | f67a46f4aa1212b38696ac6b6a82b4323cea61aa (diff) | |
download | linux-fsl-qoriq-4a4c99248713e878e1e2880015d01049aec805f3.tar.xz |
KVM: MMU: More struct kvm_vcpu -> struct kvm cleanups
This time, the biggest change is gpa_to_hpa. The translation of GPA to HPA does
not depend on the VCPU state unlike GVA to GPA so there's no need to pass in
the kvm_vcpu.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r-- | drivers/kvm/paging_tmpl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index 4f6edf8..8e1e4ca 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h @@ -103,7 +103,7 @@ static int FNAME(walk_addr)(struct guest_walker *walker, pgprintk("%s: table_gfn[%d] %lx\n", __FUNCTION__, walker->level - 1, table_gfn); slot = gfn_to_memslot(vcpu->kvm, table_gfn); - hpa = safe_gpa_to_hpa(vcpu, root & PT64_BASE_ADDR_MASK); + hpa = safe_gpa_to_hpa(vcpu->kvm, root & PT64_BASE_ADDR_MASK); walker->page = pfn_to_page(hpa >> PAGE_SHIFT); walker->table = kmap_atomic(walker->page, KM_USER0); @@ -159,7 +159,7 @@ static int FNAME(walk_addr)(struct guest_walker *walker, walker->inherited_ar &= walker->table[index]; table_gfn = (*ptep & PT_BASE_ADDR_MASK) >> PAGE_SHIFT; kunmap_atomic(walker->table, KM_USER0); - paddr = safe_gpa_to_hpa(vcpu, table_gfn << PAGE_SHIFT); + paddr = safe_gpa_to_hpa(vcpu->kvm, table_gfn << PAGE_SHIFT); walker->page = pfn_to_page(paddr >> PAGE_SHIFT); walker->table = kmap_atomic(walker->page, KM_USER0); --walker->level; @@ -248,7 +248,7 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu, if (!dirty) access_bits &= ~PT_WRITABLE_MASK; - paddr = gpa_to_hpa(vcpu, gaddr & PT64_BASE_ADDR_MASK); + paddr = gpa_to_hpa(vcpu->kvm, gaddr & PT64_BASE_ADDR_MASK); spte |= PT_PRESENT_MASK; if (access_bits & PT_USER_MASK) |