This patchset introduces PCI passthrough support for KVM. This has been tested with an Ethernet device. The device is seen in the guest and interrupts are generated. However, no data transfer can take place unless pvdma or reserved-ram is used. The patches for pvdma will be available shortly. Sharing of interrupt line for the PCI device on the host side will cause slowness (and / or some glitches). Also, proper locking isn't in place yet. Single VMs exploiting this feature run well though. There also is a git repository for you to explore: git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm.git git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm-userspace.git Comments, feedback welcome. Amit.
Amit Shah
2008-Apr-10 08:48 UTC
[PATCH 1/2] KVM: Expose get_eoi_gsi() for IRQ acking by PCI passthrough devices
Signed-off-by: Amit Shah <amit.shah at qumranet.com> --- virt/kvm/ioapic.c | 2 +- virt/kvm/ioapic.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 4232fd7..c5e776a 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@ -268,7 +268,7 @@ void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level) } } -static int get_eoi_gsi(struct kvm_ioapic *ioapic, int vector) +int get_eoi_gsi(struct kvm_ioapic *ioapic, int vector) { int i; diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index 7f16675..d112a88 100644 --- a/virt/kvm/ioapic.h +++ b/virt/kvm/ioapic.h @@ -91,5 +91,6 @@ void kvm_ioapic_update_eoi(struct kvm *kvm, int vector); int kvm_ioapic_init(struct kvm *kvm); void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level); void kvm_ioapic_reset(struct kvm_ioapic *ioapic); +int get_eoi_gsi(struct kvm_ioapic *ioapic, int vector); #endif -- 1.4.4.2
This patchset introduces PCI passthrough support for KVM. This has been tested with an Ethernet device. The device is seen in the guest and interrupts are generated. However, no data transfer can take place unless pvdma or reserved-ram is used. The patches for pvdma will be available shortly. Sharing of interrupt line for the PCI device on the host side will cause slowness (and / or some glitches). Also, proper locking isn't in place yet. Single VMs exploiting this feature run well though. There also is a git repository for you to explore: git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm.git git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm-userspace.git Comments, feedback welcome. Amit.
Avi Kivity
2008-Apr-13 08:22 UTC
[kvm-devel] [PATCH 1/2] KVM: Expose get_eoi_gsi() for IRQ acking by PCI passthrough devices
Amit Shah wrote:> > -static int get_eoi_gsi(struct kvm_ioapic *ioapic, int vector) > +int get_eoi_gsi(struct kvm_ioapic *ioapic, int vector) >Such a generic name should be prefixed by kvm_ if you expose it. -- error compiling committee.c: too many arguments to function