qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] vfio: Support P2P access in confidential VM


From: Wencheng Yang
Subject: Re: [PATCH] vfio: Support P2P access in confidential VM
Date: Tue, 21 Jan 2025 16:50:05 +0800

hi, David,

> I'm wondering: isn't this something the kernel should be able to figure
> out? Is this encrypted RAM (SMA) or not, and set the flag accordingly?
> What are the challenges?

VFIO driver and IOMMU driver don't know the device(memory or device mmio) behind vaddr, 
only device driver knows that, now that the device is managed by user space VFIO,
user should tell the info to VFIO driver.

On Mon, Jan 20, 2025 at 6:21 PM David Hildenbrand <david@redhat.com> wrote:
On 16.01.25 10:53, Wencheng Yang wrote:
> On confidential VM platform, for example, AMD-SEV, P2P doesn't work.
> The underlying reason is that IOMMU driver set encryption bit on
> IOMMU page table pte entry, it's reasonalbe if the pte maps iova
> to system memory. However, if the pte maps iova to device's
> mmio bar space, setting encryption bit on pte would cause IOMMU
> translates iova to incorrect bus address, rather than mmio bar
> address.
>
> To fix the issue, the key point is to let IOMMU driver know the
> target phyical address is system memory or device mmio.

I'm wondering: isn't this something the kernel should be able to figure
out? Is this encrypted RAM (SMA) or not, and set the flag accordingly?

What are the challenges?

--
Cheers,

David / dhildenb


reply via email to

[Prev in Thread] Current Thread [Next in Thread]