diff options
author | Peng Liang <liangpeng10@huawei.com> | 2021-03-02 21:30:16 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-03-06 11:41:54 +0100 |
commit | faabca42cc4ff51110116dfe44d420c668b4d8d8 (patch) | |
tree | 4002b785ada57f8e4d20388ed277b9e189a1c143 /hw/pci-host/grackle.c | |
parent | 3920552846e881bafa9f9aad0bb1a6eef874d7fb (diff) | |
download | qemu-faabca42cc4ff51110116dfe44d420c668b4d8d8.zip qemu-faabca42cc4ff51110116dfe44d420c668b4d8d8.tar.gz qemu-faabca42cc4ff51110116dfe44d420c668b4d8d8.tar.bz2 |
lsilogic: Use PCIDevice::exit instead of DeviceState::unrealize
PCI_DEVICE has overwritten DeviceState::unrealize (pci_qdev_unrealize).
However, LSI53C895A, which is a subclass of PCI_DEVICE, overwrites it
again and doesn't save the parent's implementation so the PCI_DEVICE's
implementation of DeviceState::unrealize will never be called when
unrealize a LSI53C895A device. And it will lead to memory leak and
unplug failure.
For a PCI device, it's better to implement PCIDevice::exit instead of
DeviceState::unrealize. So let's change to use PCIDevice::exit.
Fixes: a8632434c7e9 ("lsi: implement I/O memory space for Memory Move instructions")
Cc: qemu-stable@nongnu.org
Signed-off-by: Peng Liang <liangpeng10@huawei.com>
Message-Id: <20210302133016.1221081-1-liangpeng10@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/pci-host/grackle.c')
0 files changed, 0 insertions, 0 deletions