[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 09/11] tmem: Use 'struct tmem_oid' in tmem_handle and move it to sysctl header.



>>> On 01.09.15 at 22:12, <konrad.wilk@xxxxxxxxxx> wrote:
> .. with the changes that Jan requested the patch ended up looking
> like:
> 
> From 4fd1cf85b10565b7b7e3f73d19fa30de808ff60f Mon Sep 17 00:00:00 2001
> From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Date: Mon, 31 Aug 2015 11:00:29 -0400
> Subject: [PATCH v3.1 08/10] tmem: Use 'struct xen_tmem_oid' for every user.
> 
> Patch "tmem: Make the uint64_t oid[3] a proper structure:
> xen_tmem_oid" converted the sysctl API to use an
> proper structure. But it did not do it for the tmem hypercall.
> 
> This expands that and converts the tmem hypercall. For this
> to work we define the struct in tmem.h and include it in
> sysctl.h.
> 
> This change also included work to make the compat layer
> happy. That was to declare the struct xen_tmem_oid to be
> checked in xlat.lst - which will construct an typedef
> in the compat file with the same type, hence allowing
> copying of 'oid' member without type issues. The kicker
> is that the compat layer adds the prefix 'xen' and since
> our structure already has it - we must not include it.
> 
> The layout (and size) of this structure in memory for the
> 'struct tmem_op' (so guest facing) is the same! Verified
> via pahole and with 32/64 bit guests.
> 
> --- /tmp/old    2015-08-27 16:34:00.535638730 -0400
> +++ /tmp/new    2015-08-27 16:34:10.447705328 -0400
> @@ -8,7 +8,7 @@
>                         uint32_t   arg1;                 /*    28     4 */
>                 } creat;                                 /*          24 */
>                 struct {
> -                       uint64_t   oid[3];               /*     8    24 */
> +                       xen_tmem_oid_t oid;              /*     8    24 */
>                         uint32_t   index;                /*    32     4 */
>                         uint32_t   tmem_offset;          /*    36     4 */
>                         uint32_t   pfn_offset;           /*    40     4 */
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

My ack (given for v3) stands.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.