Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-18 Thread Sheng Yang
On Wednesday 18 February 2009 19:29:28 Avi Kivity wrote: > Sheng Yang wrote: > > On Wednesday 18 February 2009 19:00:53 Avi Kivity wrote: > >> Sheng Yang wrote: > >>> We have to handle more than one interrupt with one handler for MSI-X. > >>> So we need a bitmap to track the triggered interrupts. >

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-18 Thread Avi Kivity
Sheng Yang wrote: On Wednesday 18 February 2009 19:00:53 Avi Kivity wrote: Sheng Yang wrote: We have to handle more than one interrupt with one handler for MSI-X. So we need a bitmap to track the triggered interrupts. Can you explain why? Or how can we know which interrup

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-18 Thread Sheng Yang
On Wednesday 18 February 2009 19:00:53 Avi Kivity wrote: > Sheng Yang wrote: > > We have to handle more than one interrupt with one handler for MSI-X. So > > we need a bitmap to track the triggered interrupts. > > Can you explain why? Or how can we know which interrupt happened? Current we schedul

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-18 Thread Avi Kivity
Sheng Yang wrote: We have to handle more than one interrupt with one handler for MSI-X. So we need a bitmap to track the triggered interrupts. Can you explain why? -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from th

[PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-18 Thread Sheng Yang
We have to handle more than one interrupt with one handler for MSI-X. So we need a bitmap to track the triggered interrupts. Signed-off-by: Sheng Yang --- include/linux/kvm_host.h |5 +- virt/kvm/kvm_main.c | 102 - 2 files changed, 102 inser

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-17 Thread Sheng Yang
On Wednesday 18 February 2009 02:09:49 Avi Kivity wrote: > Sheng Yang wrote: > >>> + if (assigned_dev->irq_requested_type == KVM_ASSIGNED_DEV_MSIX) { > >>> + u32 gsi; > >>> + gsi = find_gsi_from_host_irq(assigned_dev, irq); > >>> + if (gsi == 0) > >>> + retur

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-17 Thread Avi Kivity
Sheng Yang wrote: + if (assigned_dev->irq_requested_type == KVM_ASSIGNED_DEV_MSIX) { + u32 gsi; + gsi = find_gsi_from_host_irq(assigned_dev, irq); + if (gsi == 0) + return IRQ_HANDLED; So you chose GSI == 0 as invalid b

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-13 Thread Marcelo Tosatti
On Fri, Feb 13, 2009 at 11:37:45AM +0800, Sheng Yang wrote: > > > +#define KVM_ASSIGNED_DEV_MSIX((1 << 2) | (1 << 10)) > > > > Can you explain the usage of the two bits? > > Um... Just to keep consistent with formers(one for guest and one for host), > at > cost of one bit. OK > > C

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-12 Thread Sheng Yang
On Friday 13 February 2009 03:51:18 Marcelo Tosatti wrote: > Hi Sheng, > > On Wed, Feb 11, 2009 at 04:08:50PM +0800, Sheng Yang wrote: > > We have to handle more than one interrupt with one handler for MSI-X. So > > we need a bitmap to track the triggered interrupts. > > > > Signed-off-by: Sheng Ya

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-12 Thread Marcelo Tosatti
Hi Sheng, On Wed, Feb 11, 2009 at 04:08:50PM +0800, Sheng Yang wrote: > We have to handle more than one interrupt with one handler for MSI-X. So we > need a bitmap to track the triggered interrupts. > > Signed-off-by: Sheng Yang > --- > include/linux/kvm_host.h |5 +- > virt/kvm/kvm_main.c

[PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-11 Thread Sheng Yang
We have to handle more than one interrupt with one handler for MSI-X. So we need a bitmap to track the triggered interrupts. Signed-off-by: Sheng Yang --- include/linux/kvm_host.h |5 +- virt/kvm/kvm_main.c | 103 - 2 files changed, 103 inser