From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF6yA-0005hB-Ae for qemu-devel@nongnu.org; Tue, 03 Apr 2012 12:52:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SF6y5-0000WG-8l for qemu-devel@nongnu.org; Tue, 03 Apr 2012 12:52:33 -0400 Received: from david.siemens.de ([192.35.17.14]:30734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF6y4-0000UY-UB for qemu-devel@nongnu.org; Tue, 03 Apr 2012 12:52:29 -0400 Message-ID: <4F7B2AC3.6030304@siemens.com> Date: Tue, 03 Apr 2012 18:52:19 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1330536077.10387.57.camel@leeds.uk.xensource.com> <4F4E64B5.5080900@siemens.com> <1330597236.10387.70.camel@leeds.uk.xensource.com> <4F4F5BF5.6010206@siemens.com> <1330602678.10387.73.camel@leeds.uk.xensource.com> <4F4F71F0.4070109@redhat.com> <4F4F81AE.9080503@redhat.com> <4F4F9C3F.5020201@redhat.com> <1333471466.2485.259.camel@leeds.uk.xensource.com> In-Reply-To: <1333471466.2485.259.camel@leeds.uk.xensource.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wei Liu Cc: Paolo Bonzini , xen-devel , QEMU-devel , Stefano Stabellini On 2012-04-03 18:44, Wei Liu wrote: > On Thu, 2012-03-01 at 15:56 +0000, 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. >>>>> >>>>> Why? The stores would just go to the Xen interrupt controller MMIO area >>>>> which then does the xc_hvm_inject_msi. >>> >>> Because msi(x)_notify is called by QEMU's emulated devices: it is not >>> possible from QEMU to cause an emulation trap in Xen on behalf of the >>> guest. >> > > I'm not a QEMU expert, so following question may be dumb. However I do > care about a cleaner implementation. So please be patient with me. :-) > >> msi{x,}_notify doesn't have to go to Xen MMIO emulation, so in Wei's >> patch you don't need anymore the msi{,x}_notify parts, only apic_send_msi. >> > > I don't quite understand "you don't need anymore the msi{,x}_notify > parts". Virtio PCI invokes msi_notify directly. If I don't hook up > msi{,x}_notify, how can I deal with devices like Virtio PCI? See how KVM will solve this in [1]. Jan [1] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/89121 -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] MSI / MSIX injection for Xen HVM Date: Tue, 03 Apr 2012 18:52:19 +0200 Message-ID: <4F7B2AC3.6030304@siemens.com> References: <1330536077.10387.57.camel@leeds.uk.xensource.com> <4F4E64B5.5080900@siemens.com> <1330597236.10387.70.camel@leeds.uk.xensource.com> <4F4F5BF5.6010206@siemens.com> <1330602678.10387.73.camel@leeds.uk.xensource.com> <4F4F71F0.4070109@redhat.com> <4F4F81AE.9080503@redhat.com> <4F4F9C3F.5020201@redhat.com> <1333471466.2485.259.camel@leeds.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1333471466.2485.259.camel@leeds.uk.xensource.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Wei Liu Cc: Paolo Bonzini , xen-devel , QEMU-devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 2012-04-03 18:44, Wei Liu wrote: > On Thu, 2012-03-01 at 15:56 +0000, 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. >>>>> >>>>> Why? The stores would just go to the Xen interrupt controller MMIO area >>>>> which then does the xc_hvm_inject_msi. >>> >>> Because msi(x)_notify is called by QEMU's emulated devices: it is not >>> possible from QEMU to cause an emulation trap in Xen on behalf of the >>> guest. >> > > I'm not a QEMU expert, so following question may be dumb. However I do > care about a cleaner implementation. So please be patient with me. :-) > >> msi{x,}_notify doesn't have to go to Xen MMIO emulation, so in Wei's >> patch you don't need anymore the msi{,x}_notify parts, only apic_send_msi. >> > > I don't quite understand "you don't need anymore the msi{,x}_notify > parts". Virtio PCI invokes msi_notify directly. If I don't hook up > msi{,x}_notify, how can I deal with devices like Virtio PCI? See how KVM will solve this in [1]. Jan [1] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/89121 -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux