lkml.org 
[lkml]   [2023]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1 02/14] iommufd: Add nesting related data structures for ARM SMMUv3
From
On 2023-03-09 21:01, Jason Gunthorpe wrote:
>> For a lot of SMMUv3 implementations that have a single queue and for
>> other architectures, we can do better than hardware emulation.
>
> How is using a SW emulated virtio formatted queue better than using a
> SW emulated SMMUv3 ECMDQ?

Since it's not been said, the really big thing is that virtio explicitly
informs the host whenever the guest maps something. Emulating SMMUv3
means the host has to chase all the pagetable pointers in guest memory
and trap writes such that it has visibility of invalid->valid
transitions and can update the physical shadow pagetable correspondingly.

FWIW we spent quite some time on and off discussing something like
VT-d's "caching mode", but never found a convincing argument that it was
a gap which needed filling, since we already had hardware nesting for
maximum performance and a paravirtualisation option for efficient
emulation. Thus full SMMUv3 emulation seems to just sit at the bottom as
the maximum-compatibility option for pushing an unmodified legacy
bare-metal software stack into a VM where nesting isn't available.

Cheers,
Robin.

\
 
 \ /
  Last update: 2023-03-27 00:53    [W:0.331 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site