missing unplug of SCSI devices in HVM guest
Does anyone remember why the the vbd frontend drivers also claim the SCSI disks, but the vbd backend in qemu has no unplug support for SCSI?
The current situation for qemu-xen and qemu-xen-traditional is that both will create an emulated LSI controller with disk=[vdev=sda]. The xenlinux and pvops frontend drivers will claim the disk, but the sym53c8xx will see and claim it as well. As a result each disk is visible twice. One has to blacklist the sym53c8xx driver to avoid that.
What should be done to fix this?
#1 new unplug protocol for SCSI, but old guests dont know about it #2 reuse IDE flag to also unplug SCSI. This would cover pvops and guests
where xenlinux based xen-platform-pci.ko is loaded before sym53c8xx.ko. It would break guests with frontend drivers that do not claim SCSI disks, the SCSI disk would disappear (if such frontends really exist).
#3 do not provide SCSI if guest has PV drivers
Olaf
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 9 lines · Olaf Hering
Does anyone remember why the the vbd frontend drivers also claim the SCSI disks, but the vbd backend in qemu has no unplug support for SCSI?
The current situation for qemu-xen and qemu-xen-traditional is that both will create an emulated LSI controller with disk=[vdev=sda]. The xenlinux and pvops frontend drivers will claim the disk, but the sym53c8xx will see and claim it as well. As a result each disk is visible twice. One has to blacklist the sym53c8xx driver to avoid that.
Quoted 8 lines
What should be done to fix this?
#1 new unplug protocol for SCSI, but old guests dont know about it #2 reuse IDE flag to also unplug SCSI. This would cover pvops and guests
where xenlinux based xen-platform-pci.ko is loaded before sym53c8xx.ko. It would break guests with frontend drivers that do not claim SCSI disks, the SCSI disk would disappear (if such frontends really exist).
#3 do not provide SCSI if guest has PV drivers
I think #3 was has been done in practice, but obviously not enforced by the toolstack -- i.e., "Doctor, it hurts when I do this <makes motion>." "Then don't do that."
The problem with enforcing #3 is that there's no real way for the toolstack to know if the guest will have PV drivers before booting.
There's also #4: Do not provide a PV backend for SCSI disks. Not sure that's actually possible, as libxl has historically used the PV backend as the canonical place for listing disks associated with a domain (although that may have changed since XSA-whatever which resulted in libxl having its own local copy of the backend information).
Paul, do you have any thoughts?
-George
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 34 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of George Dunlap
Sent: 06 September 2016 17:42
To: Olaf Hering <[email protected]>; Paul Durrant <[email protected]>
Cc: [email protected]
Subject: Re: [Xen-devel] missing unplug of SCSI devices in HVM guestQuoted 9 lines · Olaf Hering
Does anyone remember why the the vbd frontend drivers also claim the SCSI disks, but the vbd backend in qemu has no unplug support for SCSI?
The current situation for qemu-xen and qemu-xen-traditional is that both will create an emulated LSI controller with disk=[vdev=sda]. The xenlinux and pvops frontend drivers will claim the disk, but the sym53c8xx will see and claim it as well. As a result each disk is visible twice. One has to blacklist the sym53c8xx driver to avoid that.
Quoted 8 lines
What should be done to fix this?
#1 new unplug protocol for SCSI, but old guests dont know about it #2 reuse IDE flag to also unplug SCSI. This would cover pvops and guests
where xenlinux based xen-platform-pci.ko is loaded before sym53c8xx.ko. It would break guests with frontend drivers that do not claim SCSI disks, the SCSI disk would disappear (if such frontends really exist).
#3 do not provide SCSI if guest has PV driversI think #3 was has been done in practice, but obviously not enforced by the toolstack -- i.e., "Doctor, it hurts when I do this <makes motion>." "Then don't do that."
The problem with enforcing #3 is that there's no real way for the toolstack to know if the guest will have PV drivers before booting.
Quoted 8 lines
There's also #4: Do not provide a PV backend for SCSI disks. Not sure that's actually possible, as libxl has historically used the PV backend as the canonical place for listing disks associated with a domain (although that may have changed since XSA-whatever which resulted in libxl having its own local copy of the backend information).
Paul, do you have any thoughts?
I agree that #3 is not practical.
I would have thought option #1 is the most logical and desirable in the long run, but #2 could perhaps be used (by means of a configuration option to qemu) in the meantime. In practice I doubt there is anything out there that would use emulated SCSI as well as PV storage.
Paul
Quoted 1 line
-George
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Am 7. September 2016 12:38:09 MESZ, schrieb Paul Durrant <[email protected]>:
Quoted 4 lines
I would have thought option #1 is the most logical and desirable in the long run, but #2 could perhaps be used (by means of a configuration option to qemu) in the meantime. In practice I doubt there is anything out there that would use emulated SCSI as well as PV storage.
The qemu changes I sent earlier this month implement #2. And my testing shows there will be no loss.
Emulated SCSI has the benefit that loading kernel+initrd is faster.
Olaf
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines
-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: 07 September 2016 11:49
To: Paul Durrant <[email protected]>; George Dunlap <[email protected]>
Cc: [email protected]
Subject: RE: [Xen-devel] missing unplug of SCSI devices in HVM guestAm 7. September 2016 12:38:09 MESZ, schrieb Paul Durrant <[email protected]>:
Quoted 8 lines
Quoted 4 lines
I would have thought option #1 is the most logical and desirable in the long run, but #2 could perhaps be used (by means of a configuration option to qemu) in the meantime. In practice I doubt there is anything out there that would use emulated SCSI as well as PV storage.
The qemu changes I sent earlier this month implement #2. And my testing shows there will be no loss.
Ok. I guess #1 could be implemented later if it proves necessary in some circumstances.
Paul
Quoted 2 lines
Emulated SCSI has the benefit that loading kernel+initrd is faster.
With seabios I'd certainly believe it. The IDE emulation is PIO only (unless you hack the config ... which I tend to do).
Paul
Quoted 1 line
Olaf
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel