Re: [PATCH 4/6] KVM: Add kvm_get_irq_routing_entry() func

2010-11-18 Thread Sheng Yang
On Thu, Nov 18, 2010 at 8:33 PM, Michael S. Tsirkin wrote: > On Thu, Nov 18, 2010 at 07:59:10PM +0800, Sheng Yang wrote: >> On Thu, Nov 18, 2010 at 5:41 PM, Michael S. Tsirkin wrote: >> > On Thu, Nov 18, 2010 at 11:30:47AM +0200, Avi Kivity wrote: >> >> >> >> >> >>  *entry may be stale after rcu_

Re: [PATCH 4/6] KVM: Add kvm_get_irq_routing_entry() func

2010-11-18 Thread Michael S. Tsirkin
On Thu, Nov 18, 2010 at 07:59:10PM +0800, Sheng Yang wrote: > On Thu, Nov 18, 2010 at 5:41 PM, Michael S. Tsirkin wrote: > > On Thu, Nov 18, 2010 at 11:30:47AM +0200, Avi Kivity wrote: > >> >> > >> >>  *entry may be stale after rcu_read_unlock().  Is this a problem? > >> > > >> >I suppose not. All

Re: [PATCH 4/6] KVM: Add kvm_get_irq_routing_entry() func

2010-11-18 Thread Sheng Yang
On Thu, Nov 18, 2010 at 5:41 PM, Michael S. Tsirkin wrote: > On Thu, Nov 18, 2010 at 11:30:47AM +0200, Avi Kivity wrote: >> >> >> >>  *entry may be stale after rcu_read_unlock().  Is this a problem? >> > >> >I suppose not. All MSI-X MMIO accessing would be executed without delay, so >> >no re- >>

Re: [PATCH 4/6] KVM: Add kvm_get_irq_routing_entry() func

2010-11-18 Thread Michael S. Tsirkin
On Thu, Nov 18, 2010 at 11:30:47AM +0200, Avi Kivity wrote: > >> > >> *entry may be stale after rcu_read_unlock(). Is this a problem? > > > >I suppose not. All MSI-X MMIO accessing would be executed without delay, so > >no re- > >order issue would happen. If the guest is reading and writing the

Re: [PATCH 4/6] KVM: Add kvm_get_irq_routing_entry() func

2010-11-18 Thread Avi Kivity
On 11/18/2010 04:22 AM, Sheng Yang wrote: On Wednesday 17 November 2010 22:01:41 Avi Kivity wrote: > On 11/15/2010 11:15 AM, Sheng Yang wrote: > > We need to query the entry later. > > > > +int kvm_get_irq_routing_entry(struct kvm *kvm, int gsi, > > + struct kvm_kernel_irq_routi

Re: [PATCH 4/6] KVM: Add kvm_get_irq_routing_entry() func

2010-11-17 Thread Sheng Yang
On Wednesday 17 November 2010 22:01:41 Avi Kivity wrote: > On 11/15/2010 11:15 AM, Sheng Yang wrote: > > We need to query the entry later. > > > > +int kvm_get_irq_routing_entry(struct kvm *kvm, int gsi, > > + struct kvm_kernel_irq_routing_entry *entry) > > +{ > > + int count = 0; > >

Re: [PATCH 4/6] KVM: Add kvm_get_irq_routing_entry() func

2010-11-17 Thread Avi Kivity
On 11/15/2010 11:15 AM, Sheng Yang wrote: We need to query the entry later. +int kvm_get_irq_routing_entry(struct kvm *kvm, int gsi, + struct kvm_kernel_irq_routing_entry *entry) +{ + int count = 0; + struct kvm_kernel_irq_routing_entry *ei = NULL; + struct kvm_ir

[PATCH 4/6] KVM: Add kvm_get_irq_routing_entry() func

2010-11-15 Thread Sheng Yang
We need to query the entry later. Signed-off-by: Sheng Yang --- include/linux/kvm_host.h |2 ++ virt/kvm/irq_comm.c | 20 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 9da2f1a..274655b 100