[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] VT-d: restrict iommu_flush_all() to cache writeback
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 3 May 2023 11:46:11 +0200
- 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=ws+81il08fZF9Iyvf//QRJ+mt2teUl0Lbm4jBjIkcAo=; b=c2NF8nB8CjOAOryJyw4anItilvXvtyfOf6XAkN6Yu/yH6QEfle4SY+flQ20iC4mrSkeAfPmM0eCLfxrUXpgvsdew3cVMza9Nx2SEFgMtLe9Y47L+sA/+htm666ln2/uI4kktOMXmGT3uuRHlPpB2NLXKAN27qvWYwbwIEOGtLyGALLwNvHqrZrBjPldOEi1LZtG1HEQKODKF/TegIl1BT0ttOgp75CvMmRfYewVKsqFtDGSZIT1goLrGpouRaj87bB27I68iR3MQUp+PB3G8cZB0o3VjepFZCrLL0AMP1N1/C3/SU2zeEWCOD9MNhgO23GKdsjieYmGhF2MPp38gGw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=baVyL1YjsprtZuoztGplHhfLl3GIExQ+Byq4JgrWfmfX7r/N303+eIdSzV4KloqlV3Ymvl+PrAlL5VRjF8UVgvw7M+1PItN2OAPJdooiD2IrPFrnJSXSES4CLNUbPJX68veDCfJZ3JnI3TcmsLxl0NdRrQfi+2GQN5sexOVt6EISbi9TAp7oa6Z2DcpvLraGfWmREB8yXOnQ9dyfN693LlKy9pwIhsAie6+5t8IE573CaRqHtBPhfkHzee5yGDqYX8f1237YxM/G2kdqGRSNw4cBCeZvG1wRy2EcMblr94BrfSYndG7mGDXU8PzOozxLv5ESnq8ygfS3LjDHOlf0lA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
- Delivery-date: Wed, 03 May 2023 09:46:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
We don't need to invalidate caches here; all we're after is that earlier
writes have made it to main memory (and aiui even that just in case).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
This, aiui, being an analogue to uses of iommu_sync_cache() (just not
range restricted), I wonder whether it shouldn't be conditional upon
iommu_non_coherent. Then again I'm vaguely under the impression that
we had been here before, possibly even as far as questioning the need
for this call altogether.
---
v2: FLUSH_WRITEBACK -> FLUSH_CACHE_WRITEBACK.
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -693,7 +693,7 @@ static int __must_check iommu_flush_all(
bool_t flush_dev_iotlb;
int rc = 0;
- flush_local(FLUSH_CACHE);
+ flush_local(FLUSH_CACHE_WRITEBACK);
for_each_drhd_unit ( drhd )
{
|