From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Fri, 12 Apr 2019 02:22:09 -0700 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7655888307; Fri, 12 Apr 2019 09:22:09 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-65.rdu2.redhat.com [10.10.120.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA63219728; Fri, 12 Apr 2019 09:22:07 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 20/31] OvmfPkg: Import XENMEM_memory_map hypercall to Xen/memory.h To: devel@edk2.groups.io, anthony.perard@citrix.com Cc: Jordan Justen , Ard Biesheuvel , Julien Grall , xen-devel@lists.xenproject.org References: <20190409110844.14746-1-anthony.perard@citrix.com> <20190409110844.14746-21-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: <0cf5b5e2-abb2-6902-29b9-240c74ae32dd@redhat.com> Date: Fri, 12 Apr 2019 11:22:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190409110844.14746-21-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 12 Apr 2019 09:22:09 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 04/09/19 13:08, Anthony PERARD wrote: > This is copied over from the public header of the Xen Project, with the (1) Please expand "This". with that, Acked-by: Laszlo Ersek Thanks Laszlo > type name modified to build on OVMF. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Anthony PERARD > --- > OvmfPkg/Include/IndustryStandard/Xen/memory.h | 23 ++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/OvmfPkg/Include/IndustryStandard/Xen/memory.h b/OvmfPkg/Include/IndustryStandard/Xen/memory.h > index 020155962c..b00a87097d 100644 > --- a/OvmfPkg/Include/IndustryStandard/Xen/memory.h > +++ b/OvmfPkg/Include/IndustryStandard/Xen/memory.h > @@ -81,6 +81,29 @@ struct xen_remove_from_physmap { > typedef struct xen_remove_from_physmap xen_remove_from_physmap_t; > DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t); > > +/* > + * Returns the pseudo-physical memory map as it was when the domain > + * was started (specified by XENMEM_set_memory_map). > + * arg == addr of xen_memory_map_t. > + */ > +#define XENMEM_memory_map 9 > +struct xen_memory_map { > + /* > + * On call the number of entries which can be stored in buffer. On > + * return the number of entries which have been stored in > + * buffer. > + */ > + UINT32 nr_entries; > + > + /* > + * Entries in the buffer are in the same format as returned by the > + * BIOS INT 0x15 EAX=0xE820 call. > + */ > + XEN_GUEST_HANDLE(void) buffer; > +}; > +typedef struct xen_memory_map xen_memory_map_t; > +DEFINE_XEN_GUEST_HANDLE(xen_memory_map_t); > + > #endif /* __XEN_PUBLIC_MEMORY_H__ */ > > /* >