qemu-devel
[Top][All Lists]
Advanced

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

Question about scsi device hotplug (e.g scsi-hd)


From: Maxim Levitsky
Subject: Question about scsi device hotplug (e.g scsi-hd)
Date: Tue, 31 Mar 2020 19:16:23 +0300

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]