From patchwork Mon Sep 30 10:33:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xia, Hongyan" X-Patchwork-Id: 11166485 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 319B016B1 for ; Mon, 30 Sep 2019 10:37:41 +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 0DD1620679 for ; Mon, 30 Sep 2019 10:37:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="JcYC3qBF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DD1620679 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iEt31-0002Zh-TH; Mon, 30 Sep 2019 10:36:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iEt2z-0002Vy-VG for xen-devel@lists.xenproject.org; Mon, 30 Sep 2019 10:36:53 +0000 X-Inumbo-ID: 204a6cd2-e36e-11e9-97fb-bc764e2007e4 Received: from smtp-fw-33001.amazon.com (unknown [207.171.190.10]) by localhost (Halon) with ESMTPS id 204a6cd2-e36e-11e9-97fb-bc764e2007e4; Mon, 30 Sep 2019 10:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1569839774; x=1601375774; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=zFXi/k64yLkM6tHejVb24ikKLaRDehabVXLDoC8Mbn0=; b=JcYC3qBF1+EJV9lU5ZsFyN1NKb+2msnRdSpurFG357t30z/ziT1dxAVX waRPYLKKb4BF0L2ZNBZ1syjwmqkleGTgzs42a1Ml9Wwc5MyLHML2e/+eY JZGu9PdbH/K0rs8JNhH2WGP2f9ivoZLUlTLf0XcISoEyRw7MH+GBC+v2m M=; X-IronPort-AV: E=Sophos;i="5.64,565,1559520000"; d="scan'208";a="838005698" Received: from sea3-co-svc-lb6-vlan2.sea.amazon.com (HELO email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com) ([10.47.22.34]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 30 Sep 2019 10:35:13 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com (Postfix) with ESMTPS id 9BB8FA21DC; Mon, 30 Sep 2019 10:34:59 +0000 (UTC) Received: from EX13D05UEE003.ant.amazon.com (10.43.62.168) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 30 Sep 2019 10:34:40 +0000 Received: from EX13MTAUEE001.ant.amazon.com (10.43.62.200) by EX13D05UEE003.ant.amazon.com (10.43.62.168) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 30 Sep 2019 10:34:39 +0000 Received: from u9d785c4ba99158.ant.amazon.com (10.125.106.78) by mail-relay.amazon.com (10.43.62.226) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 30 Sep 2019 10:34:38 +0000 From: Hongyan Xia To: Date: Mon, 30 Sep 2019 11:33:45 +0100 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v2 53/55] x86/mm: drop old page table APIs X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Wei Liu Now that we've switched all users to the new APIs, the old ones aren't needed anymore. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 16 ---------------- xen/include/asm-x86/mm.h | 2 -- xen/include/asm-x86/page.h | 5 ----- 3 files changed, 23 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 5c1d65d267..c9be239d53 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4850,22 +4850,6 @@ int mmcfg_intercept_write( return X86EMUL_OKAY; } -void *alloc_xen_pagetable(void) -{ - mfn_t mfn; - - mfn = alloc_xen_pagetable_new(); - ASSERT(!mfn_eq(mfn, INVALID_MFN)); - - return map_xen_pagetable_new(mfn); -} - -void free_xen_pagetable(void *v) -{ - if ( system_state != SYS_STATE_early_boot ) - free_xen_pagetable_new(virt_to_mfn(v)); -} - mfn_t alloc_xen_pagetable_new(void) { if ( system_state != SYS_STATE_early_boot ) diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index 12a10b270d..4fb79ab8f0 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -631,8 +631,6 @@ int arch_acquire_resource(struct domain *d, unsigned int type, unsigned int nr_frames, xen_pfn_t mfn_list[]); /* Allocator functions for Xen pagetables. */ -void *alloc_xen_pagetable(void); -void free_xen_pagetable(void *v); mfn_t alloc_xen_pagetable_new(void); void *map_xen_pagetable_new(mfn_t mfn); void unmap_xen_pagetable_new(void *v); diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h index 05a8b1efa6..906ec701a3 100644 --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -187,11 +187,6 @@ static inline l4_pgentry_t l4e_from_paddr(paddr_t pa, unsigned int flags) #define l4e_has_changed(x,y,flags) \ ( !!(((x).l4 ^ (y).l4) & ((PADDR_MASK&PAGE_MASK)|put_pte_flags(flags))) ) -/* Pagetable walking. */ -#define l2e_to_l1e(x) ((l1_pgentry_t *)__va(l2e_get_paddr(x))) -#define l3e_to_l2e(x) ((l2_pgentry_t *)__va(l3e_get_paddr(x))) -#define l4e_to_l3e(x) ((l3_pgentry_t *)__va(l4e_get_paddr(x))) - #define map_l1t_from_l2e(x) (l1_pgentry_t *)map_domain_page(l2e_get_mfn(x)) #define map_l2t_from_l3e(x) (l2_pgentry_t *)map_domain_page(l3e_get_mfn(x)) #define map_l3t_from_l4e(x) (l3_pgentry_t *)map_domain_page(l4e_get_mfn(x))