Received: by 10.213.65.68 with SMTP id h4csp3727231imn; Tue, 10 Apr 2018 03:51:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ALpY8TEAhqfBy16JjVVAULwcCOwFtqUwaszquPjyh19r5dLk/WIX6AZha1XcrFIoRGHth X-Received: by 10.99.100.132 with SMTP id y126mr27276355pgb.77.1523357487621; Tue, 10 Apr 2018 03:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523357487; cv=none; d=google.com; s=arc-20160816; b=kYnrCE/GwepQzG9Pjj9Z//q2Y/Y8Qxt97Zi/cS/tY1foFAWyDWUpLaMLyUNhsqP1iO jPe0AWD+vrLdmDNPSzJOJ01vuS3YR8YSiTEdUKFY2Pn/R7/tB86TZUR9zXtLtPW9Tjjo JPo9TuoSEyAdctGLCYrcX5v4CfBsqxPdbxOjozaHMpmN/T8kOA7X9GcA+N8voeSNU6td u4LNfdu6THBrzDrEo5i0IMJcoyuCO+IxZieJCrfwnZC2doTEUATeTOtFyKuOSXqFPKgX ThND4PMrrN7YUOp9rOTzlBsbK7TU5JgdCxd1vVKdbFzNUj4lgFSvvEtS7f9MWWI1r6eJ IrZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=w1MNZPntKo9lmaE4grxb2XKnqRlbl0LJtMDKZhtTBRw=; b=KNcTpcrPwMSQqHLgfjaoxWpcDs3cJeSgGtAY30lsj/W3Mg1ZDLJ80AhEXTr6jypgbT u7P3p2w3jcJXAlOttBBFtSnCk+JIvTqSEflRSKxJn0h70XvVhaHxXTfBZs3y/prpDK/H cpitj1P5gM1mHxYvQ1Z7Zf5qlUe4WFjeJNu/qxMmun6DMOCpRuOkjrFYezZSGmP9LU3y +T5cBG48yH1vlYi/0cs3+AfcYvMWbPbrZTgZgYq1QpeyhnGX/EbyDPG6Rly/AJ2L2O5s T5N9WOpCbkLpkQyYkDq12plk7btU6yttoKXSra1Yukkz9SXGuFlHij4DzegTF73lgIXQ tdGQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si2279231ple.584.2018.04.10.03.50.49; Tue, 10 Apr 2018 03:51:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbeDJKrq (ORCPT + 99 others); Tue, 10 Apr 2018 06:47:46 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36426 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751471AbeDJKrq (ORCPT ); Tue, 10 Apr 2018 06:47:46 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A13031435; Tue, 10 Apr 2018 03:47:45 -0700 (PDT) Received: from [10.37.12.72] (unknown [10.37.12.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 43C103F24A; Tue, 10 Apr 2018 03:47:44 -0700 (PDT) Subject: Re: [Xen-devel] [RFC, v2, 1/9] hyper_dmabuf: initial upload of hyper_dmabuf drv core framework To: Oleksandr Andrushchenko , 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> From: Julien Grall Message-ID: <05859c14-e4a9-db9e-bb4c-35aa26d04c23@arm.com> Date: Tue, 10 Apr 2018 11:47:42 +0100 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: <7647f032-29ee-ef83-d0a6-b625cef00b72@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. So does that value will be passed to other guest? Cheers, -- Julien Grall