From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/iommu/intel/irq_remapping.c:519 iommu_enable_irq_remapping() warn: this loop depends on readl() succeeding
Date: Tue, 10 Nov 2020 04:17:53 +0800 [thread overview]
Message-ID: <202011100443.729NvM85-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5483 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Lu Baolu <baolu.lu@linux.intel.com>
CC: Joerg Roedel <jroedel@suse.de>
CC: Kevin Tian <kevin.tian@intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f8394f232b1eab649ce2df5c5f15b0e528c92091
commit: 6e4e9ec65078093165463c13d4eb92b3e8d7b2e8 iommu/vt-d: Serialize IOMMU GCMD register modifications
date: 9 weeks ago
:::::: branch date: 20 hours ago
:::::: commit date: 9 weeks ago
config: x86_64-randconfig-m001-20201109 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/iommu/intel/irq_remapping.c:519 iommu_enable_irq_remapping() warn: this loop depends on readl() succeeding
drivers/iommu/intel/irq_remapping.c:519 iommu_enable_irq_remapping() warn: this loop depends on readl() succeeding
Old smatch warnings:
drivers/iommu/intel/irq_remapping.c:689 iommu_disable_irq_remapping() warn: this loop depends on readl() succeeding
drivers/iommu/intel/irq_remapping.c:689 iommu_disable_irq_remapping() warn: this loop depends on readl() succeeding
vim +519 drivers/iommu/intel/irq_remapping.c
d4d1c0f3d6a9558 drivers/iommu/intel_irq_remapping.c Joerg Roedel 2015-06-12 501
d4d1c0f3d6a9558 drivers/iommu/intel_irq_remapping.c Joerg Roedel 2015-06-12 502 static void iommu_enable_irq_remapping(struct intel_iommu *iommu)
d4d1c0f3d6a9558 drivers/iommu/intel_irq_remapping.c Joerg Roedel 2015-06-12 503 {
d4d1c0f3d6a9558 drivers/iommu/intel_irq_remapping.c Joerg Roedel 2015-06-12 504 unsigned long flags;
d4d1c0f3d6a9558 drivers/iommu/intel_irq_remapping.c Joerg Roedel 2015-06-12 505 u32 sts;
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 506
1f5b3c3fd2d73d6 drivers/iommu/intr_remapping.c Thomas Gleixner 2011-07-19 507 raw_spin_lock_irqsave(&iommu->register_lock, flags);
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 508
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 509 /* Enable interrupt-remapping */
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 510 iommu->gcmd |= DMA_GCMD_IRE;
c416daa98a58459 drivers/pci/intr_remapping.c David Woodhouse 2009-05-10 511 writel(iommu->gcmd, iommu->reg + DMAR_GCMD_REG);
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 512 IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG,
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 513 readl, (sts & DMA_GSTS_IRES), sts);
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 514
6e4e9ec65078093 drivers/iommu/intel/irq_remapping.c Lu Baolu 2020-08-28 515 /* Block compatibility-format MSIs */
6e4e9ec65078093 drivers/iommu/intel/irq_remapping.c Lu Baolu 2020-08-28 516 if (sts & DMA_GSTS_CFIS) {
6e4e9ec65078093 drivers/iommu/intel/irq_remapping.c Lu Baolu 2020-08-28 517 iommu->gcmd &= ~DMA_GCMD_CFI;
6e4e9ec65078093 drivers/iommu/intel/irq_remapping.c Lu Baolu 2020-08-28 518 writel(iommu->gcmd, iommu->reg + DMAR_GCMD_REG);
6e4e9ec65078093 drivers/iommu/intel/irq_remapping.c Lu Baolu 2020-08-28 @519 IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG,
6e4e9ec65078093 drivers/iommu/intel/irq_remapping.c Lu Baolu 2020-08-28 520 readl, !(sts & DMA_GSTS_CFIS), sts);
6e4e9ec65078093 drivers/iommu/intel/irq_remapping.c Lu Baolu 2020-08-28 521 }
6e4e9ec65078093 drivers/iommu/intel/irq_remapping.c Lu Baolu 2020-08-28 522
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 523 /*
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 524 * With CFI clear in the Global Command register, we should be
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 525 * protected from dangerous (i.e. compatibility) interrupts
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 526 * regardless of x2apic status. Check just to be sure.
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 527 */
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 528 if (sts & DMA_GSTS_CFIS)
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 529 WARN(1, KERN_WARNING
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 530 "Compatibility-format IRQs enabled despite intr remapping;\n"
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 531 "you are vulnerable to IRQ injection.\n");
af8d102f999a41c drivers/iommu/intel_irq_remapping.c Andy Lutomirski 2013-02-01 532
1f5b3c3fd2d73d6 drivers/iommu/intr_remapping.c Thomas Gleixner 2011-07-19 533 raw_spin_unlock_irqrestore(&iommu->register_lock, flags);
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 534 }
2ae21010694e564 drivers/pci/intr_remapping.c Suresh Siddha 2008-07-10 535
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 47215 bytes --]
next reply other threads:[~2020-11-09 20:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 20:17 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-04 1:01 drivers/iommu/intel/irq_remapping.c:519 iommu_enable_irq_remapping() warn: this loop depends on readl() succeeding kernel test robot
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=202011100443.729NvM85-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.