From: Aneesh Kumar K.V <aneesh.kumar@kernel.org>
To: Tianyu Lan <ltykernel@gmail.com>,
kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, longli@microsoft.com
Cc: Tianyu Lan <tiala@microsoft.com>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
aik@amd.com, hch@infradead.org, robin.murphy@arm.com,
vdso@hexbites.dev, mhklinux@outlook.com
Subject: Re: [RFC PATCH 1/1] x86/VMBus: DMA transfer with encrypted memory in Coco VM
Date: Mon, 03 Aug 2026 14:34:45 +0530 [thread overview]
Message-ID: <yq5a8q6n4lsi.fsf@kernel.org> (raw)
In-Reply-To: <20260803033520.12930-1-tiala@microsoft.com>
Tianyu Lan <ltykernel@gmail.com> writes:
> In CoCo VMs, system memory is encrypted by default.
> Device drivers typically rely on the DMA core's
> SWIOTLB as a bounce buffer for DMA operations, providing
> decrypted memory that can be shared between the guest and
> host.
>
> For PCI devices with T-Disp support and Confidential
> VMBus devices (https://lkml.org/lkml/2026/7/27/1733) can
> perform DMA transfers directly with private/encrypted
> memory in a CoCo VM.
>
> To support DMA transfer with encrypted memory, Hyper-V
> DMA ops are introduced and bypass some API which may
> use swiotlb as bounce buffer.
>
> The DMA ops used is global data structure(see get_arch_
> dma_ops() and get_dma_ops() for details). There is no
> need to set up for each device individually.
>
Can we use __DMA_ATTR_ALLOC_CC_SHARED instead of checking
hyperv_private_memory_dma(dev) directly? Also, would it be possible to
encapsulate this logic in something like force_dma_encrypted(dev)?
Looking at functions such as hyperv_dma_alloc_coherent(), how does this
differ from dma_direct_alloc()?
-aneesh
next prev parent reply other threads:[~2026-08-03 9:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 3:35 [RFC PATCH 1/1] x86/VMBus: DMA transfer with encrypted memory in Coco VM Tianyu Lan
2026-08-03 3:53 ` sashiko-bot
2026-08-03 9:04 ` Aneesh Kumar K.V [this message]
2026-08-04 9:22 ` Tianyu Lan
2026-08-05 10:11 ` Aneesh Kumar K.V
2026-08-06 14:21 ` Tianyu Lan
2026-08-06 15:14 ` Robin Murphy
2026-08-07 14:32 ` Tianyu Lan
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=yq5a8q6n4lsi.fsf@kernel.org \
--to=aneesh.kumar@kernel.org \
--cc=aik@amd.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=hch@infradead.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=ltykernel@gmail.com \
--cc=mhklinux@outlook.com \
--cc=robin.murphy@arm.com \
--cc=tiala@microsoft.com \
--cc=vdso@hexbites.dev \
--cc=wei.liu@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 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.