From patchwork Wed Jul 26 07:44:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9864341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A00E76038C for ; Wed, 26 Jul 2017 07:47:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DB442871F for ; Wed, 26 Jul 2017 07:47:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 825CF2872B; Wed, 26 Jul 2017 07:47:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7710728742 for ; Wed, 26 Jul 2017 07:47:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daH0B-0006kI-Ft; Wed, 26 Jul 2017 07:45:03 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daH0A-0006jm-HV for xen-devel@lists.xenproject.org; Wed, 26 Jul 2017 07:45:02 +0000 Received: from [193.109.254.147] by server-2.bemta-6.messagelabs.com id 62/CD-27137-D7848795; Wed, 26 Jul 2017 07:45:01 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRWlGSWpSXmKPExsXitHRDpG6tR0W kwY3pXBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aCrbNZCpb3MVYcXTiBtYHxQWYXIyeHhIC/ xOSvG1hBbDYBZYmfnb1sILaIgJ5E04HnjF2MXBzMAt8YJU5NuM0IkhAWsJN4//ABmM0ioCqxf tppJhCbV8BC4uykY+wQQ+UldrVdBBvKKWApsXhxGwuILQRU83/FejYIW0GiY/oxqF5BiZMzn4 DVMAtISBx88YJ5AiPvLCSpWUhSCxiZVjFqFKcWlaUW6Rob6SUVZaZnlOQmZuboGhqY6eWmFhc npqfmJCYV6yXn525iBAYQAxDsYDy9LvAQoyQHk5Io7yTTikghvqT8lMqMxOKM+KLSnNTiQ4wy HBxKEryM7kA5waLU9NSKtMwcYCjDpCU4eJREeCe4AaV5iwsSc4sz0yFSpxjtOTasXv+FiaNjx s9vTByvJvwHkk3fP35nEmLJy89LlRLnfQ/SJgDSllGaBzcUFnuXGGWlhHkZgc4U4ilILcrNLE GVf8UozsGoJMyrDnIbT2ZeCdzuV0BnMQGdNWdGKchZJYkIKakGxp0nuE+XJjHObrowt/ldyuz E5BuPjny+L/2n8+Ltm2FbJvW+MfwQqXVOX07+XOvTvoLP0g/ud0+zPh+tW79x0TTej0Kbvi9N X3EjuO74Qs8S+1vKepN2WVzOTF9kllOqu/dh/dO57OLCjyzDGLcceVHsJ+9za2t0Ud+TtQqu/ 5+HNfYo7brtZaXEUpyRaKjFXFScCADjEKT0uAIAAA== X-Env-Sender: prvs=373b709cc=wei.liu2@citrix.com X-Msg-Ref: server-14.tower-27.messagelabs.com!1501055098!96458064!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12794 invoked from network); 26 Jul 2017 07:45:00 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-14.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 26 Jul 2017 07:45:00 -0000 X-IronPort-AV: E=Sophos;i="5.40,414,1496102400"; d="scan'208";a="433001905" From: Wei Liu To: Xen-devel Date: Wed, 26 Jul 2017 08:44:54 +0100 Message-ID: <20170726074456.25511-2-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170726074456.25511-1-wei.liu2@citrix.com> References: <20170726074456.25511-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich Subject: [Xen-devel] [PATCH v2 1/3] x86: nuke PV superpage option and code X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Delete the user visible option and code for PV superpage support. The mm code is modified as if the option is set to false (the default value). Return the address space occupied by spage_info back to the reserved address space. Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper Acked-by: Konrad Rzeszutek Wilk --- Done some basic testing with xtf, also tested with basic PV guest life cycle. v2: Merge the patch to update docs here, rebase on top of staging --- docs/misc/xen-command-line.markdown | 7 - xen/arch/x86/domain.c | 2 - xen/arch/x86/mm.c | 257 ++---------------------------------- xen/arch/x86/pv/dom0_build.c | 2 - xen/include/asm-x86/config.h | 16 +-- xen/include/asm-x86/mm.h | 20 --- xen/include/asm-x86/page.h | 11 -- xen/include/asm-x86/paging.h | 3 +- xen/include/asm-x86/x86_64/page.h | 2 - 9 files changed, 13 insertions(+), 307 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index a130452462..4002eab08b 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -133,13 +133,6 @@ resume. `s3_mode` instructs Xen to set up the boot time (option `vga=`) video mode during S3 resume. -### allowsuperpage -> `= ` - -> Default: `true` - -Permit Xen to use superpages when performing memory management. - ### altp2m (Intel) > `= ` diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index dd8bf1302f..1ce804b05f 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1782,8 +1782,6 @@ static int relinquish_memory( BUG(); } - clear_superpage_mark(page); - if ( test_and_clear_bit(_PGC_allocated, &page->count_info) ) put_page(page); diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 51c93c168f..97b3b4ba2c 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -150,18 +150,11 @@ struct rangeset *__read_mostly mmio_ro_ranges; #define PAGE_CACHE_ATTRS (_PAGE_PAT|_PAGE_PCD|_PAGE_PWT) -bool __read_mostly opt_allow_superpage; -boolean_param("allowsuperpage", opt_allow_superpage); - -static void put_superpage(unsigned long mfn); - static uint32_t base_disallow_mask; /* Global bit is allowed to be set on L1 PTEs. Intended for user mappings. */ #define L1_DISALLOW_MASK ((base_disallow_mask | _PAGE_GNTTAB) & ~_PAGE_GLOBAL) -#define L2_DISALLOW_MASK (unlikely(opt_allow_superpage) \ - ? base_disallow_mask & ~_PAGE_PSE \ - : base_disallow_mask) +#define L2_DISALLOW_MASK base_disallow_mask #define l3_disallow_mask(d) (!is_pv_32bit_domain(d) ? \ base_disallow_mask : 0xFFFFF198U) @@ -219,15 +212,6 @@ static void __init init_frametable_chunk(void *start, void *end) memset(end, -1, s - e); } -static void __init init_spagetable(void) -{ - BUILD_BUG_ON(XEN_VIRT_END > SPAGETABLE_VIRT_START); - - init_frametable_chunk(spage_table, - mem_hotplug ? spage_table + SPAGETABLE_NR - : pdx_to_spage(max_pdx - 1) + 1); -} - void __init init_frametable(void) { unsigned int sidx, eidx, nidx; @@ -252,9 +236,6 @@ void __init init_frametable(void) : end_pg; init_frametable_chunk(pdx_to_page(sidx * PDX_GROUP_COUNT), top_pg); memset(end_pg, -1, (unsigned long)top_pg - (unsigned long)end_pg); - - if (opt_allow_superpage) - init_spagetable(); } #ifndef NDEBUG @@ -1129,20 +1110,7 @@ get_page_from_l2e( return rc; } - if ( !opt_allow_superpage ) - { - gdprintk(XENLOG_WARNING, "PV superpages disabled in hypervisor\n"); - return -EINVAL; - } - - if ( mfn & (L1_PAGETABLE_ENTRIES - 1) ) - { - gdprintk(XENLOG_WARNING, - "Unaligned superpage map attempt mfn %" PRI_mfn "\n", mfn); - return -EINVAL; - } - - return get_superpage(mfn, d); + return -EINVAL; } @@ -1315,8 +1283,13 @@ static int put_page_from_l2e(l2_pgentry_t l2e, unsigned long pfn) return 1; if ( l2e_get_flags(l2e) & _PAGE_PSE ) - put_superpage(l2e_get_pfn(l2e)); - else + { + struct page_info *page = mfn_to_page(l2e_get_pfn(l2e)); + unsigned int i; + + for ( i = 0; i < (1u << PAGETABLE_ORDER); i++, page++ ) + put_page_and_type(page); + } else put_page_and_type(l2e_get_page(l2e)); return 0; @@ -2676,197 +2649,6 @@ int get_page_type_preemptible(struct page_info *page, unsigned long type) return __get_page_type(page, type, 1); } -static int get_spage_pages(struct page_info *page, struct domain *d) -{ - unsigned int i; - - for ( i = 0; i < (1u << PAGETABLE_ORDER); i++, page++ ) - { - if ( !get_page_and_type(page, d, PGT_writable_page) ) - { - while ( i-- > 0 ) - put_page_and_type(--page); - return 0; - } - } - return 1; -} - -static void put_spage_pages(struct page_info *page) -{ - unsigned int i; - - for ( i = 0; i < (1u << PAGETABLE_ORDER); i++, page++ ) - put_page_and_type(page); -} - -static int mark_superpage(struct spage_info *spage, struct domain *d) -{ - unsigned long x, nx, y = spage->type_info; - int pages_done = 0; - - ASSERT(opt_allow_superpage); - - do { - x = y; - nx = x + 1; - if ( (x & SGT_type_mask) == SGT_mark ) - { - gdprintk(XENLOG_WARNING, - "Duplicate superpage mark attempt mfn %" PRI_mfn "\n", - spage_to_mfn(spage)); - if ( pages_done ) - put_spage_pages(spage_to_page(spage)); - return -EINVAL; - } - if ( (x & SGT_type_mask) == SGT_dynamic ) - { - if ( pages_done ) - { - put_spage_pages(spage_to_page(spage)); - pages_done = 0; - } - } - else if ( !pages_done ) - { - if ( !get_spage_pages(spage_to_page(spage), d) ) - { - gdprintk(XENLOG_WARNING, - "Superpage type conflict in mark attempt mfn %" PRI_mfn "\n", - spage_to_mfn(spage)); - return -EINVAL; - } - pages_done = 1; - } - nx = (nx & ~SGT_type_mask) | SGT_mark; - - } while ( (y = cmpxchg(&spage->type_info, x, nx)) != x ); - - return 0; -} - -static int unmark_superpage(struct spage_info *spage) -{ - unsigned long x, nx, y = spage->type_info; - unsigned long do_pages = 0; - - ASSERT(opt_allow_superpage); - - do { - x = y; - nx = x - 1; - if ( (x & SGT_type_mask) != SGT_mark ) - { - gdprintk(XENLOG_WARNING, - "Attempt to unmark unmarked superpage mfn %" PRI_mfn "\n", - spage_to_mfn(spage)); - return -EINVAL; - } - if ( (nx & SGT_count_mask) == 0 ) - { - nx = (nx & ~SGT_type_mask) | SGT_none; - do_pages = 1; - } - else - { - nx = (nx & ~SGT_type_mask) | SGT_dynamic; - } - } while ( (y = cmpxchg(&spage->type_info, x, nx)) != x ); - - if ( do_pages ) - put_spage_pages(spage_to_page(spage)); - - return 0; -} - -void clear_superpage_mark(struct page_info *page) -{ - struct spage_info *spage; - - if ( !opt_allow_superpage ) - return; - - spage = page_to_spage(page); - if ((spage->type_info & SGT_type_mask) == SGT_mark) - unmark_superpage(spage); - -} - -int get_superpage(unsigned long mfn, struct domain *d) -{ - struct spage_info *spage; - unsigned long x, nx, y; - int pages_done = 0; - - ASSERT(opt_allow_superpage); - - if ( !mfn_valid(_mfn(mfn | (L1_PAGETABLE_ENTRIES - 1))) ) - return -EINVAL; - - spage = mfn_to_spage(mfn); - y = spage->type_info; - do { - x = y; - nx = x + 1; - if ( (x & SGT_type_mask) != SGT_none ) - { - if ( pages_done ) - { - put_spage_pages(spage_to_page(spage)); - pages_done = 0; - } - } - else - { - if ( !get_spage_pages(spage_to_page(spage), d) ) - { - gdprintk(XENLOG_WARNING, - "Type conflict on superpage mapping mfn %" PRI_mfn "\n", - spage_to_mfn(spage)); - return -EINVAL; - } - pages_done = 1; - nx = (nx & ~SGT_type_mask) | SGT_dynamic; - } - } while ( (y = cmpxchg(&spage->type_info, x, nx)) != x ); - - return 0; -} - -static void put_superpage(unsigned long mfn) -{ - struct spage_info *spage; - unsigned long x, nx, y; - unsigned long do_pages = 0; - - if ( !opt_allow_superpage ) - { - put_spage_pages(mfn_to_page(mfn)); - return; - } - - spage = mfn_to_spage(mfn); - y = spage->type_info; - do { - x = y; - nx = x - 1; - if ((x & SGT_type_mask) == SGT_dynamic) - { - if ((nx & SGT_count_mask) == 0) - { - nx = (nx & ~SGT_type_mask) | SGT_none; - do_pages = 1; - } - } - - } while ((y = cmpxchg(&spage->type_info, x, nx)) != x); - - if (do_pages) - put_spage_pages(spage_to_page(spage)); - - return; -} - int put_old_guest_table(struct vcpu *v) { int rc; @@ -3599,27 +3381,8 @@ long do_mmuext_op( case MMUEXT_MARK_SUPER: case MMUEXT_UNMARK_SUPER: - { - unsigned long mfn = op.arg1.mfn; - - if ( !opt_allow_superpage ) - rc = -EOPNOTSUPP; - else if ( unlikely(currd != pg_owner) ) - rc = -EPERM; - else if ( mfn & (L1_PAGETABLE_ENTRIES - 1) ) - { - gdprintk(XENLOG_WARNING, - "Unaligned superpage mfn %" PRI_mfn "\n", mfn); - rc = -EINVAL; - } - else if ( !mfn_valid(_mfn(mfn | (L1_PAGETABLE_ENTRIES - 1))) ) - rc = -EINVAL; - else if ( op.cmd == MMUEXT_MARK_SUPER ) - rc = mark_superpage(mfn_to_spage(mfn), currd); - else - rc = unmark_superpage(mfn_to_spage(mfn)); + rc = -EOPNOTSUPP; break; - } default: rc = -ENOSYS; diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index 18c19a256f..e67ffdd7b8 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -181,8 +181,6 @@ static __init void setup_pv_physmap(struct domain *d, unsigned long pgtbl_pfn, 0)) != NULL ) { *pl2e = l2e_from_page(page, L1_PROT|_PAGE_DIRTY|_PAGE_PSE); - if ( opt_allow_superpage ) - get_superpage(page_to_mfn(page), d); vphysmap_start += 1UL << L2_PAGETABLE_SHIFT; continue; } diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index dc424f99e4..bc0730fd9d 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -143,19 +143,15 @@ extern unsigned char boot_edid_info[128]; * 0xffff82d080000000 - 0xffff82d0bfffffff [1GB, 2^30 bytes, PML4:261] * Xen text, static data, bss. #ifndef CONFIG_BIGMEM - * 0xffff82d0c0000000 - 0xffff82dffbffffff [61GB - 64MB, PML4:261] + * 0xffff82d0c0000000 - 0xffff82dfffffffff [61GB, PML4:261] * Reserved for future use. - * 0xffff82dffc000000 - 0xffff82dfffffffff [64MB, 2^26 bytes, PML4:261] - * Super-page information array. * 0xffff82e000000000 - 0xffff82ffffffffff [128GB, 2^37 bytes, PML4:261] * Page-frame information array. * 0xffff830000000000 - 0xffff87ffffffffff [5TB, 5*2^40 bytes, PML4:262-271] * 1:1 direct mapping of all physical memory. #else - * 0xffff82d0c0000000 - 0xffff82ffdfffffff [188.5GB, PML4:261] + * 0xffff82d0c0000000 - 0xffff82ffffffffff [189GB, PML4:261] * Reserved for future use. - * 0xffff82ffe0000000 - 0xffff82ffffffffff [512MB, 2^29 bytes, PML4:261] - * Super-page information array. * 0xffff830000000000 - 0xffff847fffffffff [1.5TB, 3*2^39 bytes, PML4:262-264] * Page-frame information array. * 0xffff848000000000 - 0xffff87ffffffffff [3.5TB, 7*2^39 bytes, PML4:265-271] @@ -230,14 +226,6 @@ extern unsigned char boot_edid_info[128]; #define XEN_VIRT_START (HIRO_COMPAT_MPT_VIRT_END) #define XEN_VIRT_END (XEN_VIRT_START + GB(1)) -/* Slot 261: superpage information array (64MB or 512MB). */ -#define SPAGETABLE_VIRT_END FRAMETABLE_VIRT_START -#define SPAGETABLE_NR (((FRAMETABLE_NR - 1) >> (SUPERPAGE_SHIFT - \ - PAGE_SHIFT)) + 1) -#define SPAGETABLE_SIZE (SPAGETABLE_NR * sizeof(struct spage_info)) -#define SPAGETABLE_VIRT_START ((SPAGETABLE_VIRT_END - SPAGETABLE_SIZE) & \ - (_AC(-1,UL) << SUPERPAGE_SHIFT)) - #ifndef CONFIG_BIGMEM /* Slot 261: page-frame information array (128GB). */ #define FRAMETABLE_SIZE GB(128) diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index 2550e35f85..2bf3f335ad 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -233,21 +233,6 @@ struct page_info #define PGC_count_width PG_shift(9) #define PGC_count_mask ((1UL<count_info & PGC_xen_heap) #define is_xen_heap_mfn(mfn) \ (__mfn_valid(mfn) && is_xen_heap_page(__mfn_to_page(mfn))) @@ -282,8 +267,6 @@ extern void share_xen_page_with_privileged_guests( extern void free_shared_domheap_page(struct page_info *page); #define frame_table ((struct page_info *)FRAMETABLE_VIRT_START) -#define spage_table ((struct spage_info *)SPAGETABLE_VIRT_START) -int get_superpage(unsigned long mfn, struct domain *d); extern unsigned long max_page; extern unsigned long total_pages; void init_frametable(void); @@ -329,8 +312,6 @@ void zap_ro_mpt(unsigned long mfn); bool is_iomem_page(mfn_t mfn); -void clear_superpage_mark(struct page_info *page); - const unsigned long *get_platform_badpages(unsigned int *array_size); /* Per page locks: * page_lock() is used for two purposes: pte serialization, and memory sharing. @@ -403,7 +384,6 @@ static inline int get_page_and_type(struct page_info *page, int check_descriptor(const struct domain *, struct desc_struct *d); -extern bool opt_allow_superpage; extern paddr_t mem_hotplug; /****************************************************************************** diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h index 474b9bde78..0f843c2a46 100644 --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -239,15 +239,6 @@ void copy_page_sse2(void *, const void *); #define __pfn_to_paddr(pfn) ((paddr_t)(pfn) << PAGE_SHIFT) #define __paddr_to_pfn(pa) ((unsigned long)((pa) >> PAGE_SHIFT)) - -/* Convert between machine frame numbers and spage-info structures. */ -#define __mfn_to_spage(mfn) (spage_table + pfn_to_sdx(mfn)) -#define __spage_to_mfn(pg) sdx_to_pfn((unsigned long)((pg) - spage_table)) - -/* Convert between page-info structures and spage-info structures. */ -#define page_to_spage(page) (spage_table+(((page)-frame_table)>>(SUPERPAGE_SHIFT-PAGE_SHIFT))) -#define spage_to_page(spage) (frame_table+(((spage)-spage_table)<<(SUPERPAGE_SHIFT-PAGE_SHIFT))) - /* * We define non-underscored wrappers for above conversion functions. These are * overridden in various source files while underscored versions remain intact. @@ -259,8 +250,6 @@ void copy_page_sse2(void *, const void *); #define maddr_to_virt(ma) __maddr_to_virt((unsigned long)(ma)) #define mfn_to_page(mfn) __mfn_to_page(mfn) #define page_to_mfn(pg) __page_to_mfn(pg) -#define mfn_to_spage(mfn) __mfn_to_spage(mfn) -#define spage_to_mfn(pg) __spage_to_mfn(pg) #define maddr_to_page(ma) __maddr_to_page(ma) #define page_to_maddr(pg) __page_to_maddr(pg) #define virt_to_page(va) __virt_to_page(va) diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h index 44e86d6a1f..64bf2f968a 100644 --- a/xen/include/asm-x86/paging.h +++ b/xen/include/asm-x86/paging.h @@ -371,8 +371,7 @@ static inline unsigned int paging_max_paddr_bits(const struct domain *d) { unsigned int bits = paging_mode_hap(d) ? hap_paddr_bits : paddr_bits; - if ( !IS_ENABLED(BIGMEM) && paging_mode_shadow(d) && - (!is_pv_domain(d) || opt_allow_superpage) ) + if ( !IS_ENABLED(BIGMEM) && paging_mode_shadow(d) && !is_pv_domain(d) ) { /* Shadowed superpages store GFNs in 32-bit page_info fields. */ bits = min(bits, 32U + PAGE_SHIFT); diff --git a/xen/include/asm-x86/x86_64/page.h b/xen/include/asm-x86/x86_64/page.h index 31ba975e3d..1b48309363 100644 --- a/xen/include/asm-x86/x86_64/page.h +++ b/xen/include/asm-x86/x86_64/page.h @@ -41,8 +41,6 @@ extern unsigned long xen_virt_end; -#define spage_to_pdx(spg) (((spg) - spage_table)<<(SUPERPAGE_SHIFT-PAGE_SHIFT)) -#define pdx_to_spage(pdx) (spage_table + ((pdx)>>(SUPERPAGE_SHIFT-PAGE_SHIFT))) /* * Note: These are solely for the use by page_{get,set}_owner(), and * therefore don't need to handle the XEN_VIRT_{START,END} range.