[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] pci/ats: do not allow broken devices to be assigned to guests
- To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 24 Feb 2022 17:43:13 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=Lctuyp3sqxjRhuRF/ZUXDYC9j5FpRHWS77F2/NW8LoA=; b=mZwjjh/b4wtRUatJFbGBkgyW3lcDqh5J7rEQts1mMECzToAyeJF5L+M8P1rWq8eRJule0wkgD1cCFd0Biu4PvjoRytRcYNlYzLmF+cLiaGUOSSPN5We5w47ueXI1yV597bHcXSAXAmbYtRd1710yWcP0+KJuhiOG4YOj3mYC1Z0A1Ia1v+8gVVc5t8lnl9dw7s7S1oxB4mHaDbt3ENzJEj/xBrUaeNCH3crM7X/FZHMTYRbFHKyEigYGv4G0f/huex/UAGdCya/igk/451Zjex1jBhfCq2fGl87aKZRbQ/BKEPQ3IblO94tlQDQBRI3E/DZfSS+TsBjDZ+amOVmV9Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ltEoL19yuMwQskrskQXDgnZQUP/Hqg4d5PsbLnbchJnqY8Yku5WUqVHHuiMI1RCeTdGEaumVyvgE3MProUHgMJkhJl2dDVYEinZmJxzaBffglceQnMtdnp2PgubROvUoxMnhHWuPgPLM/u2JUxKM969keSG9S4JA2w3Lrv0Fk+q1W5hm3hqmFIWg7LeVRVQYejfNuNB8oQIGsQDaSGB+ljdnZrKBGhI9ozteJVFCXaCfWyb6fjQRcJ3Qpf/b1bO+gN6BN4XSTFawdl542dBBWemBojVajklsdWK2D67OsUQX4RREK9quD44MJ2vlbySU1FxrHNrkrQ4lgJ86bH6KyA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Paul Durrant <paul@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 24 Feb 2022 16:43:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 24.02.2022 17:37, Roger Pau Monne wrote:
> Introduce a new field to mark devices as broken: having it set
> prevents the device from being assigned to guests. Use the field in
> order to mark ATS devices that have failed a flush as broken, thus
> preventing them to be assigned to any guest.
>
> This allows the device IOMMU context entry to be cleaned up properly,
> as calling _pci_hide_device will just change the ownership of the
> device, but the IOMMU context entry of the device would be left as-is.
> It would also leak a Domain ID, as removing the device from it's
> previous owner will allow releasing the DID used by the device without
> having cleaned up the context entry.
This DID aspect is VT-d specific, isn't it? I'd be inclined to ask to
make this explicit (which could be done while committing if no other
need for a v3 arises).
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
|