p2m: merge ptp allocation
PATCH 1/1 p2m: merge ptp allocation
Hi!
Attached patch merges ptp allocation in p2m.
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
xen/arch/x86/mm/hap/p2m-ept.c +3 -5
@@ -30,6 +30,8 @@#include <asm/mtrr.h> #include <asm/hvm/cacheattr.h> +#include "private.h" +/* Non-ept "lock-and-check" wrapper */ static int ept_pod_check_and_populate(struct domain *d, unsigned long gfn, ept_entry_t *entry, int order,
@@ -97,14 +99,10 @@ static int ept_set_middle_entry(struct d {struct page_info *pg; - pg = d->arch.p2m->alloc_page (d); + pg =p2m_alloc_ptp (d,0 );if ( pg ==NULL )return 0 ; - pg->count_info =1 ; - pg->u.inuse.type_info =1 | PGT_validated; -page_list_add_tail (pg, &d->arch.p2m->pages); - ept_entry->emt =0 ; ept_entry->ipat =0 ; ept_entry->sp_avail =0 ;
xen/arch/x86/mm/hap/private.h +2 -1
@@ -30,5 +30,6 @@ unsigned long hap_gva_to_gfn_3_levels(stunsigned long hap_gva_to_gfn_4_levels (struct vcpu *v,unsigned long gva,uint32_t *pfec); +struct page_info *p2m_alloc_ptp (struct domain *d,unsigned long type); -#endif /* __SVM_NPT_H__ */ +#endif /* __HAP_PRIVATE_H__ */
xen/arch/x86/mm/p2m.c +29 -16
79 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi,
xen/arch/x86/mm/hap/private.h unsigned long hap_gva_to_gfn_3_levels(st · line 33
Quoted 12 lines · Christoph Egger
Attached patch merges ptp allocation in p2m.
Signed-off-by Christoph Egger <[email protected]>diff -r
105fdf064d27xen/arch/x86/mm/hap/private.hxen/arch/x86/mm/hap/private.h +1
-0@@ -30,5 +30,6 @@ unsigned long hap_gva_to_gfn_3_levels(stunsigned long hap_gva_to_gfn_4_levels (struct vcpu *v,unsigned long gva,uint32_t *pfec); +struct page_info *p2m_alloc_ptp (struct domain *d,unsigned long type);
Why is this declared in hap/private.h when it's not a hap function? Maybe asm-x86/p2m.h would be a better place.
Otherwise, Ack.
Tim.
Signature · 3 lines
Tim Deegan <[email protected]> Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
Quoted 14 lines · On Tuesday 13 April 2010 12:22:21 Tim Deegan wrote:
Hi,
Quoted 11 lines · Christoph Egger
Attached patch merges ptp allocation in p2m.
Signed-off-by Christoph Egger <[email protected]>diff -r
105fdf064d27xen/arch/x86/mm/hap/private.hxen/arch/x86/mm/hap/private.h +0
-0@@ -30,5 +30,6 @@ unsigned long hap_gva_to_gfn_3_levels(stunsigned long hap_gva_to_gfn_4_levels (struct vcpu *v,unsigned long gva,uint32_t *pfec);
Quoted 4 lines
xen/arch/x86/mm/hap/private.h unsigned long hap_gva_to_gfn_3_levels(st · line 33
Quoted 1 line
xen/arch/x86/mm/hap/private.h +1
-0+struct page_info *p2m_alloc_ptp (struct domain *d,unsigned long type);Why is this declared in
hap/private.hwhen it's not a hap function? Maybeasm-x86/p2m.hwould be a better place.
Ok, I'm fine with this change.
Keir: Do you want me to resend the diff or will you do that right before applying the patch?
Quoted 2 lines
Otherwise, Ack.
Thanks.
Quoted 1 line
Tim.
Christoph
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632