From patchwork Tue May 26 13:01:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1298036 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49WZ183hJDz9sRW; Tue, 26 May 2020 23:04:28 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jdZFl-0006eJ-RA; Tue, 26 May 2020 13:04:21 +0000 Received: from mail-pj1-f67.google.com ([209.85.216.67]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jdZEa-0005jf-Pl for kernel-team@lists.ubuntu.com; Tue, 26 May 2020 13:03:09 +0000 Received: by mail-pj1-f67.google.com with SMTP id q9so1314859pjm.2 for ; Tue, 26 May 2020 06:03:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=39zyugvDfZ7PI4z7NEY8pQJNHb7dxAsg5awVcS+wM1M=; b=uBdde22UkhkzynUVGDwTmUgMe2MUxBU1QDUFYHFkhEv3UCaiRU+KBur5gg60f7LoB7 dlSzh+Q1ibfgANpd4HPrXEWpzj7YLGNkA1lfLTpZeI95+gJpHdBWZtKXj69l6PFRxypb qdyY6BX0VoRVT1f9wWn8Xxl4suEFukmAUlFNcaRi4NXyzS/2g9LwQeRs4IfDenEgwt1J OfrGq/fsc2AVNo2LGzg75/7XrSX0znSad9oafyC6lMB5ZRUE0jw0rJGUNlBms3vZbj1r apFL3TO/LYxX5A6rkJe4i14vYt7/yoNFOkwDKcPYhJndPC3fZ+WyByXzrmiKpnOJdZ9H KT4g== X-Gm-Message-State: AOAM530ZhdVia/txWlnHPNNhMpug/tEcgIrV0DTNgM/Fcbk65cqNuDTh QrBCSWOGSunc4QGGd2uKPG3QI1dOEp4= X-Google-Smtp-Source: ABdhPJy39+h+7tw2O0jJPp0qreHL2LVBKG89HrFmmDRg2BJE3nOfOe2dkxZH2RHd4fGFyz+cKOqg1g== X-Received: by 2002:a17:90a:c584:: with SMTP id l4mr26464086pjt.195.1590498184242; Tue, 26 May 2020 06:03:04 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id w14sm13999817pgi.12.2020.05.26.06.03.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 06:03:03 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 22/60][SRU][OEM-5.6] UBUNTU: SAUCE: iommu/vt-d: Wire up iommu_ops->def_domain_type Date: Tue, 26 May 2020 21:01:26 +0800 Message-Id: <20200526130204.238445-23-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200526130204.238445-1-vicamo.yang@canonical.com> References: <20200526130204.238445-1-vicamo.yang@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Joerg Roedel BugLink: https://bugs.launchpad.net/bugs/1876707 The Intel VT-d driver already has a matching function to determine the default domain type for a device. Wire it up in intel_iommu_ops. Signed-off-by: Joerg Roedel Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20200429133712.31431-5-joro@8bytes.org Signed-off-by: Joerg Roedel (cherry picked from commit 7039d11b3e4af77cf5ac1f689ae395b2a183bd25 iommu/next) Signed-off-by: You-Sheng Yang --- drivers/iommu/intel-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 0182cff2c7ac..c9e11964fed3 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -6209,6 +6209,7 @@ const struct iommu_ops intel_iommu_ops = { .dev_enable_feat = intel_iommu_dev_enable_feat, .dev_disable_feat = intel_iommu_dev_disable_feat, .is_attach_deferred = intel_iommu_is_attach_deferred, + .def_domain_type = device_def_domain_type, .pgsize_bitmap = INTEL_IOMMU_PGSIZES, };