From: "Jan Beulich" Subject: Re: [RFC][v3][PATCH 1/6] xen:x86: record RMRR mappings Date: Tue, 19 Aug 2014 14:12:24 +0100 Message-ID: <53F35B4802000078000BAC87@mail.emea.novell.com> References: <1408091238-18364-1-git-send-email-tiejun.chen@intel.com> <1408091238-18364-2-git-send-email-tiejun.chen@intel.com> <53EDD539.90403@citrix.com> <53EE436502000078000BA911@mail.emea.novell.com> <53F1AE4C.5050002@intel.com> <53F1CE0D.7080005@citrix.com> <53F2003B02000078000BAAC3@mail.emea.novell.com> <53F2B313.5010408@intel.com> <53F2B635.9030208@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53F2B635.9030208@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: andrew.cooper3@citrix.com, tiejun.chen@intel.com Cc: kevin.tian@intel.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org >>> "Chen, Tiejun" 08/19/14 4:28 AM >>> >On 2014/8/19 10:14, Chen, Tiejun wrote: > Please don't say simply that e820entry is not suitable, what's your > preferred structure here? > > Looks you are saying something like, > > struct __packed rmrr_entry { > uint64_t addr; > uint64_t size; > }; > > but compare that to the existing e820entry, > > struct __packed e820entry { > uint64_t addr; > uint64_t size; > uint32_t type; > }; struct xen_reserved_device_memory { xen_pfn_t pfn; xen_ulong_t count; }; >Another concern is that we always use xen_memory_map for the hypercall, > >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. >*/ >unsigned int 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; >}; > >As it comments above, theoretical e820 is expected in buffer. That's what your patch currently does - nothing keeps you from either altering the comment or defining a new structure (and then right away with a properly typed handle). Jan