qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] MSI / MSIX injection for Xen HVM
Date: Thu, 01 Mar 2012 16:56:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

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.

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.

But you could take it further and create a separate subclass of
apic-common that does absolutely nothing except register an MMIO memory
region and use it to trap MSI writes.  Basically an even more stripped
down version than hw/kvm/apic.c, but using memory_region_init_io rather
than memory_region_init_reservation.  You would also get support for the
monitor command inject-nmi (there is another hypercall for that in Xen
IIRC).

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]