mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Jun Miao <jun.miao@intel.com>,
	tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, robin.murphy@arm.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	aakarsh.jain@oss.qualcomm.com
Subject: Re: [PATCH v3] x86/pci-dma: add a SWIOTLB_ANY flag to lift the low mem limitation
Date: Thu, 12 Feb 2026 11:11:25 +0100	[thread overview]
Message-ID: <82b0ec25-34f6-4419-8d35-06bf2de215fa@samsung.com> (raw)
In-Reply-To: <20260212093701.4165275-1-jun.miao@intel.com>

On 12.02.2026 10:37, Jun Miao wrote:
> Intel TDX guest wants to allocate a swiotlb buffer that is not restricted to
> low memory for the trusted hypervisor scheme.  Adding a new flag will be used
> in swiotlb_memblock_alloc() to allow allocation of SWIOTLB memory beyond low
> memory restriction.
>
> Power SVM already supports this, but X86 still faces the same limitation.
> Commit: 8ba2ed1be9 (swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction)
>
> Reviewed-by: Aakarsh Jain <aakarsh.jain@oss.qualcomm.com>
> Tested-by: Aakarsh Jain <aakarsh.jain@oss.qualcomm.com>
> Signed-off-by: Jun Miao <jun.miao@intel.com>

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
>
> V1 -> V2:
> 1.Updated commit message and description.
> 2.Add Reviewed and Tested.
>
> V1 Latest Feedback : https://protect2.fireeye.com/v1/url?k=f35668f3-92dd7dc5-f357e3bc-74fe485cbff1-e6ff63e2f942f6a7&q=1&e=66eee4e1-a18d-47f9-ad21-f3dfab1d6f09&u=https%3A%2F%2Flists.openwall.net%2Flinux-kernel%2F2026%2F02%2F11%2F483
>
> v2 -> v3:
> We can alloc 4GB with the dynamic swiotlb, rather than 1GB.
> 1G is not correct. So change the commit log.
>
> ---
>   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

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2026-02-12 10:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260212093712eucas1p1e7e21b4a3fdbc01af13e21938aaf2eff@eucas1p1.samsung.com>
2026-02-12  9:37 ` Jun Miao
2026-02-12 10:11   ` Marek Szyprowski [this message]
2026-03-18 10:24     ` Miao, Jun
2026-06-01  5:38       ` Aakarsh Jain
2026-06-01  5:54   ` Borislav Petkov
2026-06-24  1:22     ` Miao, Jun
2026-06-24  1:43       ` Borislav Petkov
2026-06-24  1:53         ` Miao, Jun
2026-06-24  2:29           ` Borislav Petkov
2026-06-24  3:23             ` Miao, Jun
2026-06-24  5:11               ` Borislav Petkov
2026-06-24  5:54                 ` Aakarsh Jain
2026-06-24 17:23                   ` Borislav Petkov
2026-06-24  8:12                 ` Miao, Jun
2026-06-24  9:54   ` Alexey Kardashevskiy

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=82b0ec25-34f6-4419-8d35-06bf2de215fa@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=aakarsh.jain@oss.qualcomm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=jun.miao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=robin.murphy@arm.com \
    --cc=tglx@kernel.org \
    --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®