mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aakarsh Jain <aakarsh.jain@oss.qualcomm.com>
To: Jun Miao <jun.miao@intel.com>,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, fan.du@intel.com,
	thomas.lendacky@amd.com, aakarsh.jain@oss.qualcomm.com
Subject: Re: [PATCH] swiotlb: add a SWIOTLB_ANY flag to lift restricted low memory for encryption
Date: Wed, 11 Feb 2026 15:05:53 +0530	[thread overview]
Message-ID: <8b4fb83a-caeb-49fd-8e78-67664a07cbe4@oss.qualcomm.com> (raw)
In-Reply-To: <20250429165330.2644155-1-jun.miao@intel.com>

Hi Jun,

On 4/29/2025 10:23 PM, Jun Miao wrote:
> 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@intel.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


Thanks for working on this patch.

We ran into the same limitation where the SWIOTLB bounce buffer cannot
be increased beyond 1GB without this change.

I reviewed the change and tested it on our setup. With this patch 
applied, we are able to successfully configure and use SWIOTLB bounce 
buffer size greater than 1GB, and the previous allocation failures are 
resolved.

Since, I wanted to bring more visibility to this patch.

Feel free to add
Reviewed-by: Aakarsh Jain <aakarsh.jain@oss.qualcomm.com>
Tested-by: Aakarsh Jain <aakarsh.jain@oss.qualcomm.com>


Thanks,
Aakarsh

  parent reply	other threads:[~2026-02-11  9:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 16:53 Jun Miao
2025-05-08  9:49 ` Miao, Jun
2026-02-11  9:35 ` Aakarsh Jain [this message]
2026-02-12  3:18   ` Miao, Jun

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=8b4fb83a-caeb-49fd-8e78-67664a07cbe4@oss.qualcomm.com \
    --to=aakarsh.jain@oss.qualcomm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=fan.du@intel.com \
    --cc=jun.miao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®