[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/3] Disable vhost device IOTLB is IOMMU is not enabled
From: |
Chao Gao |
Subject: |
Re: [PATCH 0/3] Disable vhost device IOTLB is IOMMU is not enabled |
Date: |
Wed, 4 Aug 2021 13:57:04 +0800 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Wed, Aug 04, 2021 at 11:48:00AM +0800, Jason Wang wrote:
>Hi:
>
>We currently try to enable device IOTLB when iommu_platform is
>set. This may lead unnecessary trasnsactions between qemu and vhost
>when vIOMMU is not used (which is the typical case for the encrypted
>VM).
>
>So patch tries to use transport specific method to detect the enalbing
>of vIOMMU and enable the device IOTLB only if vIOMMU is enalbed.
>
>Please review.
Tested-by: Chao Gao <chao.gao@intel.com>
Tested with TDX; this series fixes the performance issue we saw in a TD
when vhost was enabled.
Thanks
Chao
>
>Thanks
>
>Jason Wang (3):
> virtio-bus: introduce iommu_enabled()
> virtio-pci: implement iommu_enabled()
> vhost: correctly detect the enabling IOMMU
>
> hw/virtio/vhost.c | 2 +-
> hw/virtio/virtio-bus.c | 14 ++++++++++++++
> hw/virtio/virtio-pci.c | 14 ++++++++++++++
> include/hw/virtio/virtio-bus.h | 4 +++-
> 4 files changed, 32 insertions(+), 2 deletions(-)
>
>--
>2.25.1
>