[PATCH 4/4] KVM: Handle device assignment to guests

2008-06-27 Thread Amit Shah
From: Amit Shah <[EMAIL PROTECTED]> From: Ben-Ami Yassour <[EMAIL PROTECTED]> From: Han, Weidong <[EMAIL PROTECTED]> This patch adds support for handling PCI devices that are assigned to the guest ("PCI passthrough"). The device to be assigned to the guest is registered in the host kernel and int

[PATCH 1/4] KVM: Introduce kvm_set_irq to inject interrupts in guests

2008-06-27 Thread Amit Shah
This function injects an interrupt into the guest given the kvm struct, the (guest) irq number and the interrupt level. Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- arch/x86/kvm/irq.c | 11 +++ arch/x86/kvm/irq.h |2 ++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --g

[PATCH 1/2] KVM/userspace: Support for assigning PCI devices to guest

2008-06-27 Thread Amit Shah
From: Or Sagi <[EMAIL PROTECTED]> From: Nir Peleg <[EMAIL PROTECTED]> From: Amit Shah <[EMAIL PROTECTED]> From: Glauber de Oliveira Costa <[EMAIL PROTECTED]> We can assign a device from the host machine to a guest. The original code comes from Neocleus. A new command-line option, -pcidevice is ad

[PATCH 3/4] KVM: Introduce a callback routine for PIC ack handling

2008-06-27 Thread Amit Shah
This is useful for acking irqs of assigned devices Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- arch/x86/kvm/i8259.c |6 +- arch/x86/kvm/irq.c |2 +- arch/x86/kvm/irq.h |3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/i8259.c b/arch/x86/k

PCI device assignment to guests (userspace)

2008-06-27 Thread Amit Shah
Userspace patches for the pci-passthrough functionality. The major updates since the last post are: - Loop to add passthrough devices in pc_init1 - Handle errors in read/write calls - Allow invocation without irq number for in-kernel irqchip Other than this, several small things were fixed acco

[PATCH 2/2] KVM: PCIPT: irqhook module for interrupt injection into guests with

2008-06-27 Thread Amit Shah
From: Nir Peleg <[EMAIL PROTECTED]> From: Or Sagi <[EMAIL PROTECTED]> When using the --no-kvm-irqchip option, this irqhook module injects interrupts into the guests for assigned devices. This module is not well-supported and only exists for debugging and for legacy / non-x86 support. Signed-off-

[PATCH 2/4] KVM: Introduce a callback routine for IOAPIC ack handling

2008-06-27 Thread Amit Shah
This will be useful for acking irqs of assigned devices Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- virt/kvm/ioapic.c |3 +++ virt/kvm/ioapic.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 9d02136..6d99a35 100644 ---

PCI device assignment to guests

2008-06-27 Thread Amit Shah
The main change from the patches I sent out earlier this week is support for guests that use the PIC. A callback for PIC irq ack handling is also introduced. Currently, there's no mechanism to register/unregister callers to the irq ack callbacks, but they can be added when there's more than one