From patchwork Mon Jul 5 16:06:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12359355 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B8E3C07E9B for ; Mon, 5 Jul 2021 16:06:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16E88613AB for ; Mon, 5 Jul 2021 16:06:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16E88613AB Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.150437.278148 (Exim 4.92) (envelope-from ) id 1m0R6w-0002VR-SG; Mon, 05 Jul 2021 16:06:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 150437.278148; Mon, 05 Jul 2021 16:06:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m0R6w-0002VK-Ow; Mon, 05 Jul 2021 16:06:18 +0000 Received: by outflank-mailman (input) for mailman id 150437; Mon, 05 Jul 2021 16:06:17 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m0R6v-0002V5-0q for xen-devel@lists.xenproject.org; Mon, 05 Jul 2021 16:06:17 +0000 Received: from de-smtp-delivery-102.mimecast.com (unknown [194.104.111.102]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ebec007c-ddaa-11eb-844d-12813bfff9fa; Mon, 05 Jul 2021 16:06:15 +0000 (UTC) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02lp2050.outbound.protection.outlook.com [104.47.5.50]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-2-HDXk1L9MPlq3KL9IcMYtuw-1; Mon, 05 Jul 2021 18:06:13 +0200 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB6861.eurprd04.prod.outlook.com (2603:10a6:803:13c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23; Mon, 5 Jul 2021 16:06:12 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::99d3:99cd:8adf:3eea]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::99d3:99cd:8adf:3eea%5]) with mapi id 15.20.4287.033; Mon, 5 Jul 2021 16:06:12 +0000 Received: from [10.156.60.236] (37.24.206.209) by AM4PR05CA0024.eurprd05.prod.outlook.com (2603:10a6:205::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Mon, 5 Jul 2021 16:06:11 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ebec007c-ddaa-11eb-844d-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625501174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5z3JNEifEYR9INV5pKVKLIur8yTgqbc2o4wLLPOUNiU=; b=PMISL8RLJxl9mSx7zyz3uC2T/sqNEm8Xm0bMg4eObyayEfIQULU109w7QJgUYHPwY35cYW jC990r3Wd02rb9TvAvHijehur1tk3+bgwqG7Q/l0nOhwfg7sZTuPSIOsf3SEm42fIz596b ucjS2x1MP3W/rVa0pQlfb1q8yzwtTuA= X-MC-Unique: HDXk1L9MPlq3KL9IcMYtuw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oLlPvQ+HIRYUxTXjhlXUl0ukKG+fB8sMimtoJkQqaEyHCLu3iD1ECHxy6fSSeK8S7zTGNccMj1XEXuSi5qADsTZBov+D4Re8cbBbi9Fe1FSfG295BKrfjQl9c3B/ZsFlM3tdb38EzfXwwGBmdeD677r3uD3xNSva0QFOXw7zh3aCV7OcpuIPYf9lHlfoTWHTxMcFxPZm5jg+MHnenBZlcRQtkJmMMroSjoFC9DRmprAakmqedUQmYIKXfziA5NX5vTcc9gK2/2QzMwKlbJsEHN4G2nRbpfwRq8wUl2I9lDpNQcOfS1YaJPA/hvqwzOHjrbFwDcVMCUhOKnwr8TAqag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5z3JNEifEYR9INV5pKVKLIur8yTgqbc2o4wLLPOUNiU=; b=HV3VNfIniq9NfFQQtIGHck0NXUjoDYerOb76RLAyX47NsQYGt904MEGGjBpaO9jDURQSVea2r10pWYte+G2GFkxRjgViu45qMhLV5Na8jZE2UZWlXDsjD4B0i1Mj9zzPs1MPYwj6rg2rXKW8LaaYyYZeHjPITtjdXAC4971yDnhmJdQKsKtdFqWltzNyNYY9c6B1m80Kp412D/vRFy1rZzHxcBxzJs9Gt/IfevhNYTCcfhkNyaVihbqfp1saV9kLUJ1TTtue86JlbNTFlyIugIbWk4oi+1llfAHHSP+QqWcj1zCpnuOIxNTiDuKDg1LpkC7G9CIYj13siwia9o5fwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com; Subject: [PATCH 02/16] x86/P2M: introduce p2m_{add,remove}_page() From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap , Paul Durrant References: Message-ID: Date: Mon, 5 Jul 2021 18:06:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [37.24.206.209] X-ClientProxiedBy: AM4PR05CA0024.eurprd05.prod.outlook.com (2603:10a6:205::37) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5208b57b-dd18-49c5-0177-08d93fcecefc X-MS-TrafficTypeDiagnostic: VI1PR04MB6861: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TTZeWjlKy5xhkYWe/Qki0cNsCx0sYsDZju2l7f78TkKSTL5nzqWORgE1yMyAXjn454IS1XzIUy9/7dnde0P1Z5wuQTHYqFvjy29ViwrokkRyGHjYZIHQFUABDCR1wdmXoG1ya6+D/rZrBR8eBNkajvREYE+YCBEq3kXU7ZgeFE21RsPWkddKt0yWVkXPO4uI9ZNwFhZmPg052hffn0twDw2B46fs4LoCFYKHwb36h7sH94+wi2R7kiOSFGOWyzoB1xPcZiGl5QIzkaOXASAwK0Tnl04mz/PNUnzhbg51fgpNNcItnzD+LBDnP0SEva4PXePKySIrSigT3otoaIK8ybIOQTw/QmYCTt8zp/Qu1lxtFThplVh3Cysqp+XiTdJSWBSXnpYIQTyu9EyQCbUtW/WBE2HTQGXgRBHQTguLZJX7SAghdW6ccuQZVRSl/YJXS6V3f95jYcwvRNyxnU7YMaEvim19JLgSVzI2WN4gR5WsBo0w1viQeFoXrjVpDkquw4a56/UIJWX0BX6bK7V1+frzziQV67dS3FyVS2FBvqHaLhjD8GPWndjxMIsShv2giGe8shKQWT6nEjrbw4KrqRMz66RLG6EOCJ55cIo0R/yTf3E+bPWhz4RFQAqPzmIr5iNRcbu8Kq7dIr5KRH9G15fn662NlQ2EEyiLspK3ABhCTXYeDeE9fIONi6r6VzallOy2S7jbH7y3tzD31qoybQ3v3w/8nBtayffNPaGamBg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(376002)(39860400002)(136003)(346002)(396003)(66556008)(66476007)(86362001)(66946007)(5660300002)(16526019)(31696002)(31686004)(38100700002)(26005)(36756003)(186003)(2616005)(83380400001)(54906003)(478600001)(6486002)(316002)(16576012)(956004)(4326008)(6916009)(2906002)(8936002)(8676002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Ih5qt6Ue/fZyA1bKhH4JaN8IOTVq?= =?utf-8?q?tn0UWMdUtwtDfgICEPlxfhkq5Ega7fsCfJ2bqsuMsdoMGzYLCUbT2xu7kvYfXPmGN?= =?utf-8?q?OiVZxzb8saDI0J9oI1ds4jtH8pbMzLY3nZm9kDZzOx10pO1m7vEEH89woZhvaTkyg?= =?utf-8?q?p+PtbUMEAI1DVSDRC3usJOyXFV/xEvoytE7v82LiFKCoU6Q9FQS4r/EXvd2ZS8QS+?= =?utf-8?q?JpyxO7SPBMLgqNvUTTDk4fsPJ0vPePXFL4w7RQozUKPYmzhRrMBovlLfc1cHUuspA?= =?utf-8?q?g90YibhwdoOeJpe+KiUrfN2U2qTU/5uzr8cKdbLDVhzPCI98DCmi7TiA0B9bsi0cG?= =?utf-8?q?zT5l+XwCBawsBbJ1QZBKFWwewM8AT2/Ayip3nA4QxUo6Hfl9e9DaiQ3MSljOoZ56y?= =?utf-8?q?rTXvZ0YHdQcWOmo+y5TRjycP55fkWW2/+iWmY/9AIQ2xHHhrIt9Ypy5LRAxkqQk/O?= =?utf-8?q?CnlWnrjVX+vRUwzd3IDCu96hkn/+JIfCmu9/LpAV1+YI3leLmkPNlJsESmj4uT7c5?= =?utf-8?q?kYECmwwOyY0TZSGo8jhKH51dhgL8NQcjNaWp7zYy3Jw3v0yHocwqre/bSWgEORaam?= =?utf-8?q?JP+zaqnbyRM20bU4fi0XPjYIZnjPVtFC99MOg6Sv1nLsExt8hw+GumtIIzCpFEz1Y?= =?utf-8?q?aR5Cd/bIQlZjUvnfjCAUisFLR6eDq37CXNVDB8H6mz4eVzhz1sG+1chK++i35sh3h?= =?utf-8?q?D4zNvrS83SAjMbpeOtKwjVfPv4f821fKURaRJO7bex2QaD7FxukS03Nv5ZU2Dj/vi?= =?utf-8?q?maXcBgRrPigo0bEYeSFPUriL8O+S8iqInyEQJiLE5IUTF79VANKre/t/FGVJr16xR?= =?utf-8?q?krifs7fRpCCbzHHLYdtZE413vNfQ2tYRJ+UdRHb9k0IyGQThJmEOHwaKktk6ofFpk?= =?utf-8?q?p1gW5Gxct2G2JKL3bYjYbEzq85wKtwwRdqv62jJ0oAUbOuoz1pYHeiKpfkTgqINwk?= =?utf-8?q?uBtsFJxZct8AMeHRKn1e+k87R2M2dsnbUUqazN8ZGdLGegbZq0eUIoVRCv/aRTmZM?= =?utf-8?q?tdI/hdWX6OcEWCMOGUKT/O9OQKhx1rCYPgsEJBjEIGf7jOqIMobw6jBqXPraS+MUA?= =?utf-8?q?3IXvAs+vaji1N0QjnLjD3wG1hvkf9rHGN9AVbT3yn8twHlKy+P4Go0VMKCWVn4MTQ?= =?utf-8?q?P8H56ySkJ2Kr1IvBET77sqn9XRi6VVErodN5LGbXrXI+ltHjjYUaogQTPwHhXQ0Ad?= =?utf-8?q?PU0tyUvZQUoOWerqxcaTNwmvRziUoJG+n0O4+EsH1Qu34YyA0fBRaK40dmaiUQjqj?= =?utf-8?q?YnG1xleGL+HMeWyc?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5208b57b-dd18-49c5-0177-08d93fcecefc X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2021 16:06:11.9140 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xS7A+dLAzxxa9VfzbjjqIIkiho6eNd1eDa0vB7FQbK1iJ8vNspN1c/plNi6EWWkECzIGIw52Xizo9G+yGW16Dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6861 p2m_add_page() is simply a rename from guest_physmap_add_entry(). p2m_remove_page() then is its counterpart, despite rendering guest_physmap_remove_page(). This way callers can use suitable pairs of functions (previously violated by hvm/grant_table.c). In HVM-specific code further avoid going through the guest_physmap_*() layer, and instead use the two new/renamed functions directly. Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -174,8 +174,7 @@ static int __init pvh_populate_memory_ra continue; } - rc = guest_physmap_add_page(d, _gfn(start), page_to_mfn(page), - order); + rc = p2m_add_page(d, _gfn(start), page_to_mfn(page), order, p2m_ram_rw); if ( rc != 0 ) { printk("Failed to populate memory: [%#lx,%#lx): %d\n", --- a/xen/arch/x86/hvm/grant_table.c +++ b/xen/arch/x86/hvm/grant_table.c @@ -39,9 +39,8 @@ int create_grant_p2m_mapping(uint64_t ad p2mt = p2m_grant_map_ro; else p2mt = p2m_grant_map_rw; - rc = guest_physmap_add_entry(current->domain, - _gfn(addr >> PAGE_SHIFT), - frame, PAGE_ORDER_4K, p2mt); + rc = p2m_add_page(current->domain, _gfn(addr >> PAGE_SHIFT), + frame, PAGE_ORDER_4K, p2mt); if ( rc ) return GNTST_general_error; else @@ -68,7 +67,7 @@ int replace_grant_p2m_mapping(uint64_t a type, mfn_x(old_mfn), mfn_x(frame)); return GNTST_general_error; } - if ( guest_physmap_remove_page(d, _gfn(gfn), frame, PAGE_ORDER_4K) ) + if ( p2m_remove_page(d, _gfn(gfn), frame, PAGE_ORDER_4K) ) { put_gfn(d, gfn); return GNTST_general_error; --- a/xen/arch/x86/hvm/ioreq.c +++ b/xen/arch/x86/hvm/ioreq.c @@ -188,8 +188,7 @@ static void hvm_remove_ioreq_gfn(struct if ( gfn_eq(iorp->gfn, INVALID_GFN) ) return; - if ( guest_physmap_remove_page(d, iorp->gfn, - page_to_mfn(iorp->page), 0) ) + if ( p2m_remove_page(d, iorp->gfn, page_to_mfn(iorp->page), 0) ) domain_crash(d); clear_page(iorp->va); } @@ -205,8 +204,7 @@ static int hvm_add_ioreq_gfn(struct iore clear_page(iorp->va); - rc = guest_physmap_add_page(d, iorp->gfn, - page_to_mfn(iorp->page), 0); + rc = p2m_add_page(d, iorp->gfn, page_to_mfn(iorp->page), 0, p2m_ram_rw); if ( rc == 0 ) paging_mark_pfn_dirty(d, _pfn(gfn_x(iorp->gfn))); --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -829,15 +829,17 @@ p2m_remove_entry(struct p2m_domain *p2m, } int -guest_physmap_remove_page(struct domain *d, gfn_t gfn, - mfn_t mfn, unsigned int page_order) +p2m_remove_page(struct domain *d, gfn_t gfn, mfn_t mfn, + unsigned int page_order) { struct p2m_domain *p2m = p2m_get_hostp2m(d); int rc; - /* IOMMU for PV guests is handled in get_page_type() and put_page(). */ if ( !paging_mode_translate(d) ) - return 0; + { + ASSERT_UNREACHABLE(); + return -EPERM; + } gfn_lock(p2m, gfn, page_order); rc = p2m_remove_entry(p2m, gfn, mfn, page_order); @@ -846,6 +848,17 @@ guest_physmap_remove_page(struct domain return rc; } +int +guest_physmap_remove_page(struct domain *d, gfn_t gfn, + mfn_t mfn, unsigned int page_order) +{ + /* IOMMU for PV guests is handled in get_page_type() and put_page(). */ + if ( !paging_mode_translate(d) ) + return 0; + + return p2m_remove_page(d, gfn, mfn, page_order); +} + #endif /* CONFIG_HVM */ int @@ -884,14 +897,14 @@ guest_physmap_add_page(struct domain *d, return 0; } - return guest_physmap_add_entry(d, gfn, mfn, page_order, p2m_ram_rw); + return p2m_add_page(d, gfn, mfn, page_order, p2m_ram_rw); } #ifdef CONFIG_HVM int -guest_physmap_add_entry(struct domain *d, gfn_t gfn, mfn_t mfn, - unsigned int page_order, p2m_type_t t) +p2m_add_page(struct domain *d, gfn_t gfn, mfn_t mfn, + unsigned int page_order, p2m_type_t t) { struct p2m_domain *p2m = p2m_get_hostp2m(d); unsigned long i; @@ -2665,7 +2678,7 @@ static int p2m_add_foreign(struct domain { if ( is_special_page(mfn_to_page(prev_mfn)) ) /* Special pages are simply unhooked from this phys slot */ - rc = guest_physmap_remove_page(tdom, _gfn(gpfn), prev_mfn, 0); + rc = p2m_remove_page(tdom, _gfn(gpfn), prev_mfn, 0); else /* Normal domain memory is freed, to avoid leaking memory. */ rc = guest_remove_page(tdom, gpfn); @@ -2673,7 +2686,7 @@ static int p2m_add_foreign(struct domain goto put_both; } /* - * Create the new mapping. Can't use guest_physmap_add_page() because it + * Create the new mapping. Can't use p2m_add_page() because it * will update the m2p table which will result in mfn -> gpfn of dom0 * and not fgfn of domU. */ @@ -2771,7 +2784,7 @@ int xenmem_add_to_physmap_one( { if ( is_special_page(mfn_to_page(prev_mfn)) ) /* Special pages are simply unhooked from this phys slot. */ - rc = guest_physmap_remove_page(d, gpfn, prev_mfn, PAGE_ORDER_4K); + rc = p2m_remove_page(d, gpfn, prev_mfn, PAGE_ORDER_4K); else if ( !mfn_eq(mfn, prev_mfn) ) /* Normal domain memory is freed, to avoid leaking memory. */ rc = guest_remove_page(d, gfn_x(gpfn)); @@ -2784,11 +2797,11 @@ int xenmem_add_to_physmap_one( /* Unmap from old location, if any. */ if ( old_gpfn != INVALID_M2P_ENTRY ) - rc = guest_physmap_remove_page(d, _gfn(old_gpfn), mfn, PAGE_ORDER_4K); + rc = p2m_remove_page(d, _gfn(old_gpfn), mfn, PAGE_ORDER_4K); /* Map at new location. */ if ( !rc ) - rc = guest_physmap_add_page(d, gpfn, mfn, PAGE_ORDER_4K); + rc = p2m_add_page(d, gpfn, mfn, PAGE_ORDER_4K, p2m_ram_rw); put_both: /* --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -571,10 +571,11 @@ int p2m_alloc_table(struct p2m_domain *p void p2m_teardown(struct p2m_domain *p2m); void p2m_final_teardown(struct domain *d); -/* Add a page to a domain's p2m table */ -int guest_physmap_add_entry(struct domain *d, gfn_t gfn, - mfn_t mfn, unsigned int page_order, - p2m_type_t t); +/* Add/remove a page to/from a domain's p2m table. */ +int p2m_add_page(struct domain *d, gfn_t gfn, mfn_t mfn, + unsigned int page_order, p2m_type_t t); +int p2m_remove_page(struct domain *d, gfn_t gfn, mfn_t mfn, + unsigned int page_order); /* Untyped version for RAM only, for compatibility and PV. */ int guest_physmap_add_page(struct domain *d, gfn_t gfn, mfn_t mfn,