All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Liu Yi L <yi.l.liu@intel.com>,
	baolu.lu@linux.intel.com, joro@8bytes.org, will@kernel.org
Cc: kevin.tian@intel.com, kbuild-all@lists.01.org, lkp@intel.com,
	jun.j.tian@intel.com, iommu@lists.linux-foundation.org,
	yi.y.sun@intel.com, ashok.raj@intel.com
Subject: Re: [PATCH v3 3/3] iommu/vt-d: Fix ineffective devTLB invalidation for subdevices
Date: Tue, 5 Jan 2021 15:14:41 +0300	[thread overview]
Message-ID: <20210105121441.GB2809@kadam> (raw)
In-Reply-To: <20201229032513.486395-4-yi.l.liu@intel.com>

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

Hi Liu,

url:    https://github.com/0day-ci/linux/commits/Liu-Yi-L/iommu-vt-d-Misc-fixes-on-scalable-mode/20201229-113203
base:    5c8fe583cce542aa0b84adc939ce85293de36e5e
config: i386-randconfig-m021-20201229 (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/iommu.c:1471 domain_update_iotlb() error: we previously assumed 'info' could be null (see line 1472)

Old smatch warnings:
drivers/iommu/intel/iommu.c:920 device_to_iommu() error: we previously assumed 'pdev' could be null (see line 893)
drivers/iommu/intel/iommu.c:3764 intel_iommu_add() warn: should '(1 << sp)' be a 64 bit type?

vim +/info +1471 drivers/iommu/intel/iommu.c

0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1464  static void domain_update_iotlb(struct dmar_domain *domain)
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1465  {
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1466  	struct device_domain_info *info;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1467  	bool has_iotlb_device = false;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1468  
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1469  	assert_spin_locked(&device_domain_lock);
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1470  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29 @1471  	list_for_each_entry(info, &domain->devices, link)
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29 @1472  		if (info && info->ats_enabled) {
                                                                                            ^^^^
"info" is the list iterator so it can't ever be NULL.  Just delete the
NULL check.

1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1473  			has_iotlb_device = true;
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1474  			break;
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1475  		}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1476  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1477  	if (!has_iotlb_device) {
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1478  		struct subdev_domain_info *sinfo;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1479  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1480  		list_for_each_entry(sinfo, &domain->subdevices, link_domain) {
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1481  			info = get_domain_info(sinfo->pdev);
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1482  			if (info && info->ats_enabled) {
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1483  				has_iotlb_device = true;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1484  				break;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1485  			}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1486  		}
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1487  	}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1488  
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1489  	domain->has_iotlb_device = has_iotlb_device;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1490  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35310 bytes --]

[-- Attachment #3: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v3 3/3] iommu/vt-d: Fix ineffective devTLB invalidation for subdevices
Date: Tue, 05 Jan 2021 15:14:41 +0300	[thread overview]
Message-ID: <20210105121441.GB2809@kadam> (raw)
In-Reply-To: <20201229032513.486395-4-yi.l.liu@intel.com>

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

Hi Liu,

url:    https://github.com/0day-ci/linux/commits/Liu-Yi-L/iommu-vt-d-Misc-fixes-on-scalable-mode/20201229-113203
base:    5c8fe583cce542aa0b84adc939ce85293de36e5e
config: i386-randconfig-m021-20201229 (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/iommu.c:1471 domain_update_iotlb() error: we previously assumed 'info' could be null (see line 1472)

Old smatch warnings:
drivers/iommu/intel/iommu.c:920 device_to_iommu() error: we previously assumed 'pdev' could be null (see line 893)
drivers/iommu/intel/iommu.c:3764 intel_iommu_add() warn: should '(1 << sp)' be a 64 bit type?

vim +/info +1471 drivers/iommu/intel/iommu.c

0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1464  static void domain_update_iotlb(struct dmar_domain *domain)
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1465  {
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1466  	struct device_domain_info *info;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1467  	bool has_iotlb_device = false;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1468  
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1469  	assert_spin_locked(&device_domain_lock);
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1470  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29 @1471  	list_for_each_entry(info, &domain->devices, link)
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29 @1472  		if (info && info->ats_enabled) {
                                                                                            ^^^^
"info" is the list iterator so it can't ever be NULL.  Just delete the
NULL check.

1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1473  			has_iotlb_device = true;
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1474  			break;
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1475  		}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1476  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1477  	if (!has_iotlb_device) {
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1478  		struct subdev_domain_info *sinfo;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1479  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1480  		list_for_each_entry(sinfo, &domain->subdevices, link_domain) {
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1481  			info = get_domain_info(sinfo->pdev);
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1482  			if (info && info->ats_enabled) {
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1483  				has_iotlb_device = true;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1484  				break;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1485  			}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1486  		}
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1487  	}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1488  
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1489  	domain->has_iotlb_device = has_iotlb_device;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1490  }

---
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: 35310 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 3/3] iommu/vt-d: Fix ineffective devTLB invalidation for subdevices
Date: Tue, 05 Jan 2021 15:14:41 +0300	[thread overview]
Message-ID: <20210105121441.GB2809@kadam> (raw)
In-Reply-To: <20201229032513.486395-4-yi.l.liu@intel.com>

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

Hi Liu,

url:    https://github.com/0day-ci/linux/commits/Liu-Yi-L/iommu-vt-d-Misc-fixes-on-scalable-mode/20201229-113203
base:    5c8fe583cce542aa0b84adc939ce85293de36e5e
config: i386-randconfig-m021-20201229 (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/iommu.c:1471 domain_update_iotlb() error: we previously assumed 'info' could be null (see line 1472)

Old smatch warnings:
drivers/iommu/intel/iommu.c:920 device_to_iommu() error: we previously assumed 'pdev' could be null (see line 893)
drivers/iommu/intel/iommu.c:3764 intel_iommu_add() warn: should '(1 << sp)' be a 64 bit type?

vim +/info +1471 drivers/iommu/intel/iommu.c

0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1464  static void domain_update_iotlb(struct dmar_domain *domain)
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1465  {
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1466  	struct device_domain_info *info;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1467  	bool has_iotlb_device = false;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1468  
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1469  	assert_spin_locked(&device_domain_lock);
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1470  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29 @1471  	list_for_each_entry(info, &domain->devices, link)
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29 @1472  		if (info && info->ats_enabled) {
                                                                                            ^^^^
"info" is the list iterator so it can't ever be NULL.  Just delete the
NULL check.

1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1473  			has_iotlb_device = true;
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1474  			break;
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1475  		}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1476  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1477  	if (!has_iotlb_device) {
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1478  		struct subdev_domain_info *sinfo;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1479  
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1480  		list_for_each_entry(sinfo, &domain->subdevices, link_domain) {
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1481  			info = get_domain_info(sinfo->pdev);
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1482  			if (info && info->ats_enabled) {
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1483  				has_iotlb_device = true;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1484  				break;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1485  			}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1486  		}
1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L   2020-12-29  1487  	}
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1488  
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1489  	domain->has_iotlb_device = has_iotlb_device;
0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20  1490  }

---
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: 35310 bytes --]

  parent reply	other threads:[~2021-01-05 12:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29  3:25 [PATCH v3 0/3] iommu/vt-d: Misc fixes on scalable mode Liu Yi L
2020-12-29  3:25 ` Liu Yi L
2020-12-29  3:25 ` [PATCH v3 1/3] iommu/vt-d: Move intel_iommu info from struct intel_svm to struct intel_svm_dev Liu Yi L
2020-12-29  3:25   ` Liu Yi L
2020-12-29  8:34   ` Lu Baolu
2020-12-29  8:34     ` Lu Baolu
2020-12-29  3:25 ` [PATCH v3 2/3] iommu/vt-d: Track device aux-attach with subdevice_domain_info Liu Yi L
2020-12-29  3:25   ` Liu Yi L
2020-12-29  8:38   ` Lu Baolu
2020-12-29  8:38     ` Lu Baolu
2021-01-05  5:58     ` Liu, Yi L
2021-01-05  5:58       ` Liu, Yi L
2020-12-29  3:25 ` [PATCH v3 3/3] iommu/vt-d: Fix ineffective devTLB invalidation for subdevices Liu Yi L
2020-12-29  3:25   ` Liu Yi L
2020-12-29  8:41   ` Lu Baolu
2020-12-29  8:41     ` Lu Baolu
2021-01-05  5:50     ` Liu, Yi L
2021-01-05  5:50       ` Liu, Yi L
2021-01-05 17:23       ` Will Deacon
2021-01-05 17:23         ` Will Deacon
2021-01-07  5:22         ` Liu, Yi L
2021-01-07  5:22           ` Liu, Yi L
2021-01-05 12:14   ` Dan Carpenter [this message]
2021-01-05 12:14     ` Dan Carpenter
2021-01-05 12:14     ` Dan Carpenter
2020-12-29  8:42 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=20210105121441.GB2809@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=ashok.raj@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=jun.j.tian@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=kevin.tian@intel.com \
    --cc=lkp@intel.com \
    --cc=will@kernel.org \
    --cc=yi.l.liu@intel.com \
    --cc=yi.y.sun@intel.com \
    /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.