kvm/x86: Convert iommu_flags to iommu_noncoherent
Default to operating in coherent mode. This simplifies the logic when we switch to a model of registering and unregistering noncoherent I/O with KVM. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

committed by
Paolo Bonzini

parent
ec53500fae
commit
d96eb2c6f4
@@ -7446,7 +7446,7 @@ static u64 vmx_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio)
|
||||
if (is_mmio)
|
||||
ret = MTRR_TYPE_UNCACHABLE << VMX_EPT_MT_EPTE_SHIFT;
|
||||
else if (vcpu->kvm->arch.iommu_domain &&
|
||||
!(vcpu->kvm->arch.iommu_flags & KVM_IOMMU_CACHE_COHERENCY))
|
||||
vcpu->kvm->arch.iommu_noncoherent)
|
||||
ret = kvm_get_guest_memory_type(vcpu, gfn) <<
|
||||
VMX_EPT_MT_EPTE_SHIFT;
|
||||
else
|
||||
|
@@ -2719,7 +2719,7 @@ static void wbinvd_ipi(void *garbage)
|
||||
static bool need_emulate_wbinvd(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return vcpu->kvm->arch.iommu_domain &&
|
||||
!(vcpu->kvm->arch.iommu_flags & KVM_IOMMU_CACHE_COHERENCY);
|
||||
vcpu->kvm->arch.iommu_noncoherent;
|
||||
}
|
||||
|
||||
void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
|
||||
|
Reference in New Issue
Block a user