From: "Jan Beulich" Subject: [v5][PATCH 08/10] tools:firmware:hvmloader: introduce hypercall for xc_reserved_device_memory_map Date: Tue, 02 Sep 2014 09:37:43 +0100 Message-ID: <54059DF7020000780002FBC9@mail.emea.novell.com> References: <1409050980-21933-1-git-send-email-tiejun.chen@intel.com> <1409050980-21933-9-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1409050980-21933-9-git-send-email-tiejun.chen@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tiejun Chen Cc: kevin.tian@intel.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 26.08.14 at 13:02, wrote: > --- a/tools/firmware/hvmloader/util.c > +++ b/tools/firmware/hvmloader/util.c > @@ -828,6 +828,28 @@ int hpet_exists(unsigned long hpet_base) > return ((hpet_id >> 16) == 0x8086); > } > > +int get_reserved_device_memory_map(struct reserved_device_memory *entries, > + uint32_t max_entries) > +{ > + static int map_done = 0; > + struct xen_mem_reserved_device_memory_map memmap = { > + .nr_entries = max_entries > + }; > + > + if ( map_done ) > + return 0; > + > + set_xen_guest_handle(memmap.buffer, entries); struct reserved_device_memory (the type which entries is a pointer to) is a privately defined type. You shouldn't pass this to a hypercall. Jan