From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH V10 05/11] iommu/vt-d: Add nested translation helper function
Date: Thu, 26 Mar 2020 18:41:17 +0800 [thread overview]
Message-ID: <202003261847.L8yeIDUG%lkp@intel.com> (raw)
In-Reply-To: <1584746861-76386-6-git-send-email-jacob.jun.pan@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 8019 bytes --]
Hi Jacob,
I love your patch! Perhaps something to improve:
[auto build test WARNING on iommu/next]
[also build test WARNING on linux/master linus/master v5.6-rc7 next-20200325]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jacob-Pan/Nested-Shared-Virtual-Address-SVA-VT-d-support/20200321-073024
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: i386-randconfig-c001-20200326 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:15:0,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/jump_label.h:250,
from include/linux/static_key.h:1,
from arch/x86/include/asm/nospec-branch.h:6,
from arch/x86/include/asm/paravirt_types.h:46,
from arch/x86/include/asm/ptrace.h:94,
from arch/x86/include/asm/math_emu.h:5,
from arch/x86/include/asm/processor.h:13,
from arch/x86/include/asm/cpufeature.h:5,
from include/linux/cpufeature.h:13,
from drivers/iommu/intel-pasid.c:13:
drivers/iommu/intel-pasid.c: In function 'iommu_skip_agaw':
drivers/iommu/intel-pasid.c:588:71: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
pr_debug_ratelimited("%s: pgd: %llx, agaw %d d_agaw %d\n", __func__, (u64)*pgd,
^
include/linux/printk.h:137:17: note: in definition of macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
drivers/iommu/intel-pasid.c:588:2: note: in expansion of macro 'pr_debug_ratelimited'
pr_debug_ratelimited("%s: pgd: %llx, agaw %d d_agaw %d\n", __func__, (u64)*pgd,
^~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/bitops.h:16:0,
from include/linux/bitops.h:29,
from drivers/iommu/intel-pasid.c:12:
drivers/iommu/intel-pasid.c: In function 'intel_pasid_setup_nested':
drivers/iommu/intel-pasid.c:812:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if ((u64)gpgd > domain->max_addr) {
^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/iommu/intel-pasid.c:812:2: note: in expansion of macro 'if'
if ((u64)gpgd > domain->max_addr) {
^~
drivers/iommu/intel-pasid.c:812:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if ((u64)gpgd > domain->max_addr) {
^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/iommu/intel-pasid.c:812:2: note: in expansion of macro 'if'
if ((u64)gpgd > domain->max_addr) {
^~
drivers/iommu/intel-pasid.c:812:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if ((u64)gpgd > domain->max_addr) {
^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ? \
^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
>> drivers/iommu/intel-pasid.c:812:2: note: in expansion of macro 'if'
if ((u64)gpgd > domain->max_addr) {
^~
In file included from include/linux/device.h:15:0,
from include/linux/acpi.h:15,
from include/linux/dmar.h:12,
from drivers/iommu/intel-pasid.c:14:
drivers/iommu/intel-pasid.c:814:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(u64)gpgd, domain->max_addr);
^
include/linux/dev_printk.h:104:32: note: in definition of macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/iommu/intel-pasid.c:817:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
pasid_set_flptr(pte, (u64)gpgd);
^
vim +/if +812 drivers/iommu/intel-pasid.c
741
742 /**
743 * intel_pasid_setup_nested() - Set up PASID entry for nested translation.
744 * This could be used for guest shared virtual address. In this case, the
745 * first level page tables are used for GVA-GPA translation in the guest,
746 * second level page tables are used for GPA-HPA translation.
747 *
748 * @iommu: IOMMU which the device belong to
749 * @dev: Device to be set up for translation
750 * @gpgd: FLPTPTR: First Level Page translation pointer in GPA
751 * @pasid: PASID to be programmed in the device PASID table
752 * @pasid_data: Additional PASID info from the guest bind request
753 * @domain: Domain info for setting up second level page tables
754 * @addr_width: Address width of the first level (guest)
755 */
756 int intel_pasid_setup_nested(struct intel_iommu *iommu,
757 struct device *dev, pgd_t *gpgd,
758 int pasid, struct iommu_gpasid_bind_data_vtd *pasid_data,
759 struct dmar_domain *domain,
760 int addr_width)
761 {
762 struct pasid_entry *pte;
763 struct dma_pte *pgd;
764 int ret = 0;
765 u64 pgd_val;
766 int agaw;
767 u16 did;
768
769 if (!ecap_nest(iommu->ecap)) {
770 pr_err("IOMMU: %s: No nested translation support\n",
771 iommu->name);
772 return -EINVAL;
773 }
774
775 pte = intel_pasid_get_entry(dev, pasid);
776 if (WARN_ON(!pte))
777 return -EINVAL;
778
779 /*
780 * Caller must ensure PASID entry is not in use, i.e. not bind the
781 * same PASID to the same device twice.
782 */
783 if (pasid_pte_is_present(pte))
784 return -EBUSY;
785
786 pasid_clear_entry(pte);
787
788 /* Sanity checking performed by caller to make sure address
789 * width matching in two dimensions:
790 * 1. CPU vs. IOMMU
791 * 2. Guest vs. Host.
792 */
793 switch (addr_width) {
794 case ADDR_WIDTH_5LEVEL:
795 if (cpu_feature_enabled(X86_FEATURE_LA57) &&
796 cap_5lp_support(iommu->cap)) {
797 pasid_set_flpm(pte, 1);
798 } else {
799 dev_err(dev, "5-level paging not supported\n");
800 return -EINVAL;
801 }
802 break;
803 case ADDR_WIDTH_4LEVEL:
804 pasid_set_flpm(pte, 0);
805 break;
806 default:
807 dev_err(dev, "Invalid guest address width %d\n", addr_width);
808 return -EINVAL;
809 }
810
811 /* First level PGD is in GPA, must be supported by the second level */
> 812 if ((u64)gpgd > domain->max_addr) {
---
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: 35389 bytes --]
next prev parent reply other threads:[~2020-03-26 10:41 UTC|newest]
Thread overview: 135+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-20 23:27 [PATCH V10 00/11] Nested Shared Virtual Address (SVA) VT-d support Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-20 23:27 ` [PATCH V10 01/11] iommu/vt-d: Move domain helper to header Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-27 11:48 ` Tian, Kevin
2020-03-27 11:48 ` Tian, Kevin
2020-03-20 23:27 ` [PATCH V10 02/11] iommu/uapi: Define a mask for bind data Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-22 1:29 ` Lu Baolu
2020-03-22 1:29 ` Lu Baolu
2020-03-23 19:37 ` Jacob Pan
2020-03-23 19:37 ` Jacob Pan
2020-03-24 1:50 ` Lu Baolu
2020-03-24 1:50 ` Lu Baolu
2020-03-27 11:50 ` Tian, Kevin
2020-03-27 11:50 ` Tian, Kevin
2020-03-27 14:13 ` Auger Eric
2020-03-27 14:13 ` Auger Eric
2020-03-20 23:27 ` [PATCH V10 03/11] iommu/vt-d: Add a helper function to skip agaw Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-27 11:53 ` Tian, Kevin
2020-03-27 11:53 ` Tian, Kevin
2020-03-29 7:20 ` Lu Baolu
2020-03-29 7:20 ` Lu Baolu
2020-03-30 17:50 ` Jacob Pan
2020-03-30 17:50 ` Jacob Pan
2020-03-20 23:27 ` [PATCH V10 04/11] iommu/vt-d: Use helper function to skip agaw for SL Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-27 11:55 ` Tian, Kevin
2020-03-27 11:55 ` Tian, Kevin
2020-03-27 16:05 ` Auger Eric
2020-03-27 16:05 ` Auger Eric
2020-03-29 7:35 ` Lu Baolu
2020-03-29 7:35 ` Lu Baolu
2020-03-20 23:27 ` [PATCH V10 05/11] iommu/vt-d: Add nested translation helper function Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-26 10:41 ` kbuild test robot [this message]
2020-03-27 12:21 ` Tian, Kevin
2020-03-27 12:21 ` Tian, Kevin
2020-03-29 8:03 ` Lu Baolu
2020-03-29 8:03 ` Lu Baolu
2020-03-30 18:21 ` Jacob Pan
2020-03-30 18:21 ` Jacob Pan
2020-03-31 3:36 ` Tian, Kevin
2020-03-31 3:36 ` Tian, Kevin
2020-03-29 11:35 ` Auger Eric
2020-03-29 11:35 ` Auger Eric
2020-04-01 20:06 ` Jacob Pan
2020-04-01 20:06 ` Jacob Pan
2020-03-20 23:27 ` [PATCH V10 06/11] iommu/vt-d: Add bind guest PASID support Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-28 8:02 ` Tian, Kevin
2020-03-28 8:02 ` Tian, Kevin
2020-03-30 20:51 ` Jacob Pan
2020-03-30 20:51 ` Jacob Pan
2020-03-31 3:43 ` Tian, Kevin
2020-03-31 3:43 ` Tian, Kevin
2020-04-01 17:13 ` Jacob Pan
2020-04-01 17:13 ` Jacob Pan
2020-03-29 13:40 ` Auger Eric
2020-03-29 13:40 ` Auger Eric
2020-03-30 22:53 ` Jacob Pan
2020-03-30 22:53 ` Jacob Pan
2020-03-20 23:27 ` [PATCH V10 07/11] iommu/vt-d: Support flushing more translation cache types Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-27 14:46 ` Auger Eric
2020-03-27 14:46 ` Auger Eric
2020-03-30 23:28 ` Jacob Pan
2020-03-30 23:28 ` Jacob Pan
2020-03-31 16:13 ` Jacob Pan
2020-03-31 16:13 ` Jacob Pan
2020-03-31 16:15 ` Auger Eric
2020-03-31 16:15 ` Auger Eric
2020-03-20 23:27 ` [PATCH V10 08/11] iommu/vt-d: Add svm/sva invalidate function Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-28 10:01 ` Tian, Kevin
2020-03-28 10:01 ` Tian, Kevin
2020-03-29 15:34 ` Auger Eric
2020-03-29 15:34 ` Auger Eric
2020-03-31 2:49 ` Tian, Kevin
2020-03-31 2:49 ` Tian, Kevin
2020-03-31 20:58 ` Jacob Pan
2020-03-31 20:58 ` Jacob Pan
2020-04-01 6:29 ` Tian, Kevin
2020-04-01 6:29 ` Tian, Kevin
2020-04-01 7:13 ` Liu, Yi L
2020-04-01 7:13 ` Liu, Yi L
2020-04-01 7:32 ` Auger Eric
2020-04-01 7:32 ` Auger Eric
2020-04-01 16:05 ` Jacob Pan
2020-04-01 16:05 ` Jacob Pan
2020-04-02 15:54 ` Jacob Pan
2020-04-02 15:54 ` Jacob Pan
2020-03-29 16:05 ` Auger Eric
2020-03-29 16:05 ` Auger Eric
2020-03-31 3:34 ` Tian, Kevin
2020-03-31 3:34 ` Tian, Kevin
2020-03-31 21:07 ` Jacob Pan
2020-03-31 21:07 ` Jacob Pan
2020-04-01 6:32 ` Tian, Kevin
2020-04-01 6:32 ` Tian, Kevin
2020-03-31 18:13 ` Jacob Pan
2020-03-31 18:13 ` Jacob Pan
2020-04-01 6:24 ` Tian, Kevin
2020-04-01 6:24 ` Tian, Kevin
2020-04-01 6:57 ` Liu, Yi L
2020-04-01 6:57 ` Liu, Yi L
2020-04-01 16:03 ` Jacob Pan
2020-04-01 16:03 ` Jacob Pan
2020-03-29 16:05 ` Auger Eric
2020-03-29 16:05 ` Auger Eric
2020-03-31 22:28 ` Jacob Pan
2020-03-31 22:28 ` Jacob Pan
2020-03-20 23:27 ` [PATCH V10 09/11] iommu/vt-d: Cache virtual command capability register Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-28 10:04 ` Tian, Kevin
2020-03-28 10:04 ` Tian, Kevin
2020-03-31 22:33 ` Jacob Pan
2020-03-31 22:33 ` Jacob Pan
2020-03-20 23:27 ` [PATCH V10 10/11] iommu/vt-d: Enlightened PASID allocation Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-28 10:08 ` Tian, Kevin
2020-03-28 10:08 ` Tian, Kevin
2020-03-31 22:37 ` Jacob Pan
2020-03-31 22:37 ` Jacob Pan
2020-03-20 23:27 ` [PATCH V10 11/11] iommu/vt-d: Add custom allocator for IOASID Jacob Pan
2020-03-20 23:27 ` Jacob Pan
2020-03-28 10:22 ` Tian, Kevin
2020-03-28 10:22 ` Tian, Kevin
2020-04-01 15:47 ` Jacob Pan
2020-04-01 15:47 ` Jacob Pan
2020-04-02 2:18 ` Tian, Kevin
2020-04-02 2:18 ` Tian, Kevin
2020-04-02 20:28 ` Jacob Pan
2020-04-02 20:28 ` Jacob Pan
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=202003261847.L8yeIDUG%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@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.