From patchwork Thu Sep 26 09:46:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xia, Hongyan" X-Patchwork-Id: 11162149 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 DDBF61800 for ; Thu, 26 Sep 2019 09:50:31 +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 BA561222C0 for ; Thu, 26 Sep 2019 09:50:31 +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="L3BrHHSJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA561222C0 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 1iDQP8-0006jy-JG; Thu, 26 Sep 2019 09:49:42 +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.89) (envelope-from ) id 1iDQP6-0006gg-QV for xen-devel@lists.xenproject.org; Thu, 26 Sep 2019 09:49:40 +0000 X-Inumbo-ID: dd4b39b4-e042-11e9-964c-12813bfff9fa Received: from smtp-fw-2101.amazon.com (unknown [72.21.196.25]) by localhost (Halon) with ESMTPS id dd4b39b4-e042-11e9-964c-12813bfff9fa; Thu, 26 Sep 2019 09:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1569491340; x=1601027340; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=W9PzwUfjSXRL4r6oD5FHM2BfgE+AdiBZBwN49R8r3mM=; b=L3BrHHSJri84FOybN41H3Nb4hFyganCynfTebEJZLzXzOvbxDbuHzGGO eCCBtycat0ak9GfoJkUMZ89rdo/RLegkfy6xc7fHRzjpirmgfwA68p2Ya PWdQbkCj14wpnFwyurpghYAvC6WPzR+Rz4YyLYMm6nDd/dT+p7aiy1MdR k=; X-IronPort-AV: E=Sophos;i="5.64,551,1559520000"; d="scan'208";a="753354289" Received: from iad6-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1e-17c49630.us-east-1.amazon.com) ([10.124.125.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 26 Sep 2019 09:49:00 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-17c49630.us-east-1.amazon.com (Postfix) with ESMTPS id 2F7D0A2A39; Thu, 26 Sep 2019 09:49:00 +0000 (UTC) Received: from EX13D18UWA004.ant.amazon.com (10.43.160.45) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 26 Sep 2019 09:48:33 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX13D18UWA004.ant.amazon.com (10.43.160.45) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 26 Sep 2019 09:48:32 +0000 Received: from u9d785c4ba99158.ant.amazon.com (10.125.106.58) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 26 Sep 2019 09:48:31 +0000 From: To: Date: Thu, 26 Sep 2019 10:46:17 +0100 Message-ID: <4295599137290de85e7964b7a2dd7311a5d52ff3.1569489002.git.hongyax@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [RFC PATCH 54/84] 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 , Wei Liu , Jan Beulich , =?utf-8?q?Roger_Pau_?= =?utf-8?q?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 302423a11f..d594b61702 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))