e1000e: correctly tear down MSI-X memory regions
PATCH 1/1 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.
--- hw/net/e1000e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/e1000e.c +1 -1
@@ -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); }
Signature · 1 line
2.9.3
Quoted 18 lines · Paolo Bonzini
MSI-X has been disabled by the time the e1000e device is unrealized, hence
msix_uninitis 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 <[email protected]>Cc Jason Wang <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- hw/net/e1000e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/net/e1000e.c +0
-0
hw/net/e1000e.c e1000e_init_msix(E1000EState *s) · line 312
Quoted 8 lines
hw/net/e1000e.c +1
-1@@ -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); }
Jason Wang
AppliedQuoted 13 lines · Laurent Vivier
Quoted 12 lines · Paolo Bonzini
MSI-X has been disabled by the time the e1000e device is unrealized, hence
msix_uninitis 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 <[email protected]>Cc Jason Wang <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- hw/net/e1000e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
hw/net/e1000e.c +0
-0hw/net/e1000e.c e1000e_init_msix(E1000EState *s) · line 312
Quoted 8 lines
hw/net/e1000e.c +1
-1@@ -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); }Tested-by Laurent Vivier <[email protected]>
Applied, thanks.