[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 17/38] e1000: use instance_finalize instead of e
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 17/38] e1000: use instance_finalize instead of exit |
Date: |
Tue, 17 Sep 2013 12:13:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
Il 17/09/2013 11:27, Michael S. Tsirkin ha scritto:
>> > static void
>> > -pci_e1000_uninit(PCIDevice *dev)
>> > +pci_e1000_instance_finalize(Object *obj)
>> > {
>> > - E1000State *d = E1000(dev);
>> > + E1000State *d = E1000(obj);
>> >
>> > timer_del(d->autoneg_timer);
>> > timer_free(d->autoneg_timer);
> So this looks wrong.
> This cancels timers after pci device has been destroyed,
> so meanwhile timers can run and send interrupts.
There are definitely cases where the timer deals with pending I/O and
has to run after the device has been removed from guest access. This is
_not_ yet the point of destruction; the connection to the host backend
still exists in particular (it is only dropped by
object_property_del_all, which is called right after instance_finalize).
It should not be a problem for a device to raise an interrupt after
pci_do_unregister_device; it should go nowhere. If it is passed to the
guest, it's a bug that we have to fix.
Paolo
- Re: [Qemu-devel] [PATCH 10/38] msix: split msix_free from msix_uninit, (continued)
- [Qemu-devel] [PATCH 11/38] cmd646: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 12/38] ide/piix: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 13/38] ide/via: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 14/38] ivshmem: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 15/38] pci-testdev: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 16/38] vfio: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 17/38] e1000: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 18/38] eepro100: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 19/38] ne2000: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 20/38] pcnet: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 22/38] vmxnet3: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 21/38] rtl8139: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 23/38] shpc: split shpc_free from shpc_cleanup, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 25/38] pcie_aer: pcie_aer_exit really frees stuff, Paolo Bonzini, 2013/09/03