From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v5] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices Date: Tue, 29 Jun 2010 15:35:35 +0300 Message-ID: <4C29E897.7090909@redhat.com> References: <4C286CCE.10309@redhat.com> <1277781419-13227-1-git-send-email-sheng@linux.intel.com> <20100629101403.GB1788@amd.com> <4C29CE89.6010206@redhat.com> <20100629122827.GC1788@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Sheng Yang , Marcelo Tosatti , Jan Kiszka , "kvm@vger.kernel.org" , "Yaozu (Eddie) Dong" To: "Roedel, Joerg" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:21032 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752229Ab0F2Mfm (ORCPT ); Tue, 29 Jun 2010 08:35:42 -0400 In-Reply-To: <20100629122827.GC1788@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/29/2010 03:28 PM, Roedel, Joerg wrote: > >> Do you mean, KVM_IOMMU_CACHE_COHERENCY should be set for the AMD IOMMU? >> > No, as far as I understand it the KVM_IOMMU_CACHE_COHERENCY flag is only > there because there are VT-d IOMMUs that does not support the snoop > force bit. In the AMD IOMMU case all hardware has this feature, the > IOMMU driver just has to use it for IOMMU-API page-tables too. This is > currently not the case. So this is only an IOMMU driver change. > The flag indicates to kvm that it doesn't need to worry about iommu cache coherency issues (for example, it can ignore wbinvd), so it needs to be set. THe following code if (iommu_domain_has_cap(kvm->arch.iommu_domain, IOMMU_CAP_CACHE_COHERENCY)) kvm->arch.iommu_flags |= KVM_IOMMU_CACHE_COHERENCY; does this, so it looks like you need to return true for iommu_domain_has_cap() after the change. So far only the intel iommu supports it. -- error compiling committee.c: too many arguments to function