From: Greg KH <gregkh@linuxfoundation.org>
To: gehao <gehao@kylinos.cn>
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, wangwenmei168@163.com,
xieming@kylinos.cn
Subject: Re: [RESEND PATCH] xhci: Remove iommu condition for Renesas PCIe controllers
Date: Wed, 2 Nov 2022 03:31:44 +0100 [thread overview]
Message-ID: <Y2HWkAnvNCRavAZt@kroah.com> (raw)
In-Reply-To: <20221102014340.129587-1-gehao@kylinos.cn>
On Wed, Nov 02, 2022 at 09:43:40AM +0800, gehao wrote:
> When we use uPD720201 USB 3.0 Host Controller passthrough to VM
> guest os will report follow errors and it can not working.
>
> xhci_hcd 0000:09:00.0: Host took too long to start, waited 16000
> microseconds.
No need to wrap this line.
> xhci_hcd 0000:09:00.0: startup error -19.
>
> Renesas controllers preserve the top half of the address in internal,
> non visible registers,and end up with half the address coming from the
> kernel, and the other half coming from the firmware.
>
> For guest os,although our dev->iommu_group = NULL,but we are still under
> iommu control.
>
> This condition is not necessary,because for os with noiommu,doing
> anything when there is no iommu is definitely,and when our os with
> iommu,it is safe.
>
> Signed-off-by: gehao <gehao@kylinos.cn>
I need a "full" name please, what you use to sign documents.
Also, your email fails to validate, so it looks like it was faked.
Please fix your email system to properly send validated emails.
> ---
> drivers/usb/host/xhci.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 79d7931c048a..589d54ecd2a4 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -227,7 +227,6 @@ int xhci_reset(struct xhci_hcd *xhci, u64 timeout_us)
>
> static void xhci_zero_64b_regs(struct xhci_hcd *xhci)
> {
> - struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
> int err, i;
> u64 val;
> u32 intrs;
> @@ -241,12 +240,8 @@ static void xhci_zero_64b_regs(struct xhci_hcd *xhci)
> * changing the programming leads to extra accesses even if the
> * controller is supposed to be halted. The controller ends up with
> * a fatal fault, and is then ripe for being properly reset.
> - *
> - * Special care is taken to only apply this if the device is behind
> - * an iommu. Doing anything when there is no iommu is definitely
> - * unsafe...
> */
> - if (!(xhci->quirks & XHCI_ZERO_64B_REGS) || !device_iommu_mapped(dev))
> + if (!(xhci->quirks & XHCI_ZERO_64B_REGS))
I thought this got rejected as it will break systems. What changed from
that?
thanks,
greg k-h
prev parent reply other threads:[~2022-11-02 2:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 1:43 [RESEND PATCH] xhci: Remove iommu condition for Renesas PCIe controllers gehao
2022-11-02 2:31 ` Greg KH [this message]
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=Y2HWkAnvNCRavAZt@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=gehao@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=wangwenmei168@163.com \
--cc=xieming@kylinos.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).