[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 9/9] xue: allow driving the rest of XHCI by a domain while Xen uses DbC
On 18.07.2022 14:54, Marek Marczykowski-Górecki wrote: > On Thu, Jul 14, 2022 at 02:06:07PM +0200, Jan Beulich wrote: >> On 06.07.2022 17:32, 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(). >> >> Isn't there a risk that intermediately data was lost? > > Yes, there is such risk (although minimal in practice - it happens just > once during dom0 boot). You can avoid it by instructing dom0 to not use > that USB controller. > Having this capability is really helpful (compared with the alternative > of using the whole USB controller by either Xen or Linux), as many > (most) systems have only a single USB controller. No question about the usefulness. But this aspect wants spelling out, and it is one of the arguments against allowing use of the device by other than hwdom. >>> To avoid Linux messing with the DbC, mark this MMIO area as read-only. >> >> In principle this would want to happen quite a bit earlier in the >> series. I'm okay with it being kept here as long as it is made >> very obvious to and easily noticeable by committers that this series >> should only be committed all in one go. >> >> Also along with this is where I'd see the pci_hide_device() go. > > Earlier version of the patch set had pci_ro_device() before this patch. > I can add pci_ro_device() in the initial patch, and drop it in this one. Having pci_ro_device() up to here sounds reasonable, but then you still want to flip to using pci_hide_device() rather than just dropping the call. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |