Backport fixes to PoD codepaths related to 1GiB pages
PATCH 1/1 Backport fixes to PoD codepaths related to 1GiB pages
Backport of xen-unstable.hg c/s 24189:7da681c490e0 to xen-4.1-testing
The codepaths in p2m_gfn_to_mfn() and p2m_gfn_to_mfn_current() should call p2m_pod_check_and_popualte(), as the 2MiB and 4k codepaths do. This properly grabs the p2m lock.
Also, p2m_pod_demand_populate() shouldn't call p2m_unlock(), as it didn't grab the lock in the first place.
xen/arch/x86/mm/p2m.c +4 -3
@@ -1244,7 +1244,6 @@ p2m_pod_demand_populate(struct p2m_domaiset_p2m_entry (p2m, gfn_aligned,_mfn (POPULATE_ON_DEMAND_MFN ),9 , p2m_populate_on_demand, p2m->default_access);audit_p2m (p2m,1 ); -p2m_unlock (p2m);return 0 ; }
@@ -1602,7 +1601,8 @@ pod_retry_l3: {if ( q != p2m_query ) { -if ( !p2m_pod_demand_populate (p2m, gfn,18 , q) ) +if ( !p2m_pod_check_and_populate (p2m, gfn, + (l1_pgentry_t *) &l3e,18 , q) ) goto pod_retry_l3; }else
@@ -1733,7 +1733,8 @@ static mfn_t p2m_gfn_to_mfn_current(stru/* The read has succeeded, so we know that mapping exists */ if ( q != p2m_query ) { -if ( !p2m_pod_demand_populate (p2m, gfn,18 , q) ) +if ( !p2m_pod_check_and_populate (p2m, gfn, + (l1_pgentry_t *) &l3e,18 , q) ) goto pod_retry_l3; p2mt = p2m_invalid;printk ("%s: Allocate 1GB failed!\n" , __func__);
Should this get applied?
Quoted 50 lines
Quoted 1 line
Quoted 1 line · George Dunlap
Backport of xen-unstable.hg c/s 24189:7da681c490e0 to xen-4.1-testing
The codepaths in
p2m_gfn_to_mfn()andp2m_gfn_to_mfn_current()should callp2m_pod_check_and_popualte(), as the 2MiB and 4k codepaths do. This properly grabs the p2m lock.Also,
p2m_pod_demand_populate()shouldn't callp2m_unlock(), as it didn't grab the lock in the first place.Signed-off-by Andres Lagar-Cavilla <[email protected]>Signed-off-by George Dunlap <[email protected]>diff -r
c613d436ca09-r3ab01c6cd13fxen/arch/x86/mm/p2m.cxen/arch/x86/mm/p2m.c +4
-3@@ -1244,7 +1244,6 @@ p2m_pod_demand_populate(struct p2m_domaiset_p2m_entry (p2m, gfn_aligned,_mfn (POPULATE_ON_DEMAND_MFN ),9 , p2m_populate_on_demand, p2m->default_access);audit_p2m (p2m,1 ); -p2m_unlock (p2m);return 0 ; }@@ -1602,7 +1601,8 @@ pod_retry_l3: {if ( q != p2m_query ) { -if ( !p2m_pod_demand_populate (p2m, gfn,18 , q) ) +if ( !p2m_pod_check_and_populate (p2m, gfn, + (l1_pgentry_t *) &l3e,18 , q) ) goto pod_retry_l3; }else @@ -1733,7 +1733,8 @@ static mfn_t p2m_gfn_to_mfn_current(stru/* The read has succeeded, so we know that mapping exists */ if ( q != p2m_query ) { -if ( !p2m_pod_demand_populate (p2m, gfn,18 , q) ) +if ( !p2m_pod_check_and_populate (p2m, gfn, + (l1_pgentry_t *) &l3e,18 , q) ) goto pod_retry_l3; p2mt = p2m_invalid;printk("%s: Allocate 1GB failed!\n", __func__);_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 1 line · Jan Beulich
Should this get applied?
Yes. I thought it already had my Ack, but if not: Ack.
Tim
Quoted 53 lines
Quoted 50 lines
Quoted 1 line
Quoted 1 line · George Dunlap
Backport of xen-unstable.hg c/s 24189:7da681c490e0 to xen-4.1-testing
The codepaths in
p2m_gfn_to_mfn()andp2m_gfn_to_mfn_current()should callp2m_pod_check_and_popualte(), as the 2MiB and 4k codepaths do. This properly grabs the p2m lock.Also,
p2m_pod_demand_populate()shouldn't callp2m_unlock(), as it didn't grab the lock in the first place.Signed-off-by Andres Lagar-Cavilla <[email protected]>Signed-off-by George Dunlap <[email protected]>diff -r
c613d436ca09-r3ab01c6cd13fxen/arch/x86/mm/p2m.cxen/arch/x86/mm/p2m.c +4
-3@@ -1244,7 +1244,6 @@ p2m_pod_demand_populate(struct p2m_domaiset_p2m_entry (p2m, gfn_aligned,_mfn (POPULATE_ON_DEMAND_MFN ),9 , p2m_populate_on_demand, p2m->default_access);audit_p2m (p2m,1 ); -p2m_unlock (p2m);return 0 ; }@@ -1602,7 +1601,8 @@ pod_retry_l3: {if ( q != p2m_query ) { -if ( !p2m_pod_demand_populate (p2m, gfn,18 , q) ) +if ( !p2m_pod_check_and_populate (p2m, gfn, + (l1_pgentry_t *) &l3e,18 , q) ) goto pod_retry_l3; }else @@ -1733,7 +1733,8 @@ static mfn_t p2m_gfn_to_mfn_current(stru/* The read has succeeded, so we know that mapping exists */ if ( q != p2m_query ) { -if ( !p2m_pod_demand_populate (p2m, gfn,18 , q) ) +if ( !p2m_pod_check_and_populate (p2m, gfn, + (l1_pgentry_t *) &l3e,18 , q) ) goto pod_retry_l3; p2mt = p2m_invalid;printk("%s: Allocate 1GB failed!\n", __func__);_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel