diff options
author | Tim Deegan <tim@xen.org> | 2011-09-08 15:13:06 +0100 |
---|---|---|
committer | Tim Deegan <tim@xen.org> | 2011-09-08 15:13:06 +0100 |
commit | 84f8baf80791b3432808c59fdb46b65b98f8bce0 (patch) | |
tree | e4f4f615ef8438c0a746a87ebe073f18ea792283 /xen/include/asm-x86/paging.h | |
parent | a18dd4934f2d67616a0c5a20c8a571d05db57bfc (diff) | |
download | xen-84f8baf80791b3432808c59fdb46b65b98f8bce0.tar.gz xen-84f8baf80791b3432808c59fdb46b65b98f8bce0.tar.bz2 xen-84f8baf80791b3432808c59fdb46b65b98f8bce0.zip |
x86/mm: adjust paging interface to return superpage sizes
to the caller of paging_ga_to_gfn_cr3()
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/include/asm-x86/paging.h')
-rw-r--r-- | xen/include/asm-x86/paging.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h index 0a32fe2b4e..c432a973ed 100644 --- a/xen/include/asm-x86/paging.h +++ b/xen/include/asm-x86/paging.h @@ -115,7 +115,8 @@ struct paging_mode { unsigned long (*p2m_ga_to_gfn )(struct vcpu *v, struct p2m_domain *p2m, unsigned long cr3, - paddr_t ga, uint32_t *pfec); + paddr_t ga, uint32_t *pfec, + unsigned int *page_order); void (*update_cr3 )(struct vcpu *v, int do_locking); void (*update_paging_modes )(struct vcpu *v); void (*write_p2m_entry )(struct vcpu *v, unsigned long gfn, @@ -270,15 +271,18 @@ unsigned long paging_gva_to_gfn(struct vcpu *v, * to by nested HAP code, to walk the guest-supplied NPT tables as if * they were pagetables. * Use 'paddr_t' for the guest address so it won't overflow when - * guest or nested guest is in 32bit PAE mode. - */ + * l1 or l2 guest is in 32bit PAE mode. + * If the GFN returned is not INVALID_GFN, *page_order gives + * the size of the superpage (if any) it was found in. */ static inline unsigned long paging_ga_to_gfn_cr3(struct vcpu *v, unsigned long cr3, paddr_t ga, - uint32_t *pfec) + uint32_t *pfec, + unsigned int *page_order) { struct p2m_domain *p2m = v->domain->arch.p2m; - return paging_get_hostmode(v)->p2m_ga_to_gfn(v, p2m, cr3, ga, pfec); + return paging_get_hostmode(v)->p2m_ga_to_gfn(v, p2m, cr3, ga, pfec, + page_order); } /* Update all the things that are derived from the guest's CR3. |