public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: "Joerg Roedel" <jroedel@suse.de>,
	"Uwe Kleine-König" <uwe@kleine-koenig.org>
Cc: baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org,
	rafael.j.wysocki@intel.com, tglx@linutronix.de, x86@kernel.org
Subject: Re: Failure to shutdown/reboot with intel_iommu=on
Date: Sat, 9 May 2020 09:58:07 +0800	[thread overview]
Message-ID: <bd9fb298-1ad3-fd4c-19f7-aae4c2b62daa@linux.intel.com> (raw)
In-Reply-To: <20200508150734.GP8135@suse.de>

Hi Uwe,

Have you tried commenting out intel_disable_iommus() in
intel_iommu_shutdowan()?

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 0182cff2c7ac..532e62600f95 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4928,8 +4928,10 @@ void intel_iommu_shutdown(void)
         for_each_iommu(iommu, drhd)
                 iommu_disable_protect_mem_regions(iommu);

+#if 0
         /* Make sure the IOMMUs are switched off */
         intel_disable_iommus();
+#endif

         up_write(&dmar_global_lock);
  }

Best regards,
baolu

On 5/8/20 11:07 PM, Joerg Roedel wrote:
> + Baolu, Maintainer of Intel IOMMU
> 
> Baolu, does that ring any bells?
> 
> On Wed, May 06, 2020 at 04:46:02PM +0200, Uwe Kleine-König wrote:
>> Hello,
>>
>> On my Lenovo T460p I cannot shutdown and reboot when the iommu is
>> enabled. This is using linux 5.2.7 as provided by Debian, 5.6.4 has the
>> same problem. Suspend/resume also fails; I suspect this is the same
>> issue.
>>
>> When requesting power off the kernel messages just end with:
>>
>> 	sd 0:0:0:0: [sda] Synchronizing SCSI cache
>> 	sd 0:0:0:0: [sda] Stopping disk
>> 	e1000e: EEE TX LPI TIMER: 00000011
>> 	ACPI: Preparing to enter system sleep state S5
>> 	reboot: Power down
>> 	acpi_power_off called
>>
>> (photo at https://www.kleine-koenig.org/tmp/uklsiommu.jpg in case I
>> mistyped something. Full dmesg and lspci -vvv at
>> https://www.kleine-koenig.org/tmp/uklsiommu.tar.gz with and without
>> iommu enabled.)
>>
>> With the iommu disabled (CONFIG_INTEL_IOMMU_DEFAULT_ON unset or
>> intel_iommu=off on cmdline) the machine just works as expected
>> (including working suspend/resume).
>>
>> I already talked to tglx on irc but unfortunately no new insights
>> resulted from that.
>>
>> Any ideas how to fix or continue debugging the issue?
>>
>> Best regards
>> Uwe
> 
> 

  reply	other threads:[~2020-05-09  2:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 14:46 Failure to shutdown/reboot with intel_iommu=on Uwe Kleine-König
2020-05-08 15:07 ` Joerg Roedel
2020-05-09  1:58   ` Lu Baolu [this message]
2020-05-11 19:59     ` Uwe Kleine-König
2020-05-11 20:16       ` Uwe Kleine-König
2020-05-11 13:43   ` Lenny Szubowicz
2020-05-11 19:58     ` Uwe Kleine-König
2020-05-12 13:34     ` Joerg Roedel
2020-05-12 20:00       ` Lenny Szubowicz
2020-05-12 21:13         ` 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=bd9fb298-1ad3-fd4c-19f7-aae4c2b62daa@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tglx@linutronix.de \
    --cc=uwe@kleine-koenig.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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