[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <PH7PR11MB8455D6D3B5D3ECAEB73F9F1A9A8BA@PH7PR11MB8455.namprd11.prod.outlook.com>
Date: Thu, 8 May 2025 09:49:17 +0000
From: "Miao, Jun" <jun.miao@...el.com>
To: "tglx@...utronix.de" <tglx@...utronix.de>, "mingo@...hat.com"
<mingo@...hat.com>, "bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
CC: "x86@...nel.org" <x86@...nel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Du, Fan" <fan.du@...el.com>, "Miao, Jun"
<jun.miao@...el.com>
Subject: RE: [PATCH] swiotlb: add a SWIOTLB_ANY flag to lift restricted low
memory for encryption
Hi maintainers and Big shot,
I would like to further explain my original intention:
The purpose is to solve the problem found by customers when inserting 8 NVMe disks - There will be a swiotlb buffer full warning.
When CONFIG_SWIOTLB_DYNAMIC is turned on, it is impossible to allocate more than 2G swiotlb buffer to meet the actual high throughput usage requirements.
Warm regards
Jun Miao
>
>TDX guest wants to allocate a swiotlb buffer that is not restricted to low memory
>for the trusted hypervisor scheme. So that allow to pick a location everywhere for
>hypervisors with guest memory encryption in
>swiotlb_memblock_alloc() interface by adding a new flag.
>
>Signed-off-by: Jun Miao <jun.miao@...el.com>
>---
> arch/x86/kernel/pci-dma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index
>6267363e0189..73b9320c4a7d 100644
>--- a/arch/x86/kernel/pci-dma.c
>+++ b/arch/x86/kernel/pci-dma.c
>@@ -61,7 +61,7 @@ static void __init pci_swiotlb_detect(void)
> */
> if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) {
> x86_swiotlb_enable = true;
>- x86_swiotlb_flags |= SWIOTLB_FORCE;
>+ x86_swiotlb_flags |= SWIOTLB_ANY | SWIOTLB_FORCE;
> }
> }
> #else
>--
>2.43.0
Powered by blists - more mailing lists