[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 8/9] drivers/char: allow driving the rest of XHCI by a domain while Xen uses DbC


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 26 Aug 2022 16:48:02 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dO9FGP/EYRfnfrVNrdFmXZmjyntIVXSBFVzAaIOAvaU=; b=SmtRQ05sFjnvPNw8knudp8AuyxNUy+q9qcn+mJ6FHlkR1gs6pCBYk/EkmDvpy19QXrT1afbGNF4o7DUdp6dtiHszTdiZFn0u/wbfDJMR2Ke9PxahFPII+C+yN7hE180BaGsVut82Ynj+7MSIrzTJi7ibR/5ImhVVnjSJjiiTMnxAHtSnDrLCCio6ZYLo9/tBZm/FVZMrhJdi2wSRPMvCHPlerODmVl34rey9jLwzx4suyUSq7o4i0M/3e2xINhXyMB/kRiUO+jULe+jJqupVC8Vz/oUs8FLoIQZcjttCmYXp+C/sMy0g80s0x2pnCQ/mdghfWDnY/y32moybUQlJiQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lb3wH+Fr+/vqaRxE/WuuSTY/IPdtzarpCPpNMna2oDCbjD7JIhooc62Jqu1Fu6uhuIjyzhVaZiJytVQEhxQyhdmU600mQG7dFPQ1apPKzL2u31vxC0udFfQpAMYDW765pAGiOzDFT7NVrZ1Uw04SFy8sh/Q2CDhNPPP7z7HdNWMPCujEMU/izFyGtXXQXz05wOMKKXlBqeDB1Qz3ufpYXnV+ubR2BRoMmpjd2dY3g22HzTseNdVbcMLKBM9aItwQ5Nu4Ib9m6dsMC2dRBMHzJ4HSdOxe26q+p7Wv8ypKdIibZmGT3qOOSSY+EmI3a/5wIPC8ARpPQcwIYFF59amgIw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 26 Aug 2022 14:48:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.08.2022 17:27, Marek Marczykowski-Górecki wrote:
> That's possible, because the capability was designed specifically to
> allow separate driver handle it, in parallel to unmodified xhci driver
> (separate set of registers, pretending the port is "disconnected" for
> the main xhci driver etc). It works with Linux dom0, although requires
> an awful hack - re-enabling bus mastering behind dom0's backs.
> Linux driver does similar thing - see
> drivers/usb/early/xhci-dbc.c:xdbc_handle_events().
> 
> When controller sharing is enabled in kconfig (option marked as
> experimental), dom0 is allowed to use the controller even if Xen uses it
> for debug console. Additionally, option `dbgp=xhci,share=` is available
> to either prevent even dom0 from using it (`no` value), or allow any
> domain using it (`any` value).
> 
> In any case, to avoid Linux messing with the DbC, mark this MMIO area as
> read-only. This might cause issues for Linux's driver (if it tries to
> write something on the same page - like anoter xcap), but makes Xen's
> use safe. In practice, as of Linux 5.18, it seems to work without
> issues.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.