提交 7ec7ae4b 编写于 作者: P Paolo Bonzini 提交者: Jason Wang

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: NDr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Tested-by: NLaurent Vivier <lvivier@redhat.com>
Signed-off-by: NJason Wang <jasowang@redhat.com>
上级 5bac3c39
...@@ -306,7 +306,7 @@ e1000e_init_msix(E1000EState *s) ...@@ -306,7 +306,7 @@ e1000e_init_msix(E1000EState *s)
static void static void
e1000e_cleanup_msix(E1000EState *s) 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); e1000e_unuse_msix_vectors(s, E1000E_MSIX_VEC_NUM);
msix_uninit(PCI_DEVICE(s), &s->msix, &s->msix); msix_uninit(PCI_DEVICE(s), &s->msix, &s->msix);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册