[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: Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 13 Jan 2022 12:07:38 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; 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=i1yNNwIwmMWP3+tHErDzAhMer3BJs/x1kY4H2U8IKvc=; b=OOFKpUPYYbjRzw2kauGYNYqgNH7Ps/equnrVqMONmC1duHX4vXayRDHfvHtgcACLKsxaQKnOwCTkQCJzBM36X5I2sEx7WJFNJkMTE0eP2EvftlsUTEwf/SwX4quxwhHh7+5FE2pRCWC5ow8LZGI0Q9KmXhzuX4NDVHCjLBfZ1vgEpjfswrVreb4yD0WIl+YoAlIxxiZ34md0rxgZvwgMvrpdS3F0ldM6GtWrv1LPc7iAICHSKRLG8rv+qusM7M9k+qtL8YGLPybPz19N6G+IFwJK9st7ju7DLyWiuY3ryD8KB3EEQbR7ymQ8TaBtC4Ng3+SwzQXhMQKOkGu0wU8tKw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iVrGyAYFFbpZEr/5Msz7KdyT4wTyrsD/Yyw9ACguFcLRuyiGiJFxsV1E23ef3h6tOITkN4UrLYCYG9luG+TBUxqi4t+hAWG06L8i+q5NJReULksfXjCloG1UJ91k3BuxJmPwdOpHpdFbYer7prPpWKKWzZkralkOqkkHEz9104jUWidz/Ix65dkNQqqzfR4DHy1QeyMBwhyeIYOThYYuASZ9f59ZcHVTPQCPNHIdFhVrEjia9T92+T1JTcLJZLS2ylMqHZnYFyCiWdoA2kLOtQLl7/AWWiJZ3krtsZ0qoBY/tNx/v8gEyPbHklPvqCdFpnbxJ2wa1EPRBVVrHlOsDQ==
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <julien@xxxxxxx>, <sstabellini@xxxxxxxxxx>, <oleksandr_tyshchenko@xxxxxxxx>, <volodymyr_babchuk@xxxxxxxx>, <Artem_Mygaiev@xxxxxxxx>, <jbeulich@xxxxxxxx>, <andrew.cooper3@xxxxxxxxxx>, <george.dunlap@xxxxxxxxxx>, <paul@xxxxxxx>, <bertrand.marquis@xxxxxxx>, <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
- Delivery-date: Thu, 13 Jan 2022 11:08:04 +0000
- Ironport-data: A9a23:DE/bcKKIymNGPKePFE+REZMlxSXFcZb7ZxGr2PjKsXjdYENShTwDn WEYUWjVM6vfZGD2et11OYm08R4GuZ7cxtM1QQtlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUakideSc+EH170Us6wLZg6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2szu9L2 Y9q6KaVclgMJ5H0tcM+TShhRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsF2gcsuNo/zNZ43sXB81zDJS/0hRPgvRo2UvI4BhWts3aiiG97wb u8/WwtBSy+ZYhBIYEUTGrACzMqn0yyXnzpw9wvO+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JTKHvXXaQ7z54FLB9Q8IvXoe1LPgTViF2Kg7yhh/I lgXEITkjqPayeTPQ+BF19/GCBRlY6sYUN9ZcjPw71b0EWiy39ke/CJneTWPRpBKomJavSlUxMa 6e8+u67d7z8uQ0RRye6SxXb8TW0KuYqtpeb9Z6borZdl3WzJM8mfeLcYchcBggsYAu11GioGxE TCweBXXiAMnL6qHBykZa8gC/
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
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.
Thanks, Roger.
|