[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 06/14] vpci/header: implement guest BAR register handlers
- To: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 3 Feb 2022 13:54:56 +0100
- 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=YboevU3sS+1yg/iJml4Svbv970lgeDaTwRe6bx8AyEY=; b=PkDnBBkY0ZrUffciVTpAs/nzCwANqomBAJjo08wC49B/Hhmd7ep7XFQtM+Za6SDpM6YPqxWPaVeSeFM8Q7wTJvLzFCNuhVG2KlogIWMB3F2gniAamwZbH8QU6+0uNRWkQiDeJyZhXhxn8wYEyEM0UQ0Q/OUs2oE6Xb8dE8oJ/Z6fa4toJ4nFtEKCZJOLwQ8KP6bc6LbyHnUqOXfTf0OGyPlOogS12xuXxVvS2YMDigQByLyHpKFNcuDgadL6H2Yhqm67fVUY75us9WYkVARvdmHrcehHoXy2sXpeauoC/xVawWCWRNiXL5P25PDUuasfF+2PcEMZPGlj0/nIYEmPig==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MnYjliUxFYN87tYwxj4d5Ep9q24yegAuvojKnwRgc6+k10wxXeXlgwz8u4Rth6s3tetj8+BSuNcRFcYP0avfxBEVcDR6chQfbHwk7fQfsUF2IEN96V3rr0Oe11UJMCKDGWm57Pl/qSa+zJtw+bIXWngH4MJxf/gjD2auZVFIh+W8ZuQY0rkeZavbRvGp7FAInkc2GIA5KvxsvPlckgf3mCEQXdhcBgzFIk5FPlVtjSibTLC4uh3IPO4HWPmgkAhUlxZAVNJ97QDZEje0WDfmpXHPT5dQ6I16rHUFTC75Ie1sccxmo8BbqBBp276nTOwm/CoAIZSiApPY2LzuvmF4rw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- 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>, "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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Thu, 03 Feb 2022 12:55:06 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 03.02.2022 13:45, Oleksandr Andrushchenko wrote:
>>> Also memory decoding needs to be initially disabled when used by
>>> guests, in order to prevent the BAR being placed on top of a RAM
>>> region. The guest physmap will be different from the host one, so it's
>>> possible for BARs to end up placed on top of RAM regions initially
>>> until the firmware or OS places them at a suitable address.
>> Agree, memory decoding must be disabled
> Isn't it already achieved by the toolstack resetting the PCI device
> while assigning it to a guest?
Iirc the tool stack would reset a device only after getting it back from
a DomU. When coming straight from Dom0 or DomIO, no reset would be
performed. Furthermore, (again iirc) there are cases where there's no
known (standard) way to reset a device. Assigning such to a guest when
it previously was owned by another one is risky (and hence needs an
admin knowing what they're doing), but may be acceptable in particular
when e.g. simply rebooting a guest.
IOW - I don't think you can rely on the bit being in a particular state.
Jan
|