xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Connor Davis <connojdavis@gmail.com>, Jan Beulich <jbeulich@suse.com>
Cc: Jann Horn <jannh@google.com>, Lee Jones <lee.jones@linaro.org>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	xen-devel@lists.xenproject.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2 1/4] usb: early: Avoid using DbC if already enabled
Date: Wed, 19 May 2021 00:50:46 +0300	[thread overview]
Message-ID: <0dac96cc-dce1-e908-400e-9c8e68c41a54@linux.intel.com> (raw)
In-Reply-To: <55325db1-b086-fc81-9117-6560c4914a12@gmail.com>

On 17.5.2021 17.24, Connor Davis wrote:
> 
> On 5/17/21 8:13 AM, Jan Beulich wrote:
>> On 17.05.2021 15:48, Connor Davis wrote:
>>> On 5/17/21 3:32 AM, Jan Beulich wrote:
>>>> On 14.05.2021 02:56, Connor Davis wrote:
>>>>> Check if the debug capability is enabled in early_xdbc_parse_parameter,
>>>>> and if it is, return with an error. This avoids collisions with whatever
>>>>> enabled the DbC prior to linux starting.
>>>> Doesn't this go too far and prevent use even if firmware (perhaps
>>>> mistakenly) left it enabled?
>>> Yes, but how is one supposed to distinguish the broken firmware and
>>> non-broken
>>>
>>> firmware cases?
>> Well, a first step might be to only check if running virtualized.
>> And then if your running virtualized, there might be a way to
>> inquire the hypervisor?
> 
> Right, but if it was enabled by something other than a hypervisor,
> 
> or you're not running virtualized, how do you distinguish then? IMO
> 
> the proper thing to do in any case is to simply not use the DbC in linux.
> 

Sounds reasonable.

We can address "broken firmware" during the xHC handoff from BIOS to OS. 
Only first OS that loads after BIOS should see the 
"HC BIOS owned semaphore" bit set in xHCI MMIO.

If it's set then OS requests ownership, which clears BIOS owned bit.
If DbC is running here we can stop it.

-Mathias


  reply	other threads:[~2021-05-19  5:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  0:56 [PATCH v2 0/4] Support xen-driven USB3 debug capability Connor Davis
2021-05-14  0:56 ` [PATCH v2 1/4] usb: early: Avoid using DbC if already enabled Connor Davis
2021-05-14  0:56   ` [PATCH v2 2/4] xen: Export dbgp functions when CONFIG_XEN_DOM0 is enabled Connor Davis
2021-05-14 14:06     ` Connor Davis
2021-05-14  0:56   ` [PATCH v2 3/4] usb: dbgp: Fix return values for reset prep and startup Connor Davis
2021-05-14 15:33     ` Boris Ostrovsky
2021-05-17  9:32   ` [PATCH v2 1/4] usb: early: Avoid using DbC if already enabled Jan Beulich
2021-05-17 13:48     ` Connor Davis
2021-05-17 14:13       ` Jan Beulich
2021-05-17 14:24         ` Connor Davis
2021-05-18 21:50           ` Mathias Nyman [this message]
2021-05-14  6:46 ` [PATCH v2 0/4] Support xen-driven USB3 debug capability Greg Kroah-Hartman
2021-05-14 14:07   ` Connor Davis

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=0dac96cc-dce1-e908-400e-9c8e68c41a54@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=connojdavis@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=jbeulich@suse.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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 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).