KVM: count number of assigned devices
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jul 2015 13:41:58 +0000 (15:41 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2015 11:25:26 +0000 (13:25 +0200)
commit5544eb9b81940647b8fad1f251b37cbe2819ce44
tree8a3e45817c9ba54102d4ad856cced515bc3bde62
parent370777daab3f024f1645177039955088e2e9ae73
KVM: count number of assigned devices

If there are no assigned devices, the guest PAT are not providing
any useful information and can be overridden to writeback; VMX
always does this because it has the "IPAT" bit in its extended
page table entries, but SVM does not have anything similar.
Hook into VFIO and legacy device assignment so that they
provide this information to KVM.

Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/iommu.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/vfio.c