From nobody Fri Oct 31 11:33:00 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=teddy.astie@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1755789980; cv=none; d=zohomail.com; s=zohoarc; b=G3T9Vpkd7hZEygyx4xb5TOsS8WFa0+dNk48z9GNUqQqBrfAFIZV5xiT7juiwaCSDE9xjR+9fAJUuRDPZeoZzs2kqObiwfRBdCzDMNOnSbNCiAz9hOs77nQ1Q3TinYHwopRjr2swrr5hnDoyRCmsGRLK/S+RFiwRM0BBBI70MViM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755789980; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=v9693aJ0tIn6PL/KSvi73SLKMBRME6s7Oodg2Swvg4k=; b=N/OB6cMlQkqHS8hcuoNoOZDscFb37gThpJ/9z1XyafWzVyDtpRoqZJcYV00Ysc03rw2hOLzMTruCc6e/8n5FFPc4H1Y5CCoF6KJ4IFPtEvps5NoWTPx5EOevYQJjnTAEJ23jr7qEtV29UY6i1nHs+s1RI/S5QZS6RgQ14MjIwl0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=teddy.astie@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1755789980230548.4154113473022; Thu, 21 Aug 2025 08:26:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1088819.1446566 (Exim 4.92) (envelope-from ) id 1up7Au-0006jV-Cj; Thu, 21 Aug 2025 15:26:00 +0000 Received: by outflank-mailman (output) from mailman id 1088819.1446566; Thu, 21 Aug 2025 15:26:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1up7Au-0006iw-6A; Thu, 21 Aug 2025 15:26:00 +0000 Received: by outflank-mailman (input) for mailman id 1088819; Thu, 21 Aug 2025 15:25:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1up7As-0005na-HO for xen-devel@lists.xenproject.org; Thu, 21 Aug 2025 15:25:58 +0000 Received: from mail137-3.atl71.mandrillapp.com (mail137-3.atl71.mandrillapp.com [198.2.137.3]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 21836de1-7ea3-11f0-b898-0df219b8e170; Thu, 21 Aug 2025 17:25:56 +0200 (CEST) Received: from pmta07.mandrill.prod.atl01.rsglab.com (localhost [127.0.0.1]) by mail137-3.atl71.mandrillapp.com (Mailchimp) with ESMTP id 4c76bQ0wjWzBsVD76 for ; Thu, 21 Aug 2025 15:25:54 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 5565b7a84c614179b7558ba46b71cf8f; Thu, 21 Aug 2025 15:25:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 21836de1-7ea3-11f0-b898-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1755789954; x=1756059954; bh=v9693aJ0tIn6PL/KSvi73SLKMBRME6s7Oodg2Swvg4k=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=iMHqtkLQWTccEKocnJ30gS94aO+FZnLgcKSPFIynoxhB5ye68HSCIWqqBgTI6648J 5PpdV7fXBTZ5+WY8MI7P6ZswZb8QT90Ou/S6fw7U349KlZIq+GnZRQbv24etXFW+8s 2TM3TEEsVgrPl3eBuyIBNBsrmqDZssHEKOOtpscJXc2oEbvXz4T9jY47Ntvos17siZ J2lhV/AshFpx0f67qYVuCZbLWckervw1ZXrpZd5SXsfaxKcczchYJLUqwZJxCafYp5 yigRqUb+DExo0OMyo++ljNrnLznCo4sUKpcT6R9IetgxAS+cAxOLAM+xpjAogWxWjt OS1RC6hNp1uDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1755789954; x=1756050454; i=teddy.astie@vates.tech; bh=v9693aJ0tIn6PL/KSvi73SLKMBRME6s7Oodg2Swvg4k=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=iH0BcE+QR1Uaoadh/SSpJyDJOpz7rEZOK9PHZRIcQcd7FQSuoHHsEP9YxnK6YLBJF V9CZB7oqLjRzXWdUlCzhIzsOKBiYhkRHsQeXqSYpzn66U8dQneGlzgvNiEWWaZQYe5 N9/BPKoE+PMlOavuOwQdJ3idbHJ6kFXgKdokA1kZNnaN659ikq3g0JQq8nK5NqIOd3 DpAwBE/G0BStKl4dcWA5I0oD2QN5jBF4XihFwXY3/4mTxKix0hgOdw4JGkhbzUAvsr SaV2sx1/QWthMhj0M6D4qYJ2WSDhOInkIvEWLpdQSJbY1n4E5Y4jioWoJkEXqB8z7+ /IzqH+tX3xp0w== From: "Teddy Astie" Subject: =?utf-8?Q?[RFC=20PATCH=204/9]=20hvm:=20Introduce=20"fixed=20memory=20layout"=20feature?= X-Mailer: git-send-email 2.50.1 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1755789952853 To: xen-devel@lists.xenproject.org Cc: "Teddy Astie" , "Andrew Cooper" , "Anthony PERARD" , "Michal Orzel" , "Jan Beulich" , "Julien Grall" , "=?utf-8?Q?Roger=20Pau=20Monn=C3=A9?=" , "Stefano Stabellini" , "Juergen Gross" Message-Id: <640223e5e7ee18a73f62152dd27883bf5978fbfe.1755785258.git.teddy.astie@vates.tech> In-Reply-To: References: X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.5565b7a84c614179b7558ba46b71cf8f?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20250821:md Date: Thu, 21 Aug 2025 15:25:54 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity teddy.astie@vates.tech) (identity @mandrillapp.com) X-ZM-MESSAGEID: 1755789982529124100 Content-Type: text/plain; charset="utf-8" Currently, guests needs to explicitely map their shared info and grant table through hypercalls. It has proved to be complicated and had been traditionally placed in the Xen PCI Platform device BAR, but has caused confusions regarding MTRR [1]. Introduce a optional feature to let the toolstack map these pages in advance, and exposing their location through the memory map (i.e E820). When this feature is active, guests are expected to not invalidate such mappings (e.g by calling xen_remove_from_physmap); as they may be used by the operating system or firmware (i.e OVMF). Moreover, this feature is useful to allow having a working guest without having to expose to it physmap manipulation. [1] https://lore.kernel.org/xen-devel/20250610162930.89055-1-roger.pau@citr= ix.com/ Signed-off-by: Teddy Astie --- .../x86/fixed-memory-layout.pandoc | 24 ++++++ docs/guest-guide/x86/index.rst | 1 + tools/include/xen-tools/common-macros.h | 4 + tools/libs/guest/xg_dom_x86.c | 84 +++++++++++++++++++ tools/libs/light/libxl_create.c | 1 + tools/libs/light/libxl_types.idl | 1 + tools/libs/light/libxl_x86.c | 71 ++++++++++++++++ tools/xl/xl_parse.c | 1 + xen/include/public/arch-x86/hvm/start_info.h | 7 ++ 9 files changed, 194 insertions(+) create mode 100644 docs/guest-guide/x86/fixed-memory-layout.pandoc diff --git a/docs/guest-guide/x86/fixed-memory-layout.pandoc b/docs/guest-g= uide/x86/fixed-memory-layout.pandoc new file mode 100644 index 0000000000..b394dc1cff --- /dev/null +++ b/docs/guest-guide/x86/fixed-memory-layout.pandoc @@ -0,0 +1,24 @@ +# Fixed memory layout + +When creating a guest with "fixed_mem_layout", the guest has additional sp= ecial +pages mapped in advance. These mappings may be required in some cases due = to FastABI +not providing the ability for the guest to modify its physical memory layo= ut (which is +usually used to map the shared info page or the grant table). + +The guest is informed of such mappings and their location through the memo= ry map using +Xen specific memory map types (in the OEM range of ACPI specification). + +It's expected that these mappings stay stable, therefore, the guest should= n't try to +modify such mappings as it may be actively used by guest firmware or opera= ting system. + + /* Xen-specific types (OEM-specific range of the ACPI spec) */ + #define XEN_HVM_MEMMAP_TYPE_SHARED_INFO 0xF0000001 /* Shared info pa= ge */ + #define XEN_HVM_MEMMAP_TYPE_GRANT_TABLE 0xF0000002 /* Grant table pa= ges */ + #define XEN_HVM_MEMMAP_TYPE_GNTTAB_STATUS 0xF0000003 /* Grant table st= atus page (v2) */ + #define XEN_HVM_MEMMAP_TYPE_FOREIGN_REG 0xF0000004 /* Suitable regio= n for grant mappings */ + /* and foreign ma= ppings */ + +These mappings are likely to be placed outside the 4G range. + +XEN_HVM_MEMMAP_TYPE_FOREIGN_REG is a special region which doesn't contain = any mapping, +but is safe to use for placing grant and foreign mappings. diff --git a/docs/guest-guide/x86/index.rst b/docs/guest-guide/x86/index.rst index 502968490d..6927271e53 100644 --- a/docs/guest-guide/x86/index.rst +++ b/docs/guest-guide/x86/index.rst @@ -7,3 +7,4 @@ x86 :maxdepth: 2 =20 hypercall-abi + fixed-memory-layout diff --git a/tools/include/xen-tools/common-macros.h b/tools/include/xen-to= ols/common-macros.h index 0088208c2e..8b286b3da5 100644 --- a/tools/include/xen-tools/common-macros.h +++ b/tools/include/xen-tools/common-macros.h @@ -72,6 +72,10 @@ #define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w)= )-1)) #endif =20 +#ifndef DIV_ROUNDUP +#define DIV_ROUNDUP(n, d) (((n) + (d) - 1) / (d)) +#endif + #define MASK_EXTR(v, m) (((v) & (m)) / ((m) & -(m))) #define MASK_INSR(v, m) (((v) * ((m) & -(m))) & (m)) =20 diff --git a/tools/libs/guest/xg_dom_x86.c b/tools/libs/guest/xg_dom_x86.c index cba01384ae..ab1c5063a4 100644 --- a/tools/libs/guest/xg_dom_x86.c +++ b/tools/libs/guest/xg_dom_x86.c @@ -624,6 +624,82 @@ static void build_hvm_info(void *hvm_info_page, struct= xc_dom_image *dom) hvm_info->checksum =3D -sum; } =20 +/* Prepare special (shared_info, grant table, ...) regions marked in E820.= */ +static int prepare_fixed_special_regions(xc_interface *xch, struct xc_dom_= image *dom) +{ + int rc =3D 0; unsigned int i; + uint32_t domid =3D dom->guest_domid; + gnttab_query_size_t gnttab_query; + size_t gnttab_frame_count, gnttab_status_frame_count; + =20 + gnttab_query.dom =3D domid; + rc =3D xc_gnttab_query_size(xch, &gnttab_query); + + if ( rc !=3D 0 || gnttab_query.status !=3D GNTST_okay ) + { + DOMPRINTF("Unable to query grant table size."); + return rc; + } + + gnttab_frame_count =3D gnttab_query.max_nr_frames; + gnttab_status_frame_count =3D DIV_ROUNDUP( + gnttab_frame_count * (XC_DOM_PAGE_SIZE(dom) / sizeof(grant_entry_v= 2_t)), + XC_DOM_PAGE_SIZE(dom) / sizeof(grant_status_t)); + + for ( i =3D 0; i < dom->e820_entries; i++ ) + { + struct e820entry entry =3D dom->e820[i]; + rc =3D 0; + + switch ( entry.type ) { + case XEN_HVM_MEMMAP_TYPE_SHARED_INFO: + rc =3D xc_domain_add_to_physmap(xch, domid, XENMAPSPACE_shared= _info, + 0, entry.addr >> PAGE_SHIFT); + break; + case XEN_HVM_MEMMAP_TYPE_GRANT_TABLE: + if ( gnttab_frame_count !=3D entry.size >> PAGE_SHIFT ) + { + DOMPRINTF("Invalid grant table memmap region size"); + return -EINVAL; + } + + for ( i =3D 0; i < gnttab_frame_count; i++ ) + { + rc =3D xc_domain_add_to_physmap(xch, domid, XENMAPSPACE_gr= ant_table, i, + (entry.addr >> PAGE_SHIFT) += i); + =20 + if ( rc !=3D 0 ) + break; + } + break; + case XEN_HVM_MEMMAP_TYPE_GNTTAB_STATUS: + { + if ( gnttab_status_frame_count !=3D entry.size >> PAGE_SHIFT ) + { + DOMPRINTF("Invalid grant table status memmap region size"); + return -EINVAL; + } + + for ( i =3D 0; i < gnttab_status_frame_count; i++ ) + { + rc =3D xc_domain_add_to_physmap(xch, domid, XENMAPSPACE_gr= ant_table, + i | XENMAPIDX_grant_table_st= atus, + (entry.addr >> PAGE_SHIFT) += i); + =20 + if ( rc !=3D 0 ) + break; + } + break; + } + } + + if ( rc !=3D 0 ) + break; + } + + return rc; +} + static int alloc_magic_pages_hvm(struct xc_dom_image *dom) { unsigned long i; @@ -718,6 +794,14 @@ static int alloc_magic_pages_hvm(struct xc_dom_image *= dom) goto out; } =20 + rc =3D prepare_fixed_special_regions(xch, dom); + + if ( rc !=3D 0 ) + { + DOMPRINTF("Unable to prepare fixed special regions"); + goto out; + } + /* * Identity-map page table is required for running with CR0.PG=3D0 when * using Intel EPT. Create a 32-bit non-PAE page directory of superpag= es. diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_creat= e.c index 8a85fba1cf..5e23e122fc 100644 --- a/tools/libs/light/libxl_create.c +++ b/tools/libs/light/libxl_create.c @@ -2363,6 +2363,7 @@ int libxl_domain_create_restore(libxl_ctx *ctx, libxl= _domain_config *d_config, * configuration. */ libxl_defbool_setdefault(&d_config->b_info.arch_x86.msr_relaxed, true); + libxl_defbool_setdefault(&d_config->b_info.arch_x86.fixed_mem_layout, = false); libxl_defbool_setdefault(&d_config->b_info.u.hvm.pirq, true); =20 return do_domain_create(ctx, d_config, domid, restore_fd, send_back_fd, diff --git a/tools/libs/light/libxl_types.idl b/tools/libs/light/libxl_type= s.idl index a3a79d12b2..74edfdebc1 100644 --- a/tools/libs/light/libxl_types.idl +++ b/tools/libs/light/libxl_types.idl @@ -727,6 +727,7 @@ libxl_domain_build_info =3D Struct("domain_build_info",[ ("nr_spis", uint32, {'init_val': 'LIBXL_NR_= SPIS_DEFAULT'}), ])), ("arch_x86", Struct(None, [("msr_relaxed", libxl_defbool), + ("fixed_mem_layout", libxl_defbool), ])), # Alternate p2m is not bound to any architecture or guest type, as it = is # supported by x86 HVM and ARM support is planned. diff --git a/tools/libs/light/libxl_x86.c b/tools/libs/light/libxl_x86.c index 60d4e8661c..de19f722ab 100644 --- a/tools/libs/light/libxl_x86.c +++ b/tools/libs/light/libxl_x86.c @@ -1,6 +1,7 @@ #include "libxl_internal.h" #include "libxl_arch.h" #include +#include =20 int libxl__arch_domain_prepare_config(libxl__gc *gc, libxl_domain_config *d_config, @@ -50,6 +51,10 @@ static const char *e820_names(int type) case E820_ACPI: return "ACPI"; case E820_NVS: return "ACPI NVS"; case E820_UNUSABLE: return "Unusable"; + case XEN_HVM_MEMMAP_TYPE_SHARED_INFO: return "HVM Shared Info"; + case XEN_HVM_MEMMAP_TYPE_GRANT_TABLE: return "HVM Grant Table"; + case XEN_HVM_MEMMAP_TYPE_GNTTAB_STATUS: return "HVM Grant Status"; + case XEN_HVM_MEMMAP_TYPE_FOREIGN_REG: return "HVM Foreign mapping = region"; default: break; } return "Unknown"; @@ -686,10 +691,31 @@ static int domain_construct_memmap(libxl__gc *gc, /* We always own at least one lowmem entry. */ unsigned int e820_entries =3D 1; struct e820entry *e820 =3D NULL; + uint64_t highmem_start =3D ((uint64_t)1 << 32); uint64_t highmem_size =3D dom->highmem_end ? dom->highmem_end - (1ull << 32) : 0; uint32_t lowmem_start =3D dom->device_model ? GUEST_LOW_MEM_START_DEFA= ULT : 0; unsigned page_size =3D XC_DOM_PAGE_SIZE(dom); + /* Special region starts at the first 1G boundary after the highmem */ + uint64_t special_region_start =3D + (highmem_start + highmem_size + GB(1) - 1) & ~(GB(1) - 1); + uint64_t special_region_offset =3D special_region_start; + size_t gnttab_frame_count, gnttab_status_frame_count; + gnttab_query_size_t gnttab_query; + + gnttab_query.dom =3D domid; + rc =3D xc_gnttab_query_size(dom->xch, &gnttab_query); + + if (rc !=3D 0 || gnttab_query.status !=3D GNTST_okay) + { + gnttab_frame_count =3D 0; + gnttab_status_frame_count =3D 0; + } + + gnttab_frame_count =3D gnttab_query.max_nr_frames; + gnttab_status_frame_count =3D DIV_ROUNDUP( + gnttab_frame_count * (page_size / sizeof(grant_entry_v2_t)), + page_size / sizeof(grant_status_t)); =20 /* Add all rdm entries. */ for (i =3D 0; i < d_config->num_rdms; i++) @@ -703,6 +729,16 @@ static int domain_construct_memmap(libxl__gc *gc, /* If we should have a highmem range. */ if (highmem_size) e820_entries++; + =20 + if (libxl_defbool_val(d_config->b_info.arch_x86.fixed_mem_layout)) + { + e820_entries++; /* XEN_HVM_MEMMAP_TYPE_SHARED_INFO */ + if ( gnttab_frame_count ) + e820_entries++; /* XEN_HVM_MEMMAP_TYPE_GRANT_TABLE */ + if (d_config->b_info.max_grant_version >=3D 2 && gnttab_status_fra= me_count) + e820_entries++; /* XEN_HVM_MEMMAP_TYPE_GNTTAB_STATUS status */ + e820_entries++; /* XEN_HVM_MEMMAP_TYPE_FOREIGN_REG */ + } =20 for (i =3D 0; i < MAX_ACPI_MODULES; i++) if (dom->acpi_modules[i].length) @@ -769,6 +805,40 @@ static int domain_construct_memmap(libxl__gc *gc, e820[nr].type =3D E820_RAM; } =20 + /* Special regions */ + if (libxl_defbool_val(d_config->b_info.arch_x86.fixed_mem_layout)) + { + e820[nr].type =3D XEN_HVM_MEMMAP_TYPE_SHARED_INFO; + e820[nr].addr =3D special_region_offset; + e820[nr].size =3D page_size; + special_region_offset +=3D e820[nr].size; + nr++; + + if ( gnttab_frame_count ) + { + e820[nr].type =3D XEN_HVM_MEMMAP_TYPE_GRANT_TABLE; + e820[nr].addr =3D special_region_offset; + e820[nr].size =3D gnttab_frame_count * page_size; + special_region_offset +=3D e820[nr].size; + nr++; + } + + if (d_config->b_info.max_grant_version >=3D 2 && gnttab_status_fra= me_count) + { + e820[nr].type =3D XEN_HVM_MEMMAP_TYPE_GNTTAB_STATUS; + e820[nr].addr =3D special_region_offset; + e820[nr].size =3D gnttab_status_frame_count * page_size; + special_region_offset +=3D e820[nr].size; + nr++; + } + + e820[nr].type =3D XEN_HVM_MEMMAP_TYPE_FOREIGN_REG; + e820[nr].addr =3D special_region_offset; + e820[nr].size =3D MB(512); + special_region_offset +=3D e820[nr].size; + nr++; + } + if (xc_domain_set_memory_map(CTX->xch, domid, e820, e820_entries) !=3D= 0) { rc =3D ERROR_FAIL; goto out; @@ -819,6 +889,7 @@ int libxl__arch_domain_build_info_setdefault(libxl__gc = *gc, libxl_defbool_setdefault(&b_info->acpi, true); libxl_defbool_setdefault(&b_info->arch_x86.msr_relaxed, false); libxl_defbool_setdefault(&b_info->trap_unmapped_accesses, false); + libxl_defbool_setdefault(&b_info->arch_x86.fixed_mem_layout, false); =20 if (b_info->type =3D=3D LIBXL_DOMAIN_TYPE_HVM) { /* diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index 7e11c62ba0..a74cc577e9 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -2992,6 +2992,7 @@ skip_usbdev: "WARNING: msr_relaxed will be removed in future versio= ns.\n" "If it fixes an issue you are having please report to " "xen-devel@lists.xenproject.org.\n"); + xlu_cfg_get_defbool(config, "fixed_mem_layout", &b_info->arch_x86.fixe= d_mem_layout, 0); =20 xlu_cfg_get_defbool(config, "vpmu", &b_info->vpmu, 0); =20 diff --git a/xen/include/public/arch-x86/hvm/start_info.h b/xen/include/pub= lic/arch-x86/hvm/start_info.h index e33557c0b4..0b3dfe91af 100644 --- a/xen/include/public/arch-x86/hvm/start_info.h +++ b/xen/include/public/arch-x86/hvm/start_info.h @@ -99,6 +99,13 @@ #define XEN_HVM_MEMMAP_TYPE_DISABLED 6 #define XEN_HVM_MEMMAP_TYPE_PMEM 7 =20 +/* Xen-specific types (OEM-specific range of the ACPI spec) */ +#define XEN_HVM_MEMMAP_TYPE_SHARED_INFO 0xF0000001 /* Shared info page */ +#define XEN_HVM_MEMMAP_TYPE_GRANT_TABLE 0xF0000002 /* Grant table pages = */ +#define XEN_HVM_MEMMAP_TYPE_GNTTAB_STATUS 0xF0000003 /* Grant table status= page (v2) */ +#define XEN_HVM_MEMMAP_TYPE_FOREIGN_REG 0xF0000004 /* Suitable region fo= r grant mappings */ + /* and foreign mappin= gs */ + /* * C representation of the x86/HVM start info layout. * --=20 2.50.1 Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech