Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-04-04 Thread Stefano Stabellini
On Tue, 3 Apr 2012, Wei Liu (Intern) wrote: On Thu, 2012-03-01 at 15:56 +, Paolo Bonzini wrote: Il 01/03/2012 15:50, Stefano Stabellini ha scritto: That is a good point actually: we already have lapic emulation in Xen, it makes sense to have apic-msi in Xen too. We

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-04-03 Thread Jan Kiszka
On 2012-04-03 18:44, Wei Liu wrote: On Thu, 2012-03-01 at 15:56 +, Paolo Bonzini wrote: Il 01/03/2012 15:50, Stefano Stabellini ha scritto: That is a good point actually: we already have lapic emulation in Xen, it makes sense to have apic-msi in Xen too. We would still need the changes to

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-04-03 Thread Wei Liu
On Thu, 2012-03-01 at 15:56 +, Paolo Bonzini wrote: Il 01/03/2012 15:50, Stefano Stabellini ha scritto: That is a good point actually: we already have lapic emulation in Xen, it makes sense to have apic-msi in Xen too. We would still need the changes to msi_notify and msix_notify

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Wei Liu
On Wed, 2012-02-29 at 17:47 +, Jan Kiszka wrote: On 2012-02-29 18:21, Wei Liu wrote: Hi all This patch adds MSI / MSIX injection for Xen HVM guest. This is not new, six months ago we had a discussion in http://marc.info/?l=qemu-develm=130639451725966w=2 There are some coding

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Jan Kiszka
On 2012-03-01 11:20, Wei Liu wrote: However, you know that you miss those (uncommon) messages that are injected via DMA? They end up directly in apic_deliver_msi (where KVM will once pick them up as well). Thanks for pointing this out. However I cannot find apic_deliver_msi in qemu-kvm or

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Wei Liu
On Thu, 2012-03-01 at 11:22 +, Jan Kiszka wrote: On 2012-03-01 11:20, Wei Liu wrote: However, you know that you miss those (uncommon) messages that are injected via DMA? They end up directly in apic_deliver_msi (where KVM will once pick them up as well). Thanks for pointing this

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Paolo Bonzini
Il 01/03/2012 12:51, Wei Liu ha scritto: On Thu, 2012-03-01 at 11:22 +, Jan Kiszka wrote: On 2012-03-01 11:20, Wei Liu wrote: However, you know that you miss those (uncommon) messages that are injected via DMA? They end up directly in apic_deliver_msi (where KVM will once pick them up as

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Stefano Stabellini
On Thu, 1 Mar 2012, Paolo Bonzini wrote: Il 01/03/2012 12:51, Wei Liu ha scritto: On Thu, 2012-03-01 at 11:22 +, Jan Kiszka wrote: On 2012-03-01 11:20, Wei Liu wrote: However, you know that you miss those (uncommon) messages that are injected via DMA? They end up directly in

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Paolo Bonzini
Il 01/03/2012 15:06, Stefano Stabellini ha scritto: This is not a NACK, but I can't help asking. Perhaps the fake Xen interrupt controller is a bit too simplistic? You can add a memory region corresponding to the APICs and trap writes in that region. Writes coming from QEMU are MSIs and

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Stefano Stabellini
On Thu, 1 Mar 2012, Paolo Bonzini wrote: Il 01/03/2012 15:06, Stefano Stabellini ha scritto: This is not a NACK, but I can't help asking. Perhaps the fake Xen interrupt controller is a bit too simplistic? You can add a memory region corresponding to the APICs and trap writes in that

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Paolo Bonzini
Il 01/03/2012 15:50, Stefano Stabellini ha scritto: That is a good point actually: we already have lapic emulation in Xen, it makes sense to have apic-msi in Xen too. We would still need the changes to msi_notify and msix_notify though. Why? The stores would just go to the Xen

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-03-01 Thread Stefano Stabellini
On Thu, 1 Mar 2012, Paolo Bonzini wrote: Il 01/03/2012 15:50, Stefano Stabellini ha scritto: That is a good point actually: we already have lapic emulation in Xen, it makes sense to have apic-msi in Xen too. We would still need the changes to msi_notify and msix_notify though.

[Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-02-29 Thread Wei Liu
Hi all This patch adds MSI / MSIX injection for Xen HVM guest. This is not new, six months ago we had a discussion in http://marc.info/?l=qemu-develm=130639451725966w=2 Wei. ---8- MSI / MSIX injection for Xen. This is supposed to be used in conjunction with Xen's hypercall interface

Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM

2012-02-29 Thread Jan Kiszka
On 2012-02-29 18:21, Wei Liu wrote: Hi all This patch adds MSI / MSIX injection for Xen HVM guest. This is not new, six months ago we had a discussion in http://marc.info/?l=qemu-develm=130639451725966w=2 There are some coding style issues, please use checkpatch.pl. Back then I voted