From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jason Andryuk <jandryuk@gmail.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 0/2] Add API for making parts of a MMIO page R/O and use it in XHCI console
Date: Thu, 11 May 2023 17:22:48 +0200 [thread overview]
Message-ID: <ZF0ISD/uMns0aLtd@mail-itl> (raw)
In-Reply-To: <CAKf6xpspPdt6mM4MuL2-vwXHu23ahm874e4kZqROqCwC4cd=fA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]
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@invisiblethingslab.com> 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@gmail.com>
>
> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-05-11 15:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 21:25 [PATCH v2 0/2] Add API for making parts of a MMIO page R/O and use it in XHCI console Marek Marczykowski-Górecki
2023-05-05 21:25 ` [PATCH v2 1/2] x86/mm: add API for marking only part of a MMIO page read only Marek Marczykowski-Górecki
2023-05-17 19:28 ` Jason Andryuk
2023-05-30 11:56 ` Jan Beulich
2023-06-30 22:28 ` Marek Marczykowski-Górecki
2023-07-05 8:23 ` Jan Beulich
2023-07-07 11:02 ` Marek Marczykowski-Górecki
2023-07-10 7:04 ` Jan Beulich
2023-05-05 21:25 ` [PATCH v2 2/2] drivers/char: Use sub-page ro API to make just xhci dbc cap RO Marek Marczykowski-Górecki
2023-05-30 12:04 ` Jan Beulich
2023-06-30 22:38 ` Marek Marczykowski-Górecki
2023-07-05 8:28 ` Jan Beulich
2023-05-11 14:58 ` [PATCH v2 0/2] Add API for making parts of a MMIO page R/O and use it in XHCI console Jason Andryuk
2023-05-11 15:22 ` Marek Marczykowski-Górecki [this message]
2023-05-11 15:27 ` Jason Andryuk
2023-05-11 15:28 ` Marek Marczykowski-Górecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZF0ISD/uMns0aLtd@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=jandryuk@gmail.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.