[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 for-next v2 3/8] x86/mm: carve out replace_grant_pv_mapping
We will later split out PV specific code to pv/mm.c. No functional change. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/mm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 2137f2b6f8..823aba01a8 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4332,23 +4332,20 @@ static int replace_grant_p2m_mapping( return GNTST_okay; } -int replace_grant_host_mapping( - uint64_t addr, unsigned long frame, uint64_t new_addr, unsigned int flags) +static int replace_grant_pv_mapping(uint64_t addr, unsigned long frame, + uint64_t new_addr, unsigned int flags) { struct vcpu *curr = current; l1_pgentry_t *pl1e, ol1e; unsigned long gl1mfn; struct page_info *l1pg; int rc; - - if ( paging_mode_external(current->domain) ) - return replace_grant_p2m_mapping(addr, frame, new_addr, flags); if ( flags & GNTMAP_contains_pte ) { if ( !new_addr ) return destroy_grant_pte_mapping(addr, frame, curr->domain); - + return GNTST_general_error; } @@ -4408,6 +4405,15 @@ int replace_grant_host_mapping( return rc; } +int replace_grant_host_mapping(uint64_t addr, unsigned long frame, + uint64_t new_addr, unsigned int flags) +{ + if ( paging_mode_external(current->domain) ) + return replace_grant_p2m_mapping(addr, frame, new_addr, flags); + + return replace_grant_pv_mapping(addr, frame, new_addr, flags); +} + int donate_page( struct domain *d, struct page_info *page, unsigned int memflags) { -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |