From patchwork Tue May 26 12:59:16 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: 1297975 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 49WYwK6YYSz9sSx; Tue, 26 May 2020 23:00:17 +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 1jdZBl-0003fj-Ss; Tue, 26 May 2020 13:00:13 +0000 Received: from mail-pl1-f196.google.com ([209.85.214.196]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jdZBj-0003dg-Lv for kernel-team@lists.ubuntu.com; Tue, 26 May 2020 13:00:11 +0000 Received: by mail-pl1-f196.google.com with SMTP id m7so8665429plt.5 for ; Tue, 26 May 2020 06:00:11 -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=FmSzNONhKxUPMNkwP8yPdFYrbokrDJWbQVY5ASM9iNYCIg1wZFb8BHosNxFxctVN+b zbX0o/7gNYRpwLeEPrVxQOh17KDM1pqASmcV55A8rbvXGIyCndze0iz25HjGyOErQPzm 9NK+d4aFC2qwI+yB0yOilm55ArsODw8m5njLd85a5KhRFDI/9tZM8HsSPhfSzmHMEBvk +3jpIWM4vmPKgARpE7cFnPn/YXQVU18PcWVl+mFhlUkrW/Cy5oKAip+XN7eMX4ArLPw1 /VmTpk26Rt5rsHnfGfcgjDV+43vayqLNDRebzHLyT6tSfafGrGJQZJtIW3BHkkEdZARJ IXKA== X-Gm-Message-State: AOAM5301x8pLYVwZnC/GkA7zxaV6WXNAe4Mo6mYzJUJR8Tj3zi4gFtsJ SgWCFx5TBFES1VyfHO8QrP5v/9bfaFg= X-Google-Smtp-Source: ABdhPJzqX0CRGZSHfVANeWu7IqflPN4r7h2i7WVqNI9VBCfT3vO2ANghSGxFXgTcVliC8NlGXSdZ/w== X-Received: by 2002:a17:902:bc42:: with SMTP id t2mr972133plz.233.1590498009606; Tue, 26 May 2020 06:00:09 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id u1sm13619736pgf.28.2020.05.26.06.00.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 06:00:08 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 04/42][SRU][U] UBUNTU: SAUCE: iommu/vt-d: Wire up iommu_ops->def_domain_type Date: Tue, 26 May 2020 20:59:16 +0800 Message-Id: <20200526125954.237403-5-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200526125954.237403-1-vicamo.yang@canonical.com> References: <20200526125954.237403-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, };