qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 10/10] vhost: iommu: cache static mapping if


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH v4 10/10] vhost: iommu: cache static mapping if there is
Date: Mon, 22 May 2017 10:30:34 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0



On 2017年05月20日 00:55, Michael S. Tsirkin wrote:
On Fri, May 19, 2017 at 11:19:49AM +0800, Peter Xu wrote:
This patch pre-heat vhost iotlb cache when passthrough mode enabled.

Sometimes, even if user specified iommu_platform for vhost devices,
IOMMU might still be disabled. One case is passthrough mode in VT-d
implementation. We can detect this by observing iommu_list. If it's
empty, it means IOMMU translation is disabled, then we can actually
pre-heat the translation (it'll be static mapping then) by first
invalidating all IOTLB, then cache existing memory ranges into vhost
backend iotlb using 1:1 mapping.

Signed-off-by: Peter Xu<address@hidden>
I don't really understand. Is this a performance optimization?
Can you post some #s please?

Also, if it's PT, can't we bypass iommu altogether?

The problem is, since device could be moved between domains, which means we need new notifier to notify vhost to enable or disable IOMMU_PLATFORM.

That would be
even faster ...


Should be the same (except for the first access in no CM mode), we pass and use vhost_memory_regions as what we've used for non iommu case.

Thanks



reply via email to

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