From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: Enable more than 255 VCPU support without irq remapping function in the guest Date: Wed, 4 May 2016 07:38:00 +0200 Message-ID: <57298AB8.1030600@siemens.com> References: <571F93CA.40200@intel.com> <571F9487.5090009@siemens.com> <20160426164939.GA18900@potion> <57203B9D.6020402@gmail.com> <57204D28.4070706@siemens.com> <572088D0.7040805@gmail.com> <57208A54.40502@siemens.com> <57216341.80006@gmail.com> <5721B394.9050008@siemens.com> <20160428153251.GA17368@potion> <5722C247.6040004@gmail.com> <5722EA47.80205@siemens.com> <57280475.2080506@gmail.com> <6449BFFE-245B-4641-AEB4-9F666A7CDBE8@gmail.com> <57282F41.8030802@siemens.com> <5729546D.8010006@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , "Lan, Tianyu" , Paolo Bonzini , kvm@vger.kernel.org, Thomas Gleixner , mst@redhat.com, x86@kernel.org, Peter Xu , Igor Mammedov To: Yang Zhang , Nadav Amit Return-path: Received: from david.siemens.de ([192.35.17.14]:39522 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbcEDFif (ORCPT ); Wed, 4 May 2016 01:38:35 -0400 In-Reply-To: <5729546D.8010006@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2016-05-04 03:46, Yang Zhang wrote: > On 2016/5/3 12:55, Jan Kiszka wrote: >> On 2016-05-03 04:03, Nadav Amit wrote: >>> >>> Anyhow, the VM can use IOMMU passthrough mode to avoid most IOMMU >>> overhead. >>> Regardless, a recent patch-set should improve DMAR performance >>> considerably [1]. >> >> The bottleneck with emulated DMAR is rather in QEMU. But DMAR can be >> almost as cheap as IR once we get it running for VFIO and vhost: both >> need proper caching because they do not work with QEMU in the loop for >> each and every DMA transfer. Still no need to deviate from physical >> hardware. > > Sorry, i don't know detail about how VFIO and vhost work with IR. But it > seems hard to do proper caching since DMA allocations are very > frequently in Linux unless we move the whole iommu emulation to kernel. There is technically no reason for Linux to reprogram the DMAR units unless it changes partitioning (or really wants to enforce strict DMA containment for each device). You can surely tune this to no updates at all for the guest Linux under normal operations. Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux