Received: by 10.213.65.68 with SMTP id h4csp449008imn; Tue, 13 Mar 2018 09:23:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELvtnOKEyeqFRLPeTIcErpXWmNNkGGsVf9wtG/AnZDQBXm1nV0GaB0buYq+g1bLtuMGMAYo9 X-Received: by 2002:a17:902:8d8d:: with SMTP id v13-v6mr1070040plo.149.1520958194720; Tue, 13 Mar 2018 09:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520958194; cv=none; d=google.com; s=arc-20160816; b=bIF32j+NoDA1bPI2GE/Sv/9frS4981WSwYdMCE3wqhB6OfzeAokiZ8alGZk4HGu86h JXldi0bhj3cfOCOPo3ZfuraKRvWGFWUQClIVMOZUXj1AUOyJcDNawfIrUj/1Ez07aITF tqF/BWhqf/6/9+XpJRF8iLRTDD+JeD9uxTWLtn8yGhYYDcR5Zxe55S/tflX0fxBKe5ro 6M4R85Ye6NWN0g2IC0zQKN8hdLF2wyyHwg8N1AD+bcQRwNXvSO9mtG3on/LxkAR+C5Fi AmKdyN3b2mmycsXrjUMQVS8l6NV0pOCT+YQxTmkGHEfUAY3RvxnPyetaJp7nHdkb7O95 uVIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=7P1xnrSFHrtt1AnNALsL7xvAn2LHmtU2sfwWZzEn3ds=; b=MJWAqTe+jqCrmiGZRVGrwqtDFQz3QAbZVFYj1tuLM5uXnuptpF2UcdVWV4W4iADiWN pDPfUAQgQgXPNJMUyPRrJyIKov3UM6vF9c9zhuH2iYknqKpmTO1KtkzOquJgoON+c1gT 6lYKSdfna84toGJ5oYXCmqwg6wVX5KOq3YH+KW9YKxYUjN/ViWkHDIFJbUq0PKtHPDH3 /tpVAmCr22/9UJF+G/Pk6OSDKYdMNnG7hXvrlNyUh0xo+FCPaIdyhcwuzdN0BG7MsIGZ aff05hZ2+8qpUmfdIfk3D02CNRxTpvjzWSzyPl/KXebxZ51B4l99RRuqMRvbc6i838hY R6UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qeicmDKF; 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 197si297742pge.78.2018.03.13.09.22.53; Tue, 13 Mar 2018 09:23:14 -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=qeicmDKF; 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 S934000AbeCMQV3 (ORCPT + 99 others); Tue, 13 Mar 2018 12:21:29 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:43462 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933946AbeCMQVY (ORCPT ); Tue, 13 Mar 2018 12:21:24 -0400 Received: by mail-lf0-f65.google.com with SMTP id q69-v6so240673lfi.10 for ; Tue, 13 Mar 2018 09:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7P1xnrSFHrtt1AnNALsL7xvAn2LHmtU2sfwWZzEn3ds=; b=qeicmDKFnhNoMKIaJKF40tGvrScS0ddAD4eS89UHwhF0omTMvcbV4a/B6rflJoDW6P LMpD7l1s7rdZBevgmFVhfwNxx7laRcTJdwRCUm0arkzyKhrChdF232fdQ9vz2ScqtUk5 y47jyV8oRXkvVoibqsoQRqovBQRC09Qf8iNUZsj9CUXngVi4ys8zXozqsn4HPhEdjT/f ZY99TIjn8LGJtghdCIRPyGTEuEQaUNj1fHPDdOxNqxipLt0roubLAiObEepCrxr+fyGD th54AnY6ySvmQ4PyM9ZL+W10T0zb57Y+MXl1QlPgLa+w/PbmzP4iGZM8a/9CaNF1lCUr dSXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7P1xnrSFHrtt1AnNALsL7xvAn2LHmtU2sfwWZzEn3ds=; b=F95E5724KtgZAq9QXmhdOv79wk7987DLgSHyPwjBvQaALOhUzP9jiNpmgzbsMJOBVX JwWTtB/31U/39YLy376WedouLnLOU0C5k3eCeA3bOLVZyNN7bH+q1+bPj+gHVMtRRMZV +jEywEUmi6sk6HSVVvqdTluGl3yunyhvw3RP6aO5K9cr2ocI5E0G+kj26XR2cH7C0f7E N83ZFNeUXu2LRxSTpKKofCgFwyY7WNzDn045VinE3TUaSMp9UNBH10yujXpOLjRLfEPN ycd5zLzDfxvBIt68LnvOWYjbGlF5Yf7Nwp2NdnCeyQmSTF/Q8laH9Qrf9RBnOTNUNf9C pVLQ== X-Gm-Message-State: AElRT7GVnnlmNk3vtk4N8BuSPWEeg3HT8+sy8g+27Y8C6Ieq82qP5ZaY cX8lBUFXDXg4wIs5XOdD5QQ= X-Received: by 2002:a19:771b:: with SMTP id s27-v6mr867776lfc.138.1520958082361; Tue, 13 Mar 2018 09:21:22 -0700 (PDT) Received: from a2k-HP-ProDesk-600-G2-SFF.kyiv.epam.com (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id p26sm109395lja.95.2018.03.13.09.21.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Mar 2018 09:21:21 -0700 (PDT) From: Oleksandr Andrushchenko To: 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 Cc: andr2000@gmail.com, Oleksandr Andrushchenko Subject: [PATCH RESEND v2 2/2] drm/xen-front: Provide kernel documentation Date: Tue, 13 Mar 2018 18:21:06 +0200 Message-Id: <1520958066-22875-3-git-send-email-andr2000@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520958066-22875-1-git-send-email-andr2000@gmail.com> References: <1520958066-22875-1-git-send-email-andr2000@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oleksandr Andrushchenko Provide kernel documentation for the Xen para-virtualized frontend DRM driver. Signed-off-by: Oleksandr Andrushchenko --- Documentation/gpu/index.rst | 1 + Documentation/gpu/xen-front.rst | 77 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 Documentation/gpu/xen-front.rst diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst index c36586dad29d..e31684af0a20 100644 --- a/Documentation/gpu/index.rst +++ b/Documentation/gpu/index.rst @@ -20,6 +20,7 @@ Linux GPU Driver Developer's Guide vga-switcheroo vgaarbiter bridge/dw-hdmi + xen-front todo .. only:: subproject and html diff --git a/Documentation/gpu/xen-front.rst b/Documentation/gpu/xen-front.rst new file mode 100644 index 000000000000..6ac0b75373c4 --- /dev/null +++ b/Documentation/gpu/xen-front.rst @@ -0,0 +1,77 @@ +==================================== +Xen para-virtualized frontend driver +==================================== +This frontend driver implements Xen para-virtualized display +according to the display protocol described at +include/xen/interface/io/displif.h + +Driver modes of operation in terms of display buffers used +========================================================== + +Depending on the requirements for the para-virtualized environment, namely +requirements dictated by the accompanying DRM/(v)GPU drivers running in both +host and guest environments, number of operating modes of para-virtualized +display driver are supported: + +- display buffers can be allocated by either frontend driver or backend +- display buffers can be allocated to be contiguous in memory or not + +Note! Frontend driver itself has no dependency on contiguous memory for +its operation. + +Buffers allocated by the frontend driver +---------------------------------------- + +The below modes of operation are configured at compile-time via +frontend driver's kernel configuration: + +With GEM CMA helpers +~~~~~~~~~~~~~~~~~~~~ + This use-case is useful when used with accompanying DRM/vGPU driver in + guest domain which was designed to only work with contiguous buffers, + e.g. DRM driver based on GEM CMA helpers: such drivers can only import + contiguous PRIME buffers, thus requiring frontend driver to provide + such. In order to implement this mode of operation para-virtualized + frontend driver can be configured to use GEM CMA helpers. + +Without GEM CMA helpers +~~~~~~~~~~~~~~~~~~~~~~~ + If accompanying drivers can cope with non-contiguous memory then, to + lower pressure on CMA subsystem of the kernel, driver can allocate + buffers from system memory. + + Note! If used with accompanying DRM/(v)GPU drivers this mode of operation + may require IOMMU support on the platform, so accompanying DRM/vGPU + hardware can still reach display buffer memory while importing PRIME + buffers from the frontend driver. + +Buffers allocated by the backend +-------------------------------- + +This mode of operation is run-time configured via guest domain configuration +through XenStore entries. + +For systems which do not provide IOMMU support, but having specific +requirements for display buffers it is possible to allocate such buffers +at backend side and share those with the frontend. +For example, if host domain is 1:1 mapped and has DRM/GPU hardware expecting +physically contiguous memory, this allows implementing zero-copying +use-cases. + +Note, while using this scenario the following should be considered: + +#. If guest domain dies then pages/grants received from the backend + cannot be claimed back + +#. Misbehaving guest may send too many requests to the + backend exhausting its grant references and memory + (consider this from security POV). + +Driver limitations +================== + +#. Only primary plane without additional properties is supported. + +#. Only one video mode per connector supported which is configured via XenStore. + +#. All CRTCs operate at fixed frequency of 60Hz. -- 2.7.4