Re: [PATCH RFC] qemu: fix hot remove assigned device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/09/09 16:51, Paul Brook wrote:
On Tuesday 09 June 2009, Han, Weidong wrote:
Paul Brook wrote:
On Monday 08 June 2009, Weidong Han wrote:
When hot remove an assigned device, segmentation fault was triggered
by qemu_free(&pci_dev->qdev) in pci_unregister_device().
pci_register_device() doesn't initialize or set pci_dev->qdev. For an
assigned device, qdev variable isn't touched at all. So segmentation
fault happens when to free a non-initialized qdev.
Better would be to just disable hot remove for devices still using
the legacy pci_register_device API.
PCI passthrough uses pci_register_device to register assigned device to
qemu. Is there newer API to do so?

Yes. See e.g. LSI scsi emulation.

Well. Except that you can't (yet) register pci config read/write callbacks using the qdev-based API.

cheers,
  Gerd

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux