qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Question about scsi device hotplug (e.g scsi-hd)
@ 2020-03-31 16:16 Maxim Levitsky
  2020-04-01 15:09 ` Stefan Hajnoczi
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Levitsky @ 2020-03-31 16:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

Hi!

I recently investigated an interesting issue related to repeated scsi-hd hotplug/hotunplug.
The bugzilla for it is here:
https://bugzilla.redhat.com/show_bug.cgi?id=1812399

In nutshell the issue that I think that I found and I would like to ask your opinion on it,
since I don't have enough experience to be 100% sure that I didn't miss something  is this:

When a new device is hotplugged via monitor, the qdev_device_add first puts the device on
the bus where the user requested it to be, and then calls the device's .realize.

However for scsi bus, each time a new request is sent from the guest, the scsi adapter drivers
(e.g virtio-scsi) call scsi_device_find to find the LUN's driver to dispatch the request to,
and scsi_device_find will return the added device as soon as it is placed on the bus.

Thus between the point when the new device is placed on the bus and until the end of the .realize,
the device can be accessed by the guest when it is not yet realized or partially realized as
happens in the bugreport.

What do you think about it?

Best regards,
	Maxim Levitsky



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-03 13:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-31 16:16 Question about scsi device hotplug (e.g scsi-hd) Maxim Levitsky
2020-04-01 15:09 ` Stefan Hajnoczi
2020-04-01 16:36   ` Paolo Bonzini
2020-04-02  5:37     ` Markus Armbruster
2020-04-02  8:49       ` Paolo Bonzini
2020-04-02  8:46     ` Maxim Levitsky
2020-04-03 12:41       ` Stefan Hajnoczi
2020-04-03 13:45         ` Markus Armbruster
2020-04-03 13:51           ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).