From: "Jan Beulich" Subject: Re: [PATCH v6 16/16] x86/hvm: track large memory mapped accesses by buffer offset Date: Thu, 09 Jul 2015 11:34:17 +0100 Message-ID: <559E6A49020000780008EAEF@mail.emea.novell.com> References: <1435940733-20856-1-git-send-email-paul.durrant@citrix.com> <1435940733-20856-17-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZD99n-00066z-MZ for xen-devel@lists.xenproject.org; Thu, 09 Jul 2015 10:34:19 +0000 In-Reply-To: <1435940733-20856-17-git-send-email-paul.durrant@citrix.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: Paul Durrant Cc: xen-devel@lists.xenproject.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 03.07.15 at 18:25, wrote: (sorry for sending this in pieces - I started this reply and then another) > --- a/xen/include/asm-x86/hvm/vcpu.h > +++ b/xen/include/asm-x86/hvm/vcpu.h > @@ -42,6 +42,17 @@ struct hvm_vcpu_asid { > uint32_t asid; > }; > > +/* > + * We may read or write up to m256 as a number of device-model > + * transactions. > + */ > +struct hvm_mmio_cache { > + unsigned long size; > + uint8_t buffer[32]; > + unsigned long gla; > + uint8_t dir; > +}; "size" can be unsigned int (or even less, but that's not worth it) and hence the structure size can be shrunk by putting it next to "dir". Jan