[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 10/14] vpci/header: reset the command register when adding devices
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Date: Wed, 2 Feb 2022 12:58:24 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ztv0ZcHTX9trR9ppj29bdhj4k1r8U4xU23CcABS6DXU=; b=Bm+N/7MTcAZ4JTSqXeqUjnuPR24wPk+h9oQhLTJ51u7N1rLJrTbVb/YEUFwuFbCY7FFQyTLU6afc8g00Fg4zBry7rgHdgnSuL9gAl42RFEoKoG0SKyowYAduEv5XtiYtpaz8i/LxoSl+aY/4m8Kd/JeQqM29kpI/Y5Yl4u1h25XP2EBBOoD/lk0jEdiTsGXvaBz3fW0a3u+uzXuiN39wwJHkP9DzDV4gGF/6x8EiyBK9XGIUXe/ml8oClQTtCBLt+LNKKLfRGSpAqAhVQzLiKcE6MWShSu60XnXPCjaK7IupQneBM2rPJrXyD+4KEdyX0XLb3kK1gnqqy3TTbUmSzg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AuWYtvz8EVxAotU53Zl2VRzISAr3CTrstOMUvto+yfeTTgsmN6ZWvVfiWXg0smJYoRNpFOw42gymz4zYuX0ewieIb+gEoMFvKJSUiYsqASbrbhBGZc1z6yAM+pf+JESDRU2wgo/NAs1tz6eto4P1RMqKiPs+0ubQ9Y7X1WpStwKmpwAZNwNen2gLq2Ab/fyyx6sye7bnMF93dAUacY3HbbwZqY6ih+mOVdoYc//PhyE1DToy6aBbX09TSLA80DImRBHTVUo0WYbBitYwxB8CuxSTBMG7QYwN0qXIOrln0NmVCRqwZMYoFW4CfgPg2MtTIId4U57RTCbfKlpyxtMWvw==
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Delivery-date: Wed, 02 Feb 2022 12:58:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHX4ewKKrjJdBpwck6ciSQTpymsh6xhF7QAgB+NkoA=
- Thread-topic: [PATCH v5 10/14] vpci/header: reset the command register when adding devices
Hi, Roger!
On 13.01.22 13:07, Roger Pau Monné wrote:
> On Thu, Nov 25, 2021 at 01:02:47PM +0200, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>>
>> Reset the command register when passing through a PCI device:
>> it is possible that when passing through a PCI device its memory
>> decoding bits in the command register are already set. Thus, a
>> guest OS may not write to the command register to update memory
>> decoding, so guest mappings (guest's view of the BARs) are
>> left not updated.
>>
>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>> ---
>> Since v1:
>> - do not write 0 to the command register, but respect host settings.
> There's not much respect of host setting here, are you are basically
> writing 0 except for the INTX_DISABLE which will be set if MSI(X) is
> enabled.
Yes, and this is because we only support INTX emulation at the
moment
>
> I wonder whether you really need this anyway. I would expect that a
> device that's being assigned to a guest has just been reset globally,
> so there should be no need to reset the command register explicitly.
From my experience it was a real case when the device was not
reset making troubles. I'll remove this patch for now and see if
I can still run without it relying on the device reset which must
be in place while assigning a PCI device (here we rely on the
toolstack, right?).
>
> Thanks, Roger.
Thank you,
Oleksandr
|