On Wednesday 24 December 2008 02:10:20 Marcelo Tosatti wrote: > On Tue, Dec 23, 2008 at 04:00:31PM +0800, Sheng Yang wrote: > > Using kvm_set_irq to handle all interrupt injection. > > > > Signed-off-by: Sheng Yang <[email protected]> > > --- > > include/linux/kvm_host.h | 2 +- > > virt/kvm/irq_comm.c | 96 > > ++++++++++++++++++++++++++++++++++++++------- virt/kvm/kvm_main.c | > > 75 +++--------------------------------- 3 files changed, 88 > > insertions(+), 85 deletions(-) > > > > --- a/virt/kvm/irq_comm.c > > +++ b/virt/kvm/irq_comm.c > > @@ -20,28 +20,94 @@ > > */ > > > > > > #ifdef CONFIG_X86 > > - kvm_pic_set_irq(pic_irqchip(kvm), irq, !!(*irq_state)); > > + gsi_msg = kvm_find_gsi_msg(kvm, gsi); > > It was nicer isolated in assigned_device_msi_dispatch.
Um... The gsi_msg layer existed for this... AD: No matter it's MSI, MSI-X or IOAPIC, do kvm_set_irq() simply, you would get a interrupt! :) > > > -#ifdef CONFIG_X86 > > -#include <asm/msidef.h> > > -#endif > > And there's quite some x86 specific code sneaking into virt/kvm. Ideally > platform specific parts should be hidden behind interfaces. Sorry for the #ifdef, we would discard it after we enable MSI for IA64 which share the code mostly. -- regards Yang, Sheng -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
