Re: [Xen-devel] [RFC, v2, 1/9] hyper_dmabuf: initial upload of hyper_dmabuf drv core framework

2018-04-11 Thread Julien Grall

Hi,

On 04/10/2018 09:53 AM, Oleksandr Andrushchenko wrote:

On 02/14/2018 03:50 AM, Dongwon Kim wrote:
diff --git a/drivers/dma-buf/hyper_dmabuf/hyper_dmabuf_id.h 


[...]


+#ifndef __HYPER_DMABUF_ID_H__
+#define __HYPER_DMABUF_ID_H__
+
+#define HYPER_DMABUF_ID_CREATE(domid, cnt) \
+    domid) & 0xFF) << 24) | ((cnt) & 0xFF))

I would define hyper_dmabuf_id_t.id as a union or 2 separate
fields to avoid his magic


I am not sure the union would be right here because the layout will 
differs between big and little endian. So does that value will be passed 
to other guest?


Cheers,

--
Julien Grall
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [Xen-devel] [RFC, v2, 1/9] hyper_dmabuf: initial upload of hyper_dmabuf drv core framework

2018-04-10 Thread Oleksandr Andrushchenko

On 04/10/2018 01:47 PM, Julien Grall wrote:

Hi,

On 04/10/2018 09:53 AM, Oleksandr Andrushchenko wrote:

On 02/14/2018 03:50 AM, Dongwon Kim wrote:
diff --git a/drivers/dma-buf/hyper_dmabuf/hyper_dmabuf_id.h 


[...]


+#ifndef __HYPER_DMABUF_ID_H__
+#define __HYPER_DMABUF_ID_H__
+
+#define HYPER_DMABUF_ID_CREATE(domid, cnt) \
+    domid) & 0xFF) << 24) | ((cnt) & 0xFF))

I would define hyper_dmabuf_id_t.id as a union or 2 separate
fields to avoid his magic


I am not sure the union would be right here because the layout will 
differs between big and little endian.

Agree

So does that value will be passed to other guest?

As per my understanding yes, with HYPER_DMABUF_EXPORT request


Cheers,



___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel