mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aakarsh Jain <aakarsh.jain@oss.qualcomm.com>
To: Borislav Petkov <bp@alien8.de>, "Miao, Jun" <jun.miao@intel.com>
Cc: "tglx@kernel.org" <tglx@kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Michael Roth <michael.roth@amd.com>,
	Nikunj A Dadhania <nikunj@amd.com>
Subject: Re: [PATCH v3] x86/pci-dma: add a SWIOTLB_ANY flag to lift the low mem limitation
Date: Wed, 24 Jun 2026 11:24:42 +0530	[thread overview]
Message-ID: <0e1c5b0e-9442-4fcb-936a-dedbe7b1f8a5@oss.qualcomm.com> (raw)
In-Reply-To: <20260624051151.GEajtnF44jZ6hlnIhi@fat_crate.local>


Hi Borislav,

On 6/24/2026 10:41 AM, Borislav Petkov wrote:
> On Wed, Jun 24, 2026 at 03:23:39AM +0000, Miao, Jun wrote:
>>> On Wed, Jun 24, 2026 at 01:53:39AM +0000, Miao, Jun wrote:
>>>> Good suggestion and thank you for testing the ADM SEV-SNP.
>>>
>>> I don't think anyone tested it on SNP yet.
>>
>> I only know that SEV-SNP is a more advanced, third-generation feature.
>> Are we using "SEV" here as a shorthand for these?
> 
> You have SEV, SEV-ES and SEV-SNP in the order of their appearance and in the
> order they have gotten additional features. SNP is the one which is has
> addressed the most if not all? confidential VM attack vectors. And that's the
> one I care about as the other two are just the prerequisites to the SNP thing.
> In my opinion only anyway.
> 
>> When using confidential VMs, users want to pass through both the high-speed
>> network interface card (NIC) or an 8-GPUs setup into the CVMs. During data
>> transfer, the SWIOTLB bounce buffer becomes a critical "hot path" acting as
>> an intermediary for convertor between private and shared memory.
>> consequently, the capacity requirement increases—otherwise, network or data
>> transfer performance would be adversely affected.
> 
> Yes, that makes more sense. Pls add it to the commit message.
> 
>> What I mean to convey is that in TEE environments based on AMD SEV or Intel TDX,
>> the core issue is the lack of trust in the hypervisor's VMM.
> 
> Then say it this way. Trusted hypervisor sounds like we trust the HV. Which we
> absolutely do not.
> 
>> When using confidential VMs, users want to pass through both the high-speed
>> network interface card (NIC) or an 8-GPUs setup into the CVMs. During data
>> transfer, the SWIOTLB bounce buffer becomes a critical "hot path" acting as
>> an intermediary for convertor between private and shared memory.
>> consequently, the capacity requirement increases—otherwise, network or data
>> transfer performance would be adversely affected
>>
>> Confidential VMs include AMD SEV and Intel TDX guests want to allocate
>> a swiotlb buffer that is not restricted to low memory in TEE.
> 
> Sounds better, yes.
> 
> Except that we still need to test it on SNP.
> 
> Adding some folks on Cc who can do that and take a look at your patch and vet
> it for SNP - my guest is still broken. :-\
> 
I tested this patch on a SEV-SNP guest and it works as expected. The 
SWIOTLB buffer is now allocated above the 4 GB low-memory boundary, 
confirming that the SWIOTLB_ANY flag takes effect on SNP as well. I was 
also able to scale the bounce buffer size up to support larger 
networking workloads.

 From kernel dmesg logs:
root@ubuntu:/home/ubuntu# dmesg | grep -i sev
[   21.191917] Memory Encryption Features active: AMD SEV SEV-ES SEV-SNP
[   21.192883] SEV: Status: SEV SEV-ES SEV-SNP
[   21.401897] SEV: APIC: wakeup_secondary_cpu() replaced with 
wakeup_cpu_via_vmgexit()
[   22.117267] SEV: Using SNP CPUID table, 28 entries present.
[   22.117884] SEV: SNP running at VMPL0.
[   24.164260] SEV: SNP guest platform devices initialized.
[   28.815142] systemd[1]: Detected confidential virtualization sev-snp.
[   30.063831] sev-guest sev-guest: Initialized SEV guest driver (using 
VMPCK0 communication key)
root@ubuntu:/home/ubuntu# dmesg | grep -i "IO TLB"
[    6.743607] software IO TLB: area num 4.
[   24.164169] software IO TLB: mapped [mem 
0x0000001df9c00000-0x0000001ff9c00000] (8192MB)
[   24.331266] software IO TLB: Memory encryption is active and system 
is using DMA bounce buffers
root@ubuntu:/home/ubuntu#


Thanks,
Aakarsh> Thx.
> 


  reply	other threads:[~2026-06-24  5:54 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
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 [this message]
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=0e1c5b0e-9442-4fcb-936a-dedbe7b1f8a5@oss.qualcomm.com \
    --to=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=m.szyprowski@samsung.com \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=nikunj@amd.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=robin.murphy@arm.com \
    --cc=tglx@kernel.org \
    --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®