Received: by 10.213.65.68 with SMTP id h4csp3744589imn; Tue, 10 Apr 2018 04:08:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Q6fPW16peRBFnbhPNy0GIxsYKfwLetpsO2UoLUc04h/bbMFmF7Gcqj5wPk210EQhkAr7I X-Received: by 10.98.157.7 with SMTP id i7mr2318966pfd.85.1523358509844; Tue, 10 Apr 2018 04:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523358509; cv=none; d=google.com; s=arc-20160816; b=q6Njy55bed0cnGKo15X4fwZnT52WZUdLfOBoNXPUQ8hwTP1fC7mnPf2ZZWY7RLjH81 GPVuRxXwhVVXkQAFct++MOJS0jiVUdOwAASTRqMD1Mt0yn7R2QGKJlKmPsJOOTNHfLyT Wrn+1xVH6XVxdFwkwAKQCIZLda3FAC4XlUSCiFOMlkRxx6A3wDprXTMEUCgm77ZdFJRc 6D0ZRH+WM8BBvnPVe4b841oL1gbeM9kYDHNA/uLhjwyXe8SngO7ULT0dpoYR3mytX2AS 2cusyDh++xARiiEWcyGzf3y2cih9tPDmKy3C1UiH3DbCKk4b4Po2YNCF2luD9ZfLmRrY gVaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=rp9wU6bEuYb9I0XcBCWvri2ytFqsi9aOQ5rdOMAquzw=; b=YyBeAjQQDQJkMbygK4kIyC5sVo0KsJLSPbQRvc/eKpORaZX4CUY1UKrGutMOMc8p40 0WjTEHOos0oxhGD5tTSLrrFkUFpKzf8NeeFUsmDNAczoSAkjr291flOyhYpqpkIbvU21 XAXVSuVQ3Jax6cgqWSSFezFZcuG6YztmltuJ4y0O5YEt+8l0YhunWeNfnLiQmdURwKLU 5APYIh2pI8viTBTK9NpOaMkvlDbRBqzEEGH5mwmPXl1OHQ2I4P0PRrtZ8wD4BFUmx8qH 90xH/RCDQtnx+agQEUs3PJYYUHjm/SdbST9lKG1yg4/00yogTE1anqQyoo7S2QkylKCO hRPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k/i4U0/g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si1845993pfn.352.2018.04.10.04.07.52; Tue, 10 Apr 2018 04:08:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k/i4U0/g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752753AbeDJLEu (ORCPT + 99 others); Tue, 10 Apr 2018 07:04:50 -0400 Received: from mail-lf0-f46.google.com ([209.85.215.46]:34354 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943AbeDJLEs (ORCPT ); Tue, 10 Apr 2018 07:04:48 -0400 Received: by mail-lf0-f46.google.com with SMTP id x125-v6so97172lff.1 for ; Tue, 10 Apr 2018 04:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=rp9wU6bEuYb9I0XcBCWvri2ytFqsi9aOQ5rdOMAquzw=; b=k/i4U0/gY3a34S6rnJ9yyo4ImbOgUR7MvZBdtu7uDdi2hq8/lmTURQjHcobxJYDs/c RNR5EWitaH+fzydBpwz9bIP6mDeNniKi/H2JVUf9MlT1XV7NzY1+PvEO/aQEpYqEnkzT z1q3RhNhXZEUSiUiX7WUTRMgHGIgrk7pcrU5XzQD9JcjOToILzmw/nPp6dtZkrX9GcyP PuVgHL45rOZ9AC70ynxRhqlYPGVvAEc0UBui0noGO+yQVEN35TsKOOwo4XewLXvF/bVq XWEVrxINecz7QbEbXlgTT3pPdDwBgSmTiWPb9C2dWzxoyx3bEF5n16+kO8RqQFvr8/PF 8VQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=rp9wU6bEuYb9I0XcBCWvri2ytFqsi9aOQ5rdOMAquzw=; b=IBTl0D03O8BwsYGCDow1OXeq/C3P46U1ayt+9d8PCai/0klaqzWMZ6AffXanFsrQn4 S/VVToXvL7GHD0KPPKGNnKMFDOH3jmQ2BhKcfuRAkroglFuD+zTCrAfE53vHLEkQAaRV xAuPdaCXjSgSxuoyL46q5tobW9e/w5ueI8CYCy0z2d8lnCuuKNanRAnRQBzq//ervtcn vmdsIHGHIvt9IIK5Rc650coWY+6wD9b1pYKlXoJNswZK4LkZWZO6lccKr2Xq93Q8EYzO SDCwX5Jnz5VU214cnBVXTvLPe1gDG/6KhqgLD+lfOD6VZOZf3qsrfGS4iD/p61eYFAOq mTdA== X-Gm-Message-State: AElRT7HT4h4skwgnht1x7/5DIQxiWhKKp/URwlO097z1T9oXBXTcwMhn w46qVEKeguuCGJ+iDCSXmv4= X-Received: by 10.46.99.216 with SMTP id s85mr25793549lje.105.1523358287202; Tue, 10 Apr 2018 04:04:47 -0700 (PDT) Received: from [10.17.182.9] (ll-53.209.223.85.sovam.net.ua. [85.223.209.53]) by smtp.gmail.com with ESMTPSA id v4sm445038lji.15.2018.04.10.04.04.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 04:04:46 -0700 (PDT) Subject: Re: [Xen-devel] [RFC, v2, 1/9] hyper_dmabuf: initial upload of hyper_dmabuf drv core framework To: Julien Grall , Dongwon Kim , linux-kernel@vger.kernel.org, linaro-mm-sig@lists.linaro.org, xen-devel@lists.xenproject.org Cc: mateuszx.potrola@intel.com, dri-devel@lists.freedesktop.org References: <20180214015008.9513-2-dongwon.kim@intel.com> <7647f032-29ee-ef83-d0a6-b625cef00b72@gmail.com> <05859c14-e4a9-db9e-bb4c-35aa26d04c23@arm.com> From: Oleksandr Andrushchenko Message-ID: <2cc94762-d027-95bb-9e0d-c72e98da082c@gmail.com> Date: Tue, 10 Apr 2018 14:04:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <05859c14-e4a9-db9e-bb4c-35aa26d04c23@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) & 0xFFFFFF)) >> 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, >