public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: "Lendacky, Thomas" <Thomas.Lendacky@amd•com>
Cc: Joerg Roedel <joro@8bytes•org>,
	Thiago Jung Bauermann <bauerman@linux•ibm.com>,
	Michael Ellerman <mpe@ellerman•id.au>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>
Subject: Re: linux-next: build failure after merge of the iommu tree
Date: Tue, 3 Sep 2019 15:28:49 +1000	[thread overview]
Message-ID: <20190903152849.770ae819@canb.auug.org.au> (raw)
In-Reply-To: <d2493e6b-08fa-9ea8-a0a4-076def54e91b@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]

Hi all,

On Mon, 2 Sep 2019 14:26:40 +0000 "Lendacky, Thomas" <Thomas.Lendacky@amd•com> wrote:
>
> On 9/2/19 9:03 AM, Joerg Roedel wrote:
> > 
> > tl;dr: And IOMMU commit introduces a new user for sme_active() in
> >         generic code, and commit
> > 
> >         	284e21fab2cf x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header
> > 
> >         breaks the build of drivers/iommu/ for all architectures not
> >         implementing sme_active().
> > 
> > On Mon, Sep 02, 2019 at 04:39:51PM +1000, Stephen Rothwell wrote:  
> >> drivers/iommu/iommu.c: In function 'iommu_subsys_init':
> >> drivers/iommu/iommu.c:123:38: error: implicit declaration of function 'sme_active'; did you mean 'cpu_active'? [-Werror=implicit-function-declaration]
> >>    123 |   if (iommu_default_passthrough() && sme_active()) {  
> 
> Maybe we should make this mem_encrypt_active(), since this will probably
> be needed if/when an IOMMU device is eventually added to a guest, and the
> referenced commit below doesn't remove that call.

I have done that for today:

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Tue, 3 Sep 2019 15:19:34 +1000
Subject: [PATCH] iommu: use mem_encrypt_active() instead of sme_active()

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 drivers/iommu/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 66cfacaa483d..b870044ecd49 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -120,7 +120,7 @@ static int __init iommu_subsys_init(void)
 		else
 			iommu_set_default_translated(false);
 
-		if (iommu_default_passthrough() && sme_active()) {
+		if (iommu_default_passthrough() && mem_encrypt_active()) {
 			pr_info("SME detected - Disabling default IOMMU Passthrough\n");
 			iommu_set_default_translated(false);
 		}
-- 
2.23.0.rc1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-09-03  5:28 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02  6:39 linux-next: build failure after merge of the iommu tree Stephen Rothwell
2019-09-02 14:03 ` Joerg Roedel
2019-09-02 14:26   ` Lendacky, Thomas
2019-09-03  5:28     ` Stephen Rothwell [this message]
2019-09-03 13:20       ` [PATCH] iommu: Don't use sme_active() in generic code Joerg Roedel
2019-09-03 16:03         ` Thiago Jung Bauermann
  -- strict thread matches above, loose matches on Subject: below --
2026-01-19 18:42 linux-next: build failure after merge of the iommu tree Mark Brown
2026-01-20  9:17 ` Joerg Roedel
2021-10-12  3:46 Stephen Rothwell
2021-10-12  8:33 ` Marc Zyngier
2021-10-12 11:21   ` Lorenzo Pieralisi
2021-10-13  1:43     ` Bjorn Helgaas
2020-09-21  4:09 Stephen Rothwell
2020-10-13  7:31 ` Stephen Rothwell
2020-10-15  2:43   ` Stephen Rothwell
2015-11-01 11:42 Stephen Rothwell
2015-11-01 15:14 ` Joerg Roedel
2015-11-02  0:15   ` Magnus Damm
2014-11-05  2:47 Stephen Rothwell
2014-11-05 11:16 ` Joerg Roedel
2014-07-08  4:02 Stephen Rothwell
2014-07-08  4:12 ` Alex Williamson
2014-07-08 11:20 ` Joerg Roedel
2011-12-15  4:40 Stephen Rothwell
2011-12-15 10:09 ` Joerg Roedel
2011-08-29  3:32 Stephen Rothwell
2011-08-29  5:11 ` Ohad Ben-Cohen
2011-08-29 10:42   ` Joerg Roedel
2011-08-29  8:36 ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190903152849.770ae819@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=Thomas.Lendacky@amd$(echo .)com \
    --cc=bauerman@linux$(echo .)ibm.com \
    --cc=joro@8bytes$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mpe@ellerman$(echo .)id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox