]> git.proxmox.com Git - mirror_qemu.git/commitdiff
e1000e: correctly tear down MSI-X memory regions
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Mar 2017 11:58:30 +0000 (12:58 +0100)
committerJason Wang <jasowang@redhat.com>
Tue, 14 Mar 2017 07:39:55 +0000 (15:39 +0800)
MSI-X has been disabled by the time the e1000e device is unrealized, hence
msix_uninit is never called.  This causes the object to be leaked, which
shows up as a RAMBlock with empty name when attempting migration.

Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/e1000e.c

index b0f429b8e52576e3cf18bfdcc8051c36a89c14b7..6e234938dbf960e02d8ffc28390e55e170104143 100644 (file)
@@ -306,7 +306,7 @@ e1000e_init_msix(E1000EState *s)
 static void
 e1000e_cleanup_msix(E1000EState *s)
 {
-    if (msix_enabled(PCI_DEVICE(s))) {
+    if (msix_present(PCI_DEVICE(s))) {
         e1000e_unuse_msix_vectors(s, E1000E_MSIX_VEC_NUM);
         msix_uninit(PCI_DEVICE(s), &s->msix, &s->msix);
     }