Re: [Xen-devel] [PATCH 5/8] gnttab: re-arrange struct active_grant_entry

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:41, Jan Beulich wrote:
> While benign to 32-bit arches, this shrinks the size from 56 to 48
> bytes on 64-bit ones (while still leaving a 16-bit hole).
>
> Signed-off-by: Jan Beulich 

Reviewed-by: Andrew Cooper 

There is some follow-on is_sub_page type cleanup you could do,
especially in acquire_grant_for_copy().

~Andrew

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 5/8] gnttab: re-arrange struct active_grant_entry

2017-08-15 Thread Jan Beulich
While benign to 32-bit arches, this shrinks the size from 56 to 48
bytes on 64-bit ones (while still leaving a 16-bit hole).

Signed-off-by: Jan Beulich 

--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -160,15 +160,15 @@ shared_entry_header(struct grant_table *
 struct active_grant_entry {
 uint32_t  pin;/* Reference count information. */
 domid_t   domid;  /* Domain being granted access. */
-struct domain *trans_domain;
+unsigned int  start:15; /* For sub-page grants, the start offset
+   in the page.   */
+bool  is_sub_page:1; /* True if this is a sub-page grant. */
+unsigned int  length:16; /* For sub-page grants, the length of the
+grant.*/
 grant_ref_t   trans_gref;
+struct domain *trans_domain;
 unsigned long frame;  /* Frame being granted. */
 unsigned long gfn;/* Guest's idea of the frame being granted. */
-unsigned  is_sub_page:1; /* True if this is a sub-page grant. */
-unsigned  start:15; /* For sub-page grants, the start offset
-   in the page.   */
-unsigned  length:16; /* For sub-page grants, the length of the
-grant.*/
 spinlock_tlock;  /* lock to protect access of this entry.
 see docs/misc/grant-tables.txt for
 locking protocol  */




___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel