Received: by 10.192.165.148 with SMTP id m20csp4425298imm; Tue, 24 Apr 2018 02:29:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx48bxSFkekSv3JwdLbYtGUElcS/fwXmun+qszdXUmknGw0zsMyyqHx8LCMGRac4gj8dgi/A5 X-Received: by 10.101.72.1 with SMTP id h1mr17760824pgs.96.1524562182703; Tue, 24 Apr 2018 02:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524562182; cv=none; d=google.com; s=arc-20160816; b=eaO6T52TFu1X2OlWRzeKvnyWSqpg1wJGxHF9UTrxiRtR1sE8IBBpM0tX6KBxMLIubf dq4UmH6bKZkTROWZZv3FN/KKDvF64d97ac+usl2knorkXmwDITqJ1ITQ3nj5AVfaz81q ZgC+hqXblzeZIlZYOWSxd8qfdCEKVvGKy/HgMGuqUopg+dYUR9KMbXVRDWZLcqvYc4MR hepLoDIfD8p70uAadCc3cdSyH+4+8TjCPPF5zywYR94e8X0tFdqNwmgnPTug0f9t9ZMr ZKngFBP2+cUO5CY6p73rXp2AzeCKHuu9raMZHlH6A7yaDQU4bpEgFvlPTHomYgYi5Ppk rSbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput: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=FIUYeaEFY3Z1m/e1WRz2gzt2LDacn099ZDM4MdTF2z8=; b=WUFKN79Hbsk1W5Oy/izXgngCp3wkgfYn34qdSlBCTqVqFZIH7MAaSvbXP+mk6dnwf4 jq4zSAV2Mb2zpt9b9Vy8wpyfksRvmcBehsF8/wpw/R+MVh+MrwVHZf7/JvZz8hVTzfbP f/EJuvPgtClMOrA6alMTjrD9Ks/bh05sZqO5MFy2Js7w1SHonkPZt+VmF6TLLXWXKNqe hQilygwcM9J+oxruYSWKoY/3GX8evNvLEI1ysc8FUSdzV0uVUCr9voKHq3W22N2ijsO+ /shh66EO/ZlMHwkYAoMAkefFBwE/1pz3G2pdEZL+sfwm6eNL+cZOtW1lj1T4Tva7w50a n++Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@epam.com header.s=selector1 header.b=P3aiglvn; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=epam.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si1803188pfk.146.2018.04.24.02.29.27; Tue, 24 Apr 2018 02:29:42 -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=@epam.com header.s=selector1 header.b=P3aiglvn; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=epam.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754603AbeDXJN1 (ORCPT + 99 others); Tue, 24 Apr 2018 05:13:27 -0400 Received: from mail-he1eur01on0050.outbound.protection.outlook.com ([104.47.0.50]:2104 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754462AbeDXJNW (ORCPT ); Tue, 24 Apr 2018 05:13:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FIUYeaEFY3Z1m/e1WRz2gzt2LDacn099ZDM4MdTF2z8=; b=P3aiglvnQCkVk7LZkuVeNWq2k9hVYdiqZ9uUA/fcSMHDxZLj2J0EZXhyQjRJGvBFCFBTX0mxZ5EOvynPDB+SlN2Q5tAqAebabXg6crz8QvQdLbssJJoMGqpSD5dH+fxgZC3qDmhOUSJl3nb3YnoxLKgoXDJVZ7L6IZrnTwQ7N5Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Oleksandr_Andrushchenko@epam.com; Received: from [10.17.182.9] (85.223.209.52) by AM4PR0301MB1940.eurprd03.prod.outlook.com (2603:10a6:200:38::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.12; Tue, 24 Apr 2018 09:13:17 +0000 Subject: Re: [Xen-devel] [PATCH 0/1] drm/xen-zcopy: Add Xen zero-copy helper DRM driver To: Juergen Gross , Oleksandr Andrushchenko , Boris Ostrovsky , Wei Liu Cc: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Artem Mygaiev , Dongwon Kim , konrad.wilk@oracle.com, airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Potrola, MateuszX" , xen-devel@lists.xenproject.org, daniel.vetter@intel.com, ian.jackson@eu.citrix.com References: <5d8fec7f-956c-378f-be90-f45029385740@gmail.com> <20180416192905.GA18096@downor-Z87X-UD5H> <20180417075928.GT31310@phenom.ffwll.local> <20180417205744.GA15930@downor-Z87X-UD5H> <41487acb-a67a-8933-d0c3-702c19b0938e@gmail.com> <20180418073508.ptvntwedczpvl7bx@MacBook-Pro-de-Roger.local> <20180418101058.hyqk3gr3b2ibxswu@MacBook-Pro-de-Roger.local> <20180420071914.GG31310@phenom.ffwll.local> <76cdc65a-7bb1-9377-7bc5-6164e32f7b5d@gmail.com> <20180423115242.ywdwqblj2aseu3fr@citrix.com> <61105351-8896-072b-abf0-757c7f6c0edf@gmail.com> <30ddb005-96c8-f47c-2e23-4e0d354e5842@gmail.com> <6089d701-5221-75b4-38eb-b23bc5dc30cd@suse.com> <85fc8f82-6d4d-9343-2737-85b7d7391168@gmail.com> <0657bbb5-5cb7-4c63-5490-fbfc7dec1e59@suse.com> From: Oleksandr Andrushchenko Message-ID: <8ca35dbc-5beb-98ea-ce73-eeb388bb3e2c@epam.com> Date: Tue, 24 Apr 2018 12:13:13 +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: <0657bbb5-5cb7-4c63-5490-fbfc7dec1e59@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [85.223.209.52] X-ClientProxiedBy: PR2P264CA0012.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::24) To AM4PR0301MB1940.eurprd03.prod.outlook.com (2603:10a6:200:38::16) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM4PR0301MB1940; X-Microsoft-Exchange-Diagnostics: 1;AM4PR0301MB1940;3:MDQUXKFL0/b68Xu5ECVyCaMgR0hexPgqgCiMY1S/T7w57V/TBubbvOD4sdHm2RCgIkjgAYLBHGUlCaPmvxWWh1hV8v5pXK9mRI0/+n5ltU96PtaZXZFnhY4DQVxwb/ZniotLnvKz9K0XHmyg6SA/nE0/vOf0WbX2OCJLpxcS95TmGM3/EaZbou/XOYjnr3RjqkA4S1R1doQ4UxgpQvwEOg3F4rIJHd3FPXldLjvMyM0scZQfcVOhVfCtalmbLTZY;25:/E23k02EcvqyvwlpUPNtJUhUAfoOXiffNg/YorRDmmuYC21sNk6xjxeg8YtVBdU9Qm2de1NDrUaIOha4lryddsxChU+sDWvW8Pi3L2mhdUx7PnC11GJ9g1u4avcCQ1hAdqrO8IGS0e1jUXbGZfEDtZVuwsdQWU4YidVihgmisV4txeSiepThfY4ZLXRqNsmZ/8cKNeQ33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KwaM/wBSmZcj3+uzaS1qcB2DmguR5810TK9CjdRIv+YXHOCHgLAQyYwLIUkVNJObId9D9EW1YzFUpN4EMZiqAcMBdqaBohT+QIkZLkqUi6nXfT1lPZ5B3qlq9UxRephQVCzroiY3/lfCE9wjB5ZuuQAyVSW26aNOE10bOog== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231232)(944501410)(52105095)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011);SRVR:AM4PR0301MB1940;BCL:0;PCL:0;RULEID:;SRVR:AM4PR0301MB1940; X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(346002)(396003)(376002)(39380400002)(39860400002)(366004)(16576012)(2616005)(5660300001)(7736002)(54906003)(11346002)(58126008)(446003)(316002)(8936002)(36756003)(6486002)(956004)(110136005)(31696002)(476003)(8666007)(4326008)(229853002)(53936002)(67846002)(305945005)(6246003)(39060400002)(72206003)(59450400001)(65826007)(26005)(77096007)(55236004)(53546011)(186003)(31686004)(93886005)(50466002)(2906002)(81166006)(86362001)(2870700001)(386003)(47776003)(76176011)(25786009)(16526019)(65956001)(478600001)(2486003)(6666003)(64126003)(52146003)(3846002)(6116002)(52116002)(80792005)(65806001)(7416002)(23676004)(66066001)(8676002)(21314002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR0301MB1940;H:[10.17.182.9];FPR:;SPF:None;LANG:en;MLV:ovr;PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTRQUjAzMDFNQjE5NDA7MjM6TUJmNzNUYzRER3NBdjNxZS9rQ0J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CSU7TbG1ixXeeqHZdwCTo6j8IigS1l7mtfeUB44oF4/KzXdRlnqp2fK0QCWHhcZHdMKVu9lRwt1caVa8miJxIozfzf6NKE7m4G1Qk=;24:lxDlf8zJ7aidGMiUBxnyC9QAdmH+G58CSVhSCEZr3nRK/Q1CUmFGgTfFT20tKg+j+FvSgrIU/8V9yy6DJYHsStqwGuxomFXDhk9QIVwdGUE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM4PR0301MB1940;7:ZGwE3dJLItpEpekf7kZtkuSsJAZrIrU5uRungW49P6n8R9Yrmk+yNSpWhqzN6QS/UC6E/+2juO3xg11u4+FxrBIMMeByzM6r069ExPr3gG10XZycvLk2O6jDl1C3fSE9/FwxxvTd/M9zIuAT9F/Ll2AQ4i935cl38cAe+zkKyST4buNjpRZp71cxqbkW89/KJEfPohSHlqsTsej0as9Eqvu+t/RpWjmC7QBIg3+/7AFuxuoR0HrrJdJnr8HcYUTA X-MS-Office365-Filtering-Correlation-Id: cc3af158-2256-4801-900d-08d5a9c39e6d X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 09:13:17.2990 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc3af158-2256-4801-900d-08d5a9c39e6d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0301MB1940 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/24/2018 12:08 PM, Juergen Gross wrote: > On 24/04/18 11:03, Oleksandr Andrushchenko wrote: >> On 04/24/2018 11:40 AM, Juergen Gross wrote: >>> On 24/04/18 10:07, Oleksandr Andrushchenko wrote: >>>> On 04/24/2018 10:51 AM, Juergen Gross wrote: >>>>> On 24/04/18 07:43, Oleksandr Andrushchenko wrote: >>>>>> On 04/24/2018 01:41 AM, Boris Ostrovsky wrote: >>>>>>> On 04/23/2018 08:10 AM, Oleksandr Andrushchenko wrote: >>>>>>>> On 04/23/2018 02:52 PM, Wei Liu wrote: >>>>>>>>> On Fri, Apr 20, 2018 at 02:25:20PM +0300, Oleksandr Andrushchenko >>>>>>>>> wrote: >>>>>>>>>>>>         the gntdev. >>>>>>>>>>>> >>>>>>>>>>>> I think this is generic enough that it could be implemented by a >>>>>>>>>>>> device not tied to Xen. AFAICT the hyper_dma guys also wanted >>>>>>>>>>>> something similar to this. >>>>>>>>>>> You can't just wrap random userspace memory into a dma-buf. We've >>>>>>>>>>> just had >>>>>>>>>>> this discussion with kvm/qemu folks, who proposed just that, and >>>>>>>>>>> after a >>>>>>>>>>> bit of discussion they'll now try to have a driver which just >>>>>>>>>>> wraps a >>>>>>>>>>> memfd into a dma-buf. >>>>>>>>>> So, we have to decide either we introduce a new driver >>>>>>>>>> (say, under drivers/xen/xen-dma-buf) or extend the existing >>>>>>>>>> gntdev/balloon to support dma-buf use-cases. >>>>>>>>>> >>>>>>>>>> Can anybody from Xen community express their preference here? >>>>>>>>>> >>>>>>>>> Oleksandr talked to me on IRC about this, he said a few IOCTLs >>>>>>>>> need to >>>>>>>>> be added to either existing drivers or a new driver. >>>>>>>>> >>>>>>>>> I went through this thread twice and skimmed through the relevant >>>>>>>>> documents, but I couldn't see any obvious pros and cons for either >>>>>>>>> approach. So I don't really have an opinion on this. >>>>>>>>> >>>>>>>>> But, assuming if implemented in existing drivers, those IOCTLs >>>>>>>>> need to >>>>>>>>> be added to different drivers, which means userspace program >>>>>>>>> needs to >>>>>>>>> write more code and get more handles, it would be slightly >>>>>>>>> better to >>>>>>>>> implement a new driver from that perspective. >>>>>>>> If gntdev/balloon extension is still considered: >>>>>>>> >>>>>>>> All the IOCTLs will be in gntdev driver (in current xen-zcopy >>>>>>>> terminology): >>>>>>>>     - DRM_ICOTL_XEN_ZCOPY_DUMB_FROM_REFS >>>>>>>>     - DRM_IOCTL_XEN_ZCOPY_DUMB_TO_REFS >>>>>>>>     - DRM_IOCTL_XEN_ZCOPY_DUMB_WAIT_FREE >>>>>>>> >>>>>>>> Balloon driver extension, which is needed for contiguous/DMA >>>>>>>> buffers, will be to provide new *kernel API*, no UAPI is needed. >>>>>>>> >>>>>>> So I am obviously a bit late to this thread, but why do you need >>>>>>> to add >>>>>>> new ioctls to gntdev and balloon? Doesn't this driver manage to do >>>>>>> what >>>>>>> you want without any extensions? >>>>>> 1. I only (may) need to add IOCTLs to gntdev >>>>>> 2. balloon driver needs to be extended, so it can allocate >>>>>> contiguous (DMA) memory, not IOCTLs/UAPI here, all lives >>>>>> in the kernel. >>>>>> 3. The reason I need to extend gnttab with new IOCTLs is to >>>>>> provide new functionality to create a dma-buf from grant references >>>>>> and to produce grant references for a dma-buf. This is what I have as >>>>>> UAPI >>>>>> description for xen-zcopy driver: >>>>>> >>>>>> 1. DRM_IOCTL_XEN_ZCOPY_DUMB_FROM_REFS >>>>>> This will create a DRM dumb buffer from grant references provided >>>>>> by the frontend. The intended usage is: >>>>>>     - Frontend >>>>>>       - creates a dumb/display buffer and allocates memory >>>>>>       - grants foreign access to the buffer pages >>>>>>       - passes granted references to the backend >>>>>>     - Backend >>>>>>       - issues DRM_XEN_ZCOPY_DUMB_FROM_REFS ioctl to map >>>>>>         granted references and create a dumb buffer >>>>>>       - requests handle to fd conversion via >>>>>> DRM_IOCTL_PRIME_HANDLE_TO_FD >>>>>>       - requests real HW driver/consumer to import the PRIME buffer >>>>>> with >>>>>>         DRM_IOCTL_PRIME_FD_TO_HANDLE >>>>>>       - uses handle returned by the real HW driver >>>>>>     - at the end: >>>>>>       o closes real HW driver's handle with DRM_IOCTL_GEM_CLOSE >>>>>>       o closes zero-copy driver's handle with DRM_IOCTL_GEM_CLOSE >>>>>>       o closes file descriptor of the exported buffer >>>>>> >>>>>> 2. DRM_IOCTL_XEN_ZCOPY_DUMB_TO_REFS >>>>>> This will grant references to a dumb/display buffer's memory >>>>>> provided by >>>>>> the >>>>>> backend. The intended usage is: >>>>>>     - Frontend >>>>>>       - requests backend to allocate dumb/display buffer and grant >>>>>> references >>>>>>         to its pages >>>>>>     - Backend >>>>>>       - requests real HW driver to create a dumb with >>>>>> DRM_IOCTL_MODE_CREATE_DUMB >>>>>>       - requests handle to fd conversion via >>>>>> DRM_IOCTL_PRIME_HANDLE_TO_FD >>>>>>       - requests zero-copy driver to import the PRIME buffer with >>>>>>         DRM_IOCTL_PRIME_FD_TO_HANDLE >>>>>>       - issues DRM_XEN_ZCOPY_DUMB_TO_REFS ioctl to >>>>>>         grant references to the buffer's memory. >>>>>>       - passes grant references to the frontend >>>>>>    - at the end: >>>>>>       - closes zero-copy driver's handle with DRM_IOCTL_GEM_CLOSE >>>>>>       - closes real HW driver's handle with DRM_IOCTL_GEM_CLOSE >>>>>>       - closes file descriptor of the imported buffer >>>>>> >>>>>> 3. DRM_XEN_ZCOPY_DUMB_WAIT_FREE >>>>>> This will block until the dumb buffer with the wait handle provided be >>>>>> freed: >>>>>> this is needed for synchronization between frontend and backend in >>>>>> case >>>>>> frontend provides grant references of the buffer via >>>>>> DRM_XEN_ZCOPY_DUMB_FROM_REFS IOCTL and which must be released before >>>>>> backend replies with XENDISPL_OP_DBUF_DESTROY response. >>>>>> wait_handle must be the same value returned while calling >>>>>> DRM_XEN_ZCOPY_DUMB_FROM_REFS IOCTL. >>>>>> >>>>>> So, as you can see the above functionality is not covered by the >>>>>> existing UAPI >>>>>> of the gntdev driver. >>>>>> Now, if we change dumb -> dma-buf and remove DRM code (which is only a >>>>>> wrapper >>>>>> here on top of dma-buf) we get new driver for dma-buf for Xen. >>>>>> >>>>>> This is why I have 2 options here: either create a dedicated driver >>>>>> for >>>>>> this >>>>>> (e.g. re-work xen-zcopy to be DRM independent and put it under >>>>>> drivers/xen/xen-dma-buf, for example) or extend the existing gntdev >>>>>> driver >>>>>> with the above UAPI + make changes to the balloon driver to provide >>>>>> kernel >>>>>> API for DMA buffer allocations. >>>>> Which user component would use the new ioctls? >>>> It is currently used by the display backend [1] and will >>>> probably be used by the hyper-dmabuf frontend/backend >>>> (Dongwon from Intel can provide more info on this). >>>>> I'm asking because I'm not very fond of adding more linux specific >>>>> functions to libgnttab which are not related to a specific Xen version, >>>>> but to a kernel version. >>>> Hm, I was not thinking about this UAPI to be added to libgnttab. >>>> It seems it can be used directly w/o wrappers in user-space >>> Would this program use libgnttab in parallel? >> In case of the display backend - yes, for shared rings, >> extracting grefs from displif protocol it uses gntdev via >> helper library [1] >>>   If yes how would the two >>> usage paths be combined (same applies to the separate driver, btw)? The >>> gntdev driver manages resources per file descriptor and libgnttab is >>> hiding the file descriptor it is using for a connection. >> Ah, at the moment the UAPI was not used in parallel as there were >> 2 drivers for that: gntdev + xen-zcopy with different UAPIs. >> But now, if we extend gntdev with the new API then you are rigth: >> either libgnttab needs to be extended or that new part of the >> gntdev UAPI needs to be open-coded by the backend >>>   Or would the >>> user program use only the new driver for communicating with the gntdev >>> driver? In this case it might be an option to extend the gntdev driver >>> to present a new device (e.g. "gntdmadev") for that purpose. >> No, it seems that libgnttab and this new driver's UAPI will be used >> in parallel >>>>> So doing this in a separate driver seems to be the better option in >>>>> this regard. >>>> Well, from maintenance POV it is easier for me to have it all in >>>> a separate driver as all dma-buf related functionality will >>>> reside at one place. This also means that no changes to existing >>>> drivers will be needed (if it is ok to have ballooning in/out >>>> code for DMA buffers (allocated with dma_alloc_xxx) not in the balloon >>>> driver) >>> I think in the end this really depends on how the complete solution >>> will look like. gntdev is a special wrapper for the gnttab driver. >>> In case the new dma-buf driver needs to use parts of gntdev I'd rather >>> have a new driver above gnttab ("gntuser"?) used by gntdev and dma-buf. >> The new driver doesn't use gntdev's existing API, but extends it, >> e.g. by adding new ways to export/import grefs for a dma-buf and >> manage dma-buf's kernel ops. Thus, gntdev, which already provides >> UAPI, seems to be a good candidate for such an extension > So this would mean you need a modification of libgnttab, right? This is > something the Xen tools maintainers need to decide. In case they don't > object extending the gntdev driver would be the natural thing to do. Wei is already in the thread, adding Ian > > Juergen