All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
@ 2019-12-06  0:36 ` Ashish Kalra
  0 siblings, 0 replies; 8+ messages in thread
From: Ashish Kalra @ 2019-12-06  0:36 UTC (permalink / raw)
  To: hch, tglx, mingo, bp, hpa, x86, luto, peterz, dave.hansen,
	konrad.wilk, iommu, linux-kernel, brijesh.singh, Thomas.Lendacky

From: Ashish Kalra <ashish.kalra@amd.com>

For SEV, all DMA to and from guest has to use shared
(un-encrypted) pages. SEV uses SWIOTLB to make this happen
without requiring changes to device drivers. However,
depending on workload being run, the default 64MB of SWIOTLB
might not be enough and SWIOTLB may run out of buffers to
use for DMA, resulting in I/O errors.

Increase the default size of SWIOTLB for SEV guests using
a minimum value of 128MB and a maximum value of 512MB,
determining on amount of provisioned guest memory.

The SWIOTLB default size adjustment is added as an
architecture specific interface/callback to allow
architectures such as those supporting memory encryption
to adjust/expand SWIOTLB size for their use.

Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
---
 arch/x86/Kconfig           |  1 +
 arch/x86/mm/mem_encrypt.c  | 36 ++++++++++++++++++++++++++++++++++++
 include/linux/dma-direct.h | 10 ++++++++++
 kernel/dma/Kconfig         |  3 +++
 kernel/dma/swiotlb.c       | 14 ++++++++++++--
 5 files changed, 62 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d6e1faa28c58..c48bddf4b5b7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1533,6 +1533,7 @@ config AMD_MEM_ENCRYPT
 	select DYNAMIC_PHYSICAL_MASK
 	select ARCH_USE_MEMREMAP_PROT
 	select ARCH_HAS_FORCE_DMA_UNENCRYPTED
+	select ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
 	---help---
 	  Say yes to enable support for the encryption of system memory.
 	  This requires an AMD processor that supports Secure Memory
diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index 9268c12458c8..12e586b37a92 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -376,6 +376,42 @@ bool force_dma_unencrypted(struct device *dev)
 	return false;
 }
 
+#define TOTAL_MEM_1G	0x40000000U
+#define TOTAL_MEM_4G	0x100000000U
+
+/*
+ * Override for SWIOTLB default size adjustment -
+ * ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
+ */
+unsigned long adjust_swiotlb_default_size(unsigned long default_size)
+{
+	/*
+	 * For SEV, all DMA has to occur via shared/unencrypted pages.
+	 * SEV uses SWOTLB to make this happen without changing device
+	 * drivers. However, depending on the workload being run, the
+	 * default 64MB of SWIOTLB may not be enough & SWIOTLB may
+	 * run out of buffers for using DMA, resulting in I/O errors.
+	 * Increase the default size of SWIOTLB for SEV guests using
+	 * a minimum value of 128MB and a maximum value of 512GB,
+	 * depending on amount of provisioned guest memory.
+	 */
+	if (sev_active()) {
+		unsigned long total_mem = get_num_physpages() << PAGE_SHIFT;
+
+		if (total_mem <= TOTAL_MEM_1G)
+			default_size = default_size * 2;
+		else if (total_mem <= TOTAL_MEM_4G)
+			default_size = default_size * 4;
+		else
+			default_size = default_size * 8;
+
+		pr_info_once("SEV is active, SWIOTLB default size set to %luMB\n",
+			     default_size >> 20);
+	}
+
+	return default_size;
+}
+
 /* Architecture __weak replacement functions */
 void __init mem_encrypt_free_decrypted_mem(void)
 {
diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h
index adf993a3bd58..481943e08c94 100644
--- a/include/linux/dma-direct.h
+++ b/include/linux/dma-direct.h
@@ -41,6 +41,16 @@ static inline bool force_dma_unencrypted(struct device *dev)
 }
 #endif /* CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED */
 
+#ifdef CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
+unsigned long adjust_swiotlb_default_size(unsigned long default_size);
+#else
+static inline unsigned long adjust_swiotlb_default_size
+		(unsigned long default_size);
+{
+	return default_size;
+}
+#endif	/* CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT */
+
 /*
  * If memory encryption is supported, phys_to_dma will set the memory encryption
  * bit in the DMA address, and dma_to_phys will clear it.  The raw __phys_to_dma
diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig
index 73c5c2b8e824..9fd88f45f48f 100644
--- a/kernel/dma/Kconfig
+++ b/kernel/dma/Kconfig
@@ -57,6 +57,9 @@ config ARCH_HAS_DMA_COHERENT_TO_PFN
 config ARCH_HAS_FORCE_DMA_UNENCRYPTED
 	bool
 
+config ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
+	bool
+
 config DMA_NONCOHERENT_CACHE_SYNC
 	bool
 
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 673a2cdb2656..346838edf9e5 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -155,11 +155,21 @@ void swiotlb_set_max_segment(unsigned int val)
 #define IO_TLB_DEFAULT_SIZE (64UL<<20)
 unsigned long swiotlb_size_or_default(void)
 {
+	unsigned long default_size = IO_TLB_DEFAULT_SIZE;
 	unsigned long size;
 
+	/*
+	 * If swiotlb size/amount of slabs are not defined on kernel command
+	 * line, then give a chance to architectures to adjust swiotlb
+	 * size, this may be required by some architectures such as those
+	 * supporting memory encryption.
+	 */
+	if (!io_tlb_nslabs)
+		default_size = adjust_swiotlb_default_size(default_size);
+
 	size = io_tlb_nslabs << IO_TLB_SHIFT;
 
-	return size ? size : (IO_TLB_DEFAULT_SIZE);
+	return size ? size : default_size;
 }
 
 void swiotlb_print_info(void)
@@ -245,7 +255,7 @@ int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)
 void  __init
 swiotlb_init(int verbose)
 {
-	size_t default_size = IO_TLB_DEFAULT_SIZE;
+	unsigned long default_size = swiotlb_size_or_default();
 	unsigned char *vstart;
 	unsigned long bytes;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
@ 2019-12-06  0:36 ` Ashish Kalra
  0 siblings, 0 replies; 8+ messages in thread
From: Ashish Kalra @ 2019-12-06  0:36 UTC (permalink / raw)
  To: hch, tglx, mingo, bp, hpa, x86, luto, peterz, dave.hansen,
	konrad.wilk, iommu, linux-kernel, brijesh.singh, Thomas.Lendacky

From: Ashish Kalra <ashish.kalra@amd.com>

For SEV, all DMA to and from guest has to use shared
(un-encrypted) pages. SEV uses SWIOTLB to make this happen
without requiring changes to device drivers. However,
depending on workload being run, the default 64MB of SWIOTLB
might not be enough and SWIOTLB may run out of buffers to
use for DMA, resulting in I/O errors.

Increase the default size of SWIOTLB for SEV guests using
a minimum value of 128MB and a maximum value of 512MB,
determining on amount of provisioned guest memory.

The SWIOTLB default size adjustment is added as an
architecture specific interface/callback to allow
architectures such as those supporting memory encryption
to adjust/expand SWIOTLB size for their use.

Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
---
 arch/x86/Kconfig           |  1 +
 arch/x86/mm/mem_encrypt.c  | 36 ++++++++++++++++++++++++++++++++++++
 include/linux/dma-direct.h | 10 ++++++++++
 kernel/dma/Kconfig         |  3 +++
 kernel/dma/swiotlb.c       | 14 ++++++++++++--
 5 files changed, 62 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d6e1faa28c58..c48bddf4b5b7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1533,6 +1533,7 @@ config AMD_MEM_ENCRYPT
 	select DYNAMIC_PHYSICAL_MASK
 	select ARCH_USE_MEMREMAP_PROT
 	select ARCH_HAS_FORCE_DMA_UNENCRYPTED
+	select ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
 	---help---
 	  Say yes to enable support for the encryption of system memory.
 	  This requires an AMD processor that supports Secure Memory
diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index 9268c12458c8..12e586b37a92 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -376,6 +376,42 @@ bool force_dma_unencrypted(struct device *dev)
 	return false;
 }
 
+#define TOTAL_MEM_1G	0x40000000U
+#define TOTAL_MEM_4G	0x100000000U
+
+/*
+ * Override for SWIOTLB default size adjustment -
+ * ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
+ */
+unsigned long adjust_swiotlb_default_size(unsigned long default_size)
+{
+	/*
+	 * For SEV, all DMA has to occur via shared/unencrypted pages.
+	 * SEV uses SWOTLB to make this happen without changing device
+	 * drivers. However, depending on the workload being run, the
+	 * default 64MB of SWIOTLB may not be enough & SWIOTLB may
+	 * run out of buffers for using DMA, resulting in I/O errors.
+	 * Increase the default size of SWIOTLB for SEV guests using
+	 * a minimum value of 128MB and a maximum value of 512GB,
+	 * depending on amount of provisioned guest memory.
+	 */
+	if (sev_active()) {
+		unsigned long total_mem = get_num_physpages() << PAGE_SHIFT;
+
+		if (total_mem <= TOTAL_MEM_1G)
+			default_size = default_size * 2;
+		else if (total_mem <= TOTAL_MEM_4G)
+			default_size = default_size * 4;
+		else
+			default_size = default_size * 8;
+
+		pr_info_once("SEV is active, SWIOTLB default size set to %luMB\n",
+			     default_size >> 20);
+	}
+
+	return default_size;
+}
+
 /* Architecture __weak replacement functions */
 void __init mem_encrypt_free_decrypted_mem(void)
 {
diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h
index adf993a3bd58..481943e08c94 100644
--- a/include/linux/dma-direct.h
+++ b/include/linux/dma-direct.h
@@ -41,6 +41,16 @@ static inline bool force_dma_unencrypted(struct device *dev)
 }
 #endif /* CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED */
 
+#ifdef CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
+unsigned long adjust_swiotlb_default_size(unsigned long default_size);
+#else
+static inline unsigned long adjust_swiotlb_default_size
+		(unsigned long default_size);
+{
+	return default_size;
+}
+#endif	/* CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT */
+
 /*
  * If memory encryption is supported, phys_to_dma will set the memory encryption
  * bit in the DMA address, and dma_to_phys will clear it.  The raw __phys_to_dma
diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig
index 73c5c2b8e824..9fd88f45f48f 100644
--- a/kernel/dma/Kconfig
+++ b/kernel/dma/Kconfig
@@ -57,6 +57,9 @@ config ARCH_HAS_DMA_COHERENT_TO_PFN
 config ARCH_HAS_FORCE_DMA_UNENCRYPTED
 	bool
 
+config ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
+	bool
+
 config DMA_NONCOHERENT_CACHE_SYNC
 	bool
 
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 673a2cdb2656..346838edf9e5 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -155,11 +155,21 @@ void swiotlb_set_max_segment(unsigned int val)
 #define IO_TLB_DEFAULT_SIZE (64UL<<20)
 unsigned long swiotlb_size_or_default(void)
 {
+	unsigned long default_size = IO_TLB_DEFAULT_SIZE;
 	unsigned long size;
 
+	/*
+	 * If swiotlb size/amount of slabs are not defined on kernel command
+	 * line, then give a chance to architectures to adjust swiotlb
+	 * size, this may be required by some architectures such as those
+	 * supporting memory encryption.
+	 */
+	if (!io_tlb_nslabs)
+		default_size = adjust_swiotlb_default_size(default_size);
+
 	size = io_tlb_nslabs << IO_TLB_SHIFT;
 
-	return size ? size : (IO_TLB_DEFAULT_SIZE);
+	return size ? size : default_size;
 }
 
 void swiotlb_print_info(void)
@@ -245,7 +255,7 @@ int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)
 void  __init
 swiotlb_init(int verbose)
 {
-	size_t default_size = IO_TLB_DEFAULT_SIZE;
+	unsigned long default_size = swiotlb_size_or_default();
 	unsigned char *vstart;
 	unsigned long bytes;
 
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
  2019-12-06  0:36 ` Ashish Kalra
  (?)
@ 2019-12-07 11:44   ` kbuild test robot
  -1 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2019-12-07 11:44 UTC (permalink / raw)
  To: Ashish Kalra
  Cc: kbuild-all, hch, tglx, mingo, bp, hpa, x86, luto, peterz,
	dave.hansen, konrad.wilk, iommu, linux-kernel, brijesh.singh,
	Thomas.Lendacky

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

Hi Ashish,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hch-configfs/for-next]
[also build test ERROR on linus/master v5.4 next-20191202]
[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/Ashish-Kalra/swiotlb-Adjust-SWIOTBL-bounce-buffer-size-for-SEV-guests/20191207-184151
base:   git://git.infradead.org/users/hch/configfs.git for-next
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 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 errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/pci-dma.c:2:0:
>> include/linux/dma-direct.h:49:1: error: expected identifier or '(' before '{' token
    {
    ^
   include/linux/dma-direct.h:47:29: warning: 'adjust_swiotlb_default_size' declared 'static' but never defined [-Wunused-function]
    static inline unsigned long adjust_swiotlb_default_size
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +49 include/linux/dma-direct.h

    43	
    44	#ifdef CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
    45	unsigned long adjust_swiotlb_default_size(unsigned long default_size);
    46	#else
    47	static inline unsigned long adjust_swiotlb_default_size
    48			(unsigned long default_size);
  > 49	{
    50		return default_size;
    51	}
    52	#endif	/* CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT */
    53	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
@ 2019-12-07 11:44   ` kbuild test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2019-12-07 11:44 UTC (permalink / raw)
  To: Ashish Kalra
  Cc: Thomas.Lendacky, kbuild-all, dave.hansen, konrad.wilk, peterz,
	x86, linux-kernel, iommu, mingo, bp, luto, hpa, brijesh.singh,
	tglx, hch

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

Hi Ashish,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hch-configfs/for-next]
[also build test ERROR on linus/master v5.4 next-20191202]
[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/Ashish-Kalra/swiotlb-Adjust-SWIOTBL-bounce-buffer-size-for-SEV-guests/20191207-184151
base:   git://git.infradead.org/users/hch/configfs.git for-next
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 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 errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/pci-dma.c:2:0:
>> include/linux/dma-direct.h:49:1: error: expected identifier or '(' before '{' token
    {
    ^
   include/linux/dma-direct.h:47:29: warning: 'adjust_swiotlb_default_size' declared 'static' but never defined [-Wunused-function]
    static inline unsigned long adjust_swiotlb_default_size
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +49 include/linux/dma-direct.h

    43	
    44	#ifdef CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
    45	unsigned long adjust_swiotlb_default_size(unsigned long default_size);
    46	#else
    47	static inline unsigned long adjust_swiotlb_default_size
    48			(unsigned long default_size);
  > 49	{
    50		return default_size;
    51	}
    52	#endif	/* CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT */
    53	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
@ 2019-12-07 11:44   ` kbuild test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2019-12-07 11:44 UTC (permalink / raw)
  To: kbuild-all

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

Hi Ashish,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hch-configfs/for-next]
[also build test ERROR on linus/master v5.4 next-20191202]
[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/Ashish-Kalra/swiotlb-Adjust-SWIOTBL-bounce-buffer-size-for-SEV-guests/20191207-184151
base:   git://git.infradead.org/users/hch/configfs.git for-next
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 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 errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/pci-dma.c:2:0:
>> include/linux/dma-direct.h:49:1: error: expected identifier or '(' before '{' token
    {
    ^
   include/linux/dma-direct.h:47:29: warning: 'adjust_swiotlb_default_size' declared 'static' but never defined [-Wunused-function]
    static inline unsigned long adjust_swiotlb_default_size
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +49 include/linux/dma-direct.h

    43	
    44	#ifdef CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
    45	unsigned long adjust_swiotlb_default_size(unsigned long default_size);
    46	#else
    47	static inline unsigned long adjust_swiotlb_default_size
    48			(unsigned long default_size);
  > 49	{
    50		return default_size;
    51	}
    52	#endif	/* CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT */
    53	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
  2019-12-06  0:36 ` Ashish Kalra
  (?)
@ 2019-12-08  1:52   ` kbuild test robot
  -1 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2019-12-08  1:52 UTC (permalink / raw)
  To: Ashish Kalra
  Cc: kbuild-all, hch, tglx, mingo, bp, hpa, x86, luto, peterz,
	dave.hansen, konrad.wilk, iommu, linux-kernel, brijesh.singh,
	Thomas.Lendacky

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

Hi Ashish,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hch-configfs/for-next]
[cannot apply to linus/master v5.4 next-20191206]
[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/Ashish-Kalra/swiotlb-Adjust-SWIOTBL-bounce-buffer-size-for-SEV-guests/20191207-184151
base:   git://git.infradead.org/users/hch/configfs.git for-next
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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 kernel/dma/swiotlb.c:24:0:
   include/linux/dma-direct.h:49:1: error: expected identifier or '(' before '{' token
    {
    ^
   In file included from kernel/dma/swiotlb.c:24:0:
>> include/linux/dma-direct.h:47:29: warning: 'adjust_swiotlb_default_size' used but never defined
    static inline unsigned long adjust_swiotlb_default_size
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/adjust_swiotlb_default_size +47 include/linux/dma-direct.h

    43	
    44	#ifdef CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
    45	unsigned long adjust_swiotlb_default_size(unsigned long default_size);
    46	#else
  > 47	static inline unsigned long adjust_swiotlb_default_size
    48			(unsigned long default_size);
  > 49	{
    50		return default_size;
    51	}
    52	#endif	/* CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT */
    53	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
@ 2019-12-08  1:52   ` kbuild test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2019-12-08  1:52 UTC (permalink / raw)
  To: Ashish Kalra
  Cc: Thomas.Lendacky, kbuild-all, dave.hansen, konrad.wilk, peterz,
	x86, linux-kernel, iommu, mingo, bp, luto, hpa, brijesh.singh,
	tglx, hch

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

Hi Ashish,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hch-configfs/for-next]
[cannot apply to linus/master v5.4 next-20191206]
[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/Ashish-Kalra/swiotlb-Adjust-SWIOTBL-bounce-buffer-size-for-SEV-guests/20191207-184151
base:   git://git.infradead.org/users/hch/configfs.git for-next
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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 kernel/dma/swiotlb.c:24:0:
   include/linux/dma-direct.h:49:1: error: expected identifier or '(' before '{' token
    {
    ^
   In file included from kernel/dma/swiotlb.c:24:0:
>> include/linux/dma-direct.h:47:29: warning: 'adjust_swiotlb_default_size' used but never defined
    static inline unsigned long adjust_swiotlb_default_size
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/adjust_swiotlb_default_size +47 include/linux/dma-direct.h

    43	
    44	#ifdef CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
    45	unsigned long adjust_swiotlb_default_size(unsigned long default_size);
    46	#else
  > 47	static inline unsigned long adjust_swiotlb_default_size
    48			(unsigned long default_size);
  > 49	{
    50		return default_size;
    51	}
    52	#endif	/* CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT */
    53	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
@ 2019-12-08  1:52   ` kbuild test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2019-12-08  1:52 UTC (permalink / raw)
  To: kbuild-all

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

Hi Ashish,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hch-configfs/for-next]
[cannot apply to linus/master v5.4 next-20191206]
[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/Ashish-Kalra/swiotlb-Adjust-SWIOTBL-bounce-buffer-size-for-SEV-guests/20191207-184151
base:   git://git.infradead.org/users/hch/configfs.git for-next
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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 kernel/dma/swiotlb.c:24:0:
   include/linux/dma-direct.h:49:1: error: expected identifier or '(' before '{' token
    {
    ^
   In file included from kernel/dma/swiotlb.c:24:0:
>> include/linux/dma-direct.h:47:29: warning: 'adjust_swiotlb_default_size' used but never defined
    static inline unsigned long adjust_swiotlb_default_size
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/adjust_swiotlb_default_size +47 include/linux/dma-direct.h

    43	
    44	#ifdef CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT
    45	unsigned long adjust_swiotlb_default_size(unsigned long default_size);
    46	#else
  > 47	static inline unsigned long adjust_swiotlb_default_size
    48			(unsigned long default_size);
  > 49	{
    50		return default_size;
    51	}
    52	#endif	/* CONFIG_ARCH_HAS_ADJUST_SWIOTLB_DEFAULT */
    53	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-08  1:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06  0:36 [PATCH] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests Ashish Kalra
2019-12-06  0:36 ` Ashish Kalra
2019-12-07 11:44 ` kbuild test robot
2019-12-07 11:44   ` kbuild test robot
2019-12-07 11:44   ` kbuild test robot
2019-12-08  1:52 ` kbuild test robot
2019-12-08  1:52   ` kbuild test robot
2019-12-08  1:52   ` kbuild test robot

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.