[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 3/4] VT-d: skip IOMMU bitmap cleanup for phantom devices
- To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
- Date: Thu, 16 Sep 2021 08:19:27 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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; bh=vni7LZgLSjFb2OcXU8M1HmqnLKzm+Z+/DPBs9mlrFZ8=; b=HCJ/gsUxHPad3K/v/ChoCP6EeoVOAOex0b9JZE02A8wpQ6JBuSusYBMfbYyTf/AN3dv7E93J3Z1ZsoONwUDPV3663E4j2nSxgBf2j/EeJ0+oef1GCvWoL8/KkxTYoIrARbpWVrLLRQ7ATNwrAnQY9BWE220j8mALsntP/1+uyeRhugp85Uh/BKtIjpMqF+CvZ3OKVg0+LIVz900v38TEDZKvsr21klW0ePqzuXgkew6Y2my40z9AAhJbV0IvBGiieudTIl7lEtM8aZkUc/5/WHl408nIV67UuG/Lhu9ZnjPQBvZY/nMIPAZtPh+Bz4zBHqkT0VDUWxrQ2aUA+gdIhw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ErgSmgREHEjzNwR+R6oo5RtYb1FE1AcUPh5mUCh7/8ttl0f4l9eYQzssYgvbZub5TFDi4EG6T615CEvkWGTqGV8GwGKbeWH3jyys3CC/W0NQmNT4Pi0YxUjidZYAPcE+CH6zhOHrqvv1jOQSdF2ywj572bhNFRPr75hy2WruamFGf7VKsLDjGugRsXVgRHmlzi/VJEyNDdSdjEG14Ch43BO48vGzodvDA8pSJ1hw9ORORTEFlzFdGlPSEWCpLPxk0NBMWmMBLd/oG9H86gjMtp9r04+NA6O5Z1UEgmnf5yPWd3qA3oZ/OkctDrY2kRNvWtpmgxzgl1HCJprxPFjPuA==
- Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=intel.com;
- Cc: Paul Durrant <paul@xxxxxxx>
- Delivery-date: Thu, 16 Sep 2021 08:19:32 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHXqhH+i+85PO0Ft0uMLVDjFxaknaumUujA
- Thread-topic: [PATCH 3/4] VT-d: skip IOMMU bitmap cleanup for phantom devices
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Wednesday, September 15, 2021 5:13 PM
>
> Doing the cleanup also for phantom devices is at best redundant with
> doing it for the corresponding real device. I couldn't force myself into
> checking all the code paths whether it really is: It seems better to
> explicitly skip this step in such cases.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
>
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -1733,7 +1733,7 @@ static int domain_context_unmap(struct d
> return -EINVAL;
> }
>
> - if ( ret || QUARANTINE_SKIP(domain) )
> + if ( ret || QUARANTINE_SKIP(domain) || pdev->devfn != devfn )
> return ret;
>
> /*
|