[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 0/2] Add API for making parts of a MMIO page R/O and use it in XHCI console
On Thu, May 11, 2023 at 10:58:48AM -0400, Jason Andryuk wrote: > On Fri, May 5, 2023 at 5:26 PM Marek Marczykowski-Górecki > <marmarek@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > On older systems, XHCI xcap had a layout that no other (interesting) > > registers > > were placed on the same page as the debug capability, so Linux was fine with > > making the whole page R/O. But at least on Tiger Lake and Alder Lake, Linux > > needs to write to some other registers on the same page too. > > > > Add a generic API for making just parts of an MMIO page R/O and use it to > > fix > > USB3 console with share=yes or share=hwdom options. More details in commit > > messages. > > > > Marek Marczykowski-Górecki (2): > > x86/mm: add API for marking only part of a MMIO page read only > > drivers/char: Use sub-page ro API to make just xhci dbc cap RO > > Series: > Tested-by: Jason Andryuk <jandryuk@xxxxxxxxx> > > I had the issue with a 10th Gen, Comet Lake, laptop. With an HVM > usbvm with dbgp=xhci,share=1, Xen crashed the domain because of: > (XEN) d1v0 EPT violation 0xdaa (-w-/r-x) gpa 0x000000f1008470 mfn 0xcc328 > type 5 Hmm, this series is supposed to avoid exactly this issue. I tested it on 12th Gen, so maybe 10th Gen has a bit different layout. Can you add a debug print before subpage_mmio_ro_add() call in xhci-dbc.c and see what area is getting protected? > The BAR is mfn 0xcc320-0xcc32f > > Booting PV, it faulted at drivers/usb/host/pci-quirks.c:1170 which looks to > be: > ``` > /* Disable any BIOS SMIs and clear all SMI events*/ > writel(val, base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET); > ``` > > Thanks for integrating XUE, Marek! -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab Attachment:
signature.asc
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |