Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp7731lqp; Sat, 8 Jun 2024 04:08:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfYqDPtJHVjxn2Z+G6tpi5OW5bB+kYqFLjc1OW+FlURgrC88MR/JIh4SF8qR9YH45sRDZyeM5vJwC9GPWGmkS7L1cZEb4orR3iDjmUzg== X-Google-Smtp-Source: AGHT+IHp9UB35mze9Ylu4StC01b3m2wcYyJYFCbD54P1FZ9dPNov3FzST6wCSz1WRf2PGGmXkQDU X-Received: by 2002:a17:906:1390:b0:a6e:fa0b:454a with SMTP id a640c23a62f3a-a6efa0b46b6mr125748666b.66.1717844890706; Sat, 08 Jun 2024 04:08:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717844890; cv=pass; d=google.com; s=arc-20160816; b=YFAY95u1bDbQo9Eg/4oORH8ziURYPuptTh4KqVDMktQF9qedreAIz+M7+E08SW5k4J Sjf87uW8wUEsCS3KvJYkIdyovgKRYVXj0LWVKeck+ycmye85/tAjH3PZ+6Qtrm5w1JP3 yeVvDYM7TjbhjykXGA7qyOknr1O/okQxwJ0tUzCDLkER0MgCDzz8xXy26Pt6iUmicQI4 9CPUzPbfC0y0z0Ho/p5TJ02Yjqa7r9SpyDwEDUCtABe1RxnvNyOUVMZj5MgObZW/YyaO Qv6fzPqmdJHKV/TIbAv8nDVOAQTm02Tw6OknRUrBA2yTneBvdzHqCQRdXBvPnGTFb0+d oAWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=1cu2zdRUsa1c+WRxSU1o0qK042V4EbuOuvx599YFSRA=; fh=c6MRpx46Nd/9/k86wLBHhpHY2nq6zEfPNrxVViE+jWI=; b=fUVAhuqltPkOmzgeLQgaDr4R9R7LMpx4s35mk+L837w+j3uYuvr8/8SQ+sRIeeUYB7 BDi4WX2mhvaWAQ231ESw/vfTIROA04I6PJShCZth33c5/7opJcDRlYTW3LAp+RlNOfRN ZeCsPU2wa6TAk5vIn1i/t9UNPEhk03TRCQZs1ovwKCLUCGNhQYIXW0pD7GAHTfP0DVdO boBQgVXMz36OuKfKLgQJcWBXY68JeVaClRUw++KFL9umb0mCl42SigYGZncG/601pHCr Qzy5ld9CDJnToD/hbyfXSaJZMHwDvEnXRg59q37/X8mZq2aSquDJqqm9vfs+kJadhfxF RCRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=molgen.mpg.de); spf=pass (google.com: domain of linux-kernel+bounces-207014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207014-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c806da9e7si282001966b.306.2024.06.08.04.08.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 04:08:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=molgen.mpg.de); spf=pass (google.com: domain of linux-kernel+bounces-207014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207014-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 32C901F21D9F for ; Sat, 8 Jun 2024 11:08:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06656176AB7; Sat, 8 Jun 2024 11:08:04 +0000 (UTC) Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C569B14F139 for ; Sat, 8 Jun 2024 11:07:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=141.14.17.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717844883; cv=none; b=N2MiMsaT9l3xTIFZ7fgKR1NoCpjAaOiYoQtcQKBZRKwV4cvRwoJ3FSA/LyPeJ50s3tS156+VQCG/WbFRZBXX/oD3ws5JsZF935+GjCCPJDOw/+StsL9cgwW9auY8qL3TRID9ZyKHn/gOvu292iGhoa9MALCWFRIfIx54HKf5tUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717844883; c=relaxed/simple; bh=0rWGcTa2MEDd7Q9eaT+yNU0ZCfGIK2XvrtCzfvdDr8k=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=qmnWPIJlQFN8KikF/AaazpYB31rFXV7O81xVbm0PQBh8H3G56B6IQrStzpWHkJtIQNHNDgjwsKAILpjavzJynTwHSmNVFkl2NnPMUnbY1rpo/Oqa+tt4TnJVDR7tXA4RVhD362ufkVHCWb9wgvLCqk2wRiOkq39MweAkR1BZGKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de; spf=pass smtp.mailfrom=molgen.mpg.de; arc=none smtp.client-ip=141.14.17.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=molgen.mpg.de Received: from [192.168.0.2] (ip5f5af290.dynamic.kabel-deutschland.de [95.90.242.144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 12E6161E5FE01; Sat, 8 Jun 2024 13:07:16 +0200 (CEST) Message-ID: <754664f9-ac5b-406e-99bd-1b179ea8333b@molgen.mpg.de> Date: Sat, 8 Jun 2024 13:07:15 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: DMAR-IR: IRQ remapping was enabled on dmar6 but we are not in kdump mode From: Paul Menzel To: Baolu Lu Cc: =?UTF-8?B?SsO2cmcgUsO2ZGVs?= , Will Deacon , iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <5517f76a-94ad-452c-bae6-34ecc0ec4831@molgen.mpg.de> <433452d0-589a-49c8-8044-dcc93d5be90a@linux.intel.com> <24bf9a11-6abd-4ccf-9ca1-3cf75c45d374@molgen.mpg.de> <42b53bff-4027-4cb6-a457-e26fd62895e5@linux.intel.com> <61ce93c7-e89c-4217-8095-dde9fb01763c@molgen.mpg.de> <7eb01b85-9233-4f21-865e-6d128f39fb46@linux.intel.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Linux folks, Am 15.05.24 um 08:02 schrieb Paul Menzel: > Am 15.05.24 um 04:13 schrieb Baolu Lu: >> On 5/15/24 3:46 AM, Paul Menzel wrote: >>> Am 23.01.24 um 01:55 schrieb Baolu Lu: >>>> On 2024/1/22 22:53, Paul Menzel wrote: >>>>> Am 22.01.24 um 13:38 schrieb Baolu Lu: >>>>>> On 2024/1/19 22:45, Paul Menzel wrote: >>>>>>> >>>>>>> On a Dell PowerEdge T640, Linux 5.9 and 6.6.12 warn about kdump: >>>>>>> >>>>>>>      [    2.728445] DMAR-IR: IRQ remapping was enabled on dmar6 but we are not in kdump mode >>>>>>>      [    2.736544] DMAR-IR: IRQ remapping was enabled on dmar5 but we are not in kdump mode >>>>>>>      [    2.744620] DMAR-IR: IRQ remapping was enabled on dmar4 but we are not in kdump mode >>>>>>>      [    2.752695] DMAR-IR: IRQ remapping was enabled on dmar3 but we are not in kdump mode >>>>>>>      [    2.760774] DMAR-IR: IRQ remapping was enabled on dmar2 but we are not in kdump mode >>>>>>>      [    2.768847] DMAR-IR: IRQ remapping was enabled on dmar1 but we are not in kdump mode >>>>>>>      [    2.776922] DMAR-IR: IRQ remapping was enabled on dmar0 but we are not in kdump mode >>>>>>>      [    2.784999] DMAR-IR: IRQ remapping was enabled on dmar7 but we are not in kdump mode >>>>>>> >>>>>>> Looking through the logs, this only happens when using kexec to >>>>>>> restart the system. >>>>>> >>>>>> The code that warned this is, >>>>>> >>>>>>   599         if (ir_pre_enabled(iommu)) { >>>>>>   600                 if (!is_kdump_kernel()) { >>>>>>   601                         pr_warn("IRQ remapping was enabled on %s but we are not in kdump mode\n", >>>>>>   602                                 iommu->name); >>>>>>   603                         clear_ir_pre_enabled(iommu); >>>>>>   604                         iommu_disable_irq_remapping(iommu); >>>>>>   605                 } >>>>>> >>>>>> The VT-d interrupt remapping is enabled during boot, but this is not a >>>>>> kdump kernel. >>>>>> >>>>>> Do you mind checking whether the disable interrupt remapping callback >>>>>> was called during kexec reboot? >>>>>> >>>>>> 1121 struct irq_remap_ops intel_irq_remap_ops = { >>>>>> 1122         .prepare                = intel_prepare_irq_remapping, >>>>>> 1123         .enable                 = intel_enable_irq_remapping, >>>>>> 1124         .disable                = disable_irq_remapping, >>>>>> 1125         .reenable               = reenable_irq_remapping, >>>>>> 1126         .enable_faulting        = enable_drhd_fault_handling, >>>>>> 1127 }; >>>>> >>>>> Is there a way to check this without rebuilding the Linux kernel? >>>> >>>> I am not sure, but you can check whether any messages are dumped in the >>>> path of .disable callback? or try to use ftrace? >>> >>> With >>> >>> ``` >>> diff --git a/drivers/iommu/intel/irq_remapping.c >>> b/drivers/iommu/intel/irq_remapping.c >>> index 712ebfc9870c6..146f19ae5b5f1 100644 >>> --- a/drivers/iommu/intel/irq_remapping.c >>> +++ b/drivers/iommu/intel/irq_remapping.c >>> @@ -1030,6 +1030,7 @@ static void disable_irq_remapping(void) >>>       struct dmar_drhd_unit *drhd; >>>       struct intel_iommu *iommu = NULL; >>> >>> +     pr_warn("XXX: Called %s\n", __func__); >>>       /* >>>        * Disable Interrupt-remapping for all the DRHD's now. >>>        */ >>> ``` >>> >>> I can’t see anything in the logs, so it does not seem to be called. >>> >>> Can you reproduce the issue? >> >> How did you reproduce this? > > On a “server” (with Intel Xeon?), in my case Dell PowerEdge T640 and > Dell PowerEdge R930 (Intel E7-8891 v3), run > >     kexec /boot/bzImage --initrd=/boot/grub/initramfs.igz --reuse-cmdline Were you able to fit some cycles into reproducing/analyzing this issue? Kind regards, Paul