qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: migrating guest with msi-x interrupts


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: migrating guest with msi-x interrupts
Date: Wed, 26 May 2010 17:02:47 +0300
User-agent: Mutt/1.5.19 (2009-01-05)

On Tue, May 25, 2010 at 04:09:13PM -0600, Cam Macdonell wrote:
> Hi,
> 
> I'm trying to migrate a guest device with MSI-X interrupts.  However,
> the interrupts are not injected into the guest.  I've added some
> tracing to msix.c and it seems that the MSI-X vectors are masked when
> the guest is resumed (I'm testing with static migration).
> 
> In particular, in msix.c, msix_is_masked(...) is returning true when
> the guest resumes which causes msix_set_pending() to be called instead
> of msix_set_irq().
> 
> /* Send an MSI-X message */
> void msix_notify(PCIDevice *dev, unsigned vector)
> {
>     uint8_t *table_entry = dev->msix_table_page + vector * MSIX_ENTRY_SIZE;
>     uint64_t address;
>     uint32_t data;
> 
>     if (vector >= dev->msix_entries_nr || !dev->msix_entry_used[vector])
>         return;
> 
>     if (msix_is_masked(dev, vector)) {
>         msix_set_pending(dev, vector);
>         return;
>     }
> 
> ...
> 
> Does migrating a guest device that uses MSI-X require
> msix_load()/save() to be called explicity in a pre/post_save/load
> function?
> 
> Any pointers or comments would be helpful,
> Cam

Yes. Look at how virtio does this.
Incidentially, I think reusing virtio for configuration would save
effort, and have other advantages such as making it possible to support
non-pci guests.

-- 
MST



reply via email to

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