Received: by 10.223.185.116 with SMTP id b49csp7177503wrg; Thu, 1 Mar 2018 00:50:39 -0800 (PST) X-Google-Smtp-Source: AG47ELuuQLR5AITOUDh25M8T67fG9IYVm9RZuo6j6UQ/HtLpBnLjW4hp0gVKVJTGx4qGr/bORRVI X-Received: by 2002:a17:902:8488:: with SMTP id c8-v6mr1219776plo.155.1519894239702; Thu, 01 Mar 2018 00:50:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519894239; cv=none; d=google.com; s=arc-20160816; b=mVmsp54c6cM7sGtzqFvVQduwTqcmf737ZyZmlWCfoh12vEXnj4TeBF1YagK4rl9dA2 n+5k5alUuNzn0R9kOSxUs1/jJJp4yjClUYi5yfrABbm7B76ONALJ5JUPb/24sOO7iC81 gu24TgPrrXXVpmriViHXNLcGXydvIOhfOL05M7cF7IcsOgVGTXbZxJJVjm52b4pGh0CL J6hF8jiMGhSg6DSN6vfg/9BlOYr1VPUyACgZgAbIsENXdLDxRHq3ZDQ5smQ85P++Km5d zH0+Lg2P7K+lvB6wtBZu4K9W4WxMTs9fkDLRC+ldLaGWYxiUknxb73392Mk1pfR2ZeXM aGUQ== 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=qTJvz8K69FQOLegLJFyZuTc0hV3lhug3txjasoa7+RA=; b=sd+wsyk0724l7GFVau1MvwWfuNzluktim5bClLcNhytjAJZja7WkDREvUCgKYZ3ZO8 tuioLRHf/aB2eLJpS5DfbMHYehWww0+qeFSl3oVtfOKy7lDUvHTdLAvzL4nSmh3mFXZ2 QMrugbtSk9sze6lJVpqkYXqn1lbSyNMoPzXtr1nw/eUsJxQkZ0ji0e7+Mrb0w0U3mKkp YphQ6Q7wIZfMTE/mbAWsENNfg1ukb9jjr6PlyiprsDKKoFTlIV12WQWdSsAzQFx02oe2 msSJs+pIBUb00Nozm/5tRUusetj3XfNpM4aPxv2Tnlr0oZdjKtHIHAjUCthUJkvw//m7 2/TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UNJluLaP; 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 y4si2180066pgq.380.2018.03.01.00.50.25; Thu, 01 Mar 2018 00:50:39 -0800 (PST) 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=UNJluLaP; 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 S966550AbeCAItM (ORCPT + 99 others); Thu, 1 Mar 2018 03:49:12 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36986 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965838AbeCAItL (ORCPT ); Thu, 1 Mar 2018 03:49:11 -0500 Received: by mail-lf0-f65.google.com with SMTP id y19so7640805lfd.4 for ; Thu, 01 Mar 2018 00:49:10 -0800 (PST) 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=qTJvz8K69FQOLegLJFyZuTc0hV3lhug3txjasoa7+RA=; b=UNJluLaP7d54x6tnqN8o2f9/DSsOkYcqlRsbsud2YvCNVupvH5LHO8td3Ni28lhvaX CEQAca+FlywfGiZDdncwVaAp4kXAOhsQeGAyvhVk7CC/exY8g2O7IkWL35Y/mpLfe2os O9zi2bqYoyACvATaZy48DSxHjK1hv0TM7UkaJBtV1UuzgIZRLMZNYmPt4od/W7inzvsT JO1qfnMQyCtNUs5RU+gZZ4pRywT0vVamoA56GrTtCcpfjNjAe0sODTvbruXcRz5vsksl u1uXSSZbGOcpG6mHE/mUHWBDj0Hpvf/inyfIIo8qFob1kqDnW2L/CKdecKvaPi2HEAmS VidQ== 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=qTJvz8K69FQOLegLJFyZuTc0hV3lhug3txjasoa7+RA=; b=I6gbcuCCAd7XyZxFehx7GBEpSnt9rt/UstTNQonRzCVI6TWuVA8/fMDOlHFrpn4L19 i3OaUPG96Oxqwn4D9tEYW6R+DIp8TdSGTP8pUxBP1iIN/9nw8ikMI+DKvGcs9oPPbsm2 XWB34kcaAiGaA9pHjm/YmOYDvQwH4kQ9gctxwVdNX8xTyajqMJnUYbBscQTDlIgfJ+9d Ajb/OeOAcfu6Vp9X3YUNC25TMZDJWmaUrWNbP5OnWNUKfiY9177mD3LKn0Yhe3fVZ631 X7jcO5EUG/MiOrzW/Jo+Mvt5KkICDuGH/Garcrm2fXgc9gm606p1+szz/hwoVp7xjlNW S40Q== X-Gm-Message-State: AElRT7EgCS/B27sXMZHAsMzfDsZLykJ8vGJKF/rQlAT2ClzSu+/Mejht UHNXnYVIG/qw+VqG/8Hd+CA= X-Received: by 10.25.42.81 with SMTP id f78mr857749lfl.100.1519894149375; Thu, 01 Mar 2018 00:49:09 -0800 (PST) Received: from [10.17.182.9] (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id q80sm776699lfb.69.2018.03.01.00.49.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 00:49:08 -0800 (PST) Subject: Re: [PATCH 0/9] drm/xen-front: Add support for Xen PV display frontend To: Gerd Hoffmann Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, daniel.vetter@intel.com, seanpaul@chromium.org, gustavo@padovan.org, jgross@suse.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, Oleksandr Andrushchenko References: <1519200222-20623-1-git-send-email-andr2000@gmail.com> <4c7e6f65-1787-3815-22b5-f9495e388c06@gmail.com> <7e265c53-db9a-0946-6b1c-b946bcbb4100@gmail.com> <20180301082648.frnslqyhffj2bkwl@sirius.home.kraxel.org> From: Oleksandr Andrushchenko Message-ID: Date: Thu, 1 Mar 2018 10:49:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180301082648.frnslqyhffj2bkwl@sirius.home.kraxel.org> 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 03/01/2018 10:26 AM, Gerd Hoffmann wrote: > Hi, > >> 1. Possible security issues - VirtIO devices are PCI bus masters, thus >> allowing real device (running, for example, in untrusted driver domain) >> to get control over guest's memory by writing to its memory >> >> 2. VirtIO currently uses GFNs written into the shared ring, without Xen >> grants support. This will require generic grant-mapping/sharing layer >> to be added to VirtIO. >> >> 3. VirtIO requires QEMU PCI emulation for setting up a device. Xen PV >> (and PVH) domains don't use QEMU for platform emulation in order to >> reduce attack surface. (PVH is in the process of gaining PCI config >> space emulation though, but it is optional, not a requirement) > Well, that is wrong. virtio doesn't require pci. There are other > transports (mmio, ccw), and it should be possible to create a xen > specific transport which uses grant tables properly. You are correct, PCI is not a requirement here > Seems there even > was an attempt to implement that in 2011, see > https://wiki.xenproject.org/wiki/Virtio_On_Xen And even more, that was also raised at Linux Plumbers Conference 2013 [1]. But still, there is no implementation available >> 4. Most of the PV drivers a guest uses at the moment are Xen PV drivers, >> e.g. net, >> block, console, so only virtio-gpu will require QEMU to run. > You are not forced to use qemu, you can certainly create an alternative > host side implementation (and still use on the existing virtio guest > drivers). Yes, this is true. We also discussed virtio with Xen community, Stefano Stabellini says: "the issues with virtio are (in order of seriousness): 1) virtio assumes that the backend is able to map any page in memory In other words, it is not possible to do driver domains with virtio 2) virtio doesn't work with PV guests, only HVM (I think PVH would have   the same issue) Virtio does synchronous IO emulation. QEMU for PV guests is not capable of handling synchronous IO requests. The infratructure is just not there. 3) virtio performance is poor with Xen There are multiple reasons for this, but the main one is that the backends are in QEMU, running in Dom0. They become the bottleneck quickly. " > Whenever writing a xenbus implementation for both guest and host or > writing a virtio implementation for the host only is better -- dunno. > The virtio path obviously needs some infrastructure work for virtio > support in Xen, which may pay off long term. Your call. Well, I do agree that long term virtio might be a better choice. But at the moment I still tend to have a dedicated Xen PV DRM implementation. That being said, I would kindly ask DRI community to review the driver and consider it for inclusion. > cheers, > Gerd > Thank you, Oleksandr Andrushchenko [1] https://www.youtube.com/watch?v=FcVDHBQInxA