Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-18 Thread Jan Kiszka
On 2011-10-17 17:37, Michael S. Tsirkin wrote: On Mon, Oct 17, 2011 at 01:19:56PM +0200, Jan Kiszka wrote: On 2011-10-17 13:06, Avi Kivity wrote: On 10/17/2011 11:27 AM, Jan Kiszka wrote: This cache will help us implementing KVM in-kernel irqchip support without spreading hooks all over the

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-18 Thread Jan Kiszka
On 2011-10-17 17:43, Michael S. Tsirkin wrote: On Mon, Oct 17, 2011 at 11:27:46AM +0200, Jan Kiszka wrote: This cache will help us implementing KVM in-kernel irqchip support without spreading hooks all over the place. KVM requires us to register it first and then deliver it by raising a

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-18 Thread Michael S. Tsirkin
On Mon, Oct 17, 2011 at 09:19:34PM +0200, Jan Kiszka wrote: On 2011-10-17 17:37, Michael S. Tsirkin wrote: On Mon, Oct 17, 2011 at 01:19:56PM +0200, Jan Kiszka wrote: On 2011-10-17 13:06, Avi Kivity wrote: On 10/17/2011 11:27 AM, Jan Kiszka wrote: This cache will help us implementing KVM

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-18 Thread Jan Kiszka
On 2011-10-18 14:17, Michael S. Tsirkin wrote: On Mon, Oct 17, 2011 at 09:19:34PM +0200, Jan Kiszka wrote: On 2011-10-17 17:37, Michael S. Tsirkin wrote: On Mon, Oct 17, 2011 at 01:19:56PM +0200, Jan Kiszka wrote: On 2011-10-17 13:06, Avi Kivity wrote: On 10/17/2011 11:27 AM, Jan Kiszka

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-17 Thread Avi Kivity
On 10/17/2011 11:27 AM, Jan Kiszka wrote: This cache will help us implementing KVM in-kernel irqchip support without spreading hooks all over the place. KVM requires us to register it first and then deliver it by raising a pseudo IRQ line returned on registration. While this could be changed

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-17 Thread Jan Kiszka
On 2011-10-17 13:06, Avi Kivity wrote: On 10/17/2011 11:27 AM, Jan Kiszka wrote: This cache will help us implementing KVM in-kernel irqchip support without spreading hooks all over the place. KVM requires us to register it first and then deliver it by raising a pseudo IRQ line returned on

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-17 Thread Avi Kivity
On 10/17/2011 01:19 PM, Jan Kiszka wrote: IMO this needlessly leaks kvm information into core qemu. The cache should be completely hidden in kvm code. I think msi_deliver() can hide the use of the cache completely. For pre-registered events like kvm's irqfd, you can use something like

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-17 Thread Jan Kiszka
On 2011-10-17 13:25, Avi Kivity wrote: On 10/17/2011 01:19 PM, Jan Kiszka wrote: IMO this needlessly leaks kvm information into core qemu. The cache should be completely hidden in kvm code. I think msi_deliver() can hide the use of the cache completely. For pre-registered events like kvm's

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-17 Thread Avi Kivity
On 10/17/2011 01:31 PM, Jan Kiszka wrote: Just to make sure I understand this completely: a hash table indexed by MSIMessage in kvm code would avoid this? You'd just allocate on demand when seeing a new MSIMessage and free on an LRU basis, avoiding pinned entries. I'm not

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-17 Thread Michael S. Tsirkin
On Mon, Oct 17, 2011 at 01:19:56PM +0200, Jan Kiszka wrote: On 2011-10-17 13:06, Avi Kivity wrote: On 10/17/2011 11:27 AM, Jan Kiszka wrote: This cache will help us implementing KVM in-kernel irqchip support without spreading hooks all over the place. KVM requires us to register it

Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache

2011-10-17 Thread Michael S. Tsirkin
On Mon, Oct 17, 2011 at 11:27:46AM +0200, Jan Kiszka wrote: This cache will help us implementing KVM in-kernel irqchip support without spreading hooks all over the place. KVM requires us to register it first and then deliver it by raising a pseudo IRQ line returned on registration. While