From: Paolo Bonzini Date: Thu, 9 Mar 2017 11:58:30 +0000 (+0100) Subject: e1000e: correctly tear down MSI-X memory regions X-Git-Tag: v2.9.0-rc0~5^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ec7ae4b973d1471f6f39fc2b6481f69c2b39593;p=thirdparty%2Fqemu.git e1000e: correctly tear down MSI-X memory regions 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 Cc: Jason Wang Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini Tested-by: Laurent Vivier Signed-off-by: Jason Wang --- diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index b0f429b8e52..6e234938dbf 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -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); }