[libvirt] Re: [PATCH 10/12] Implement SCSI controller hotplug/unplug for QEMU
Wolfgang Mauerer
wolfgang.mauerer at siemens.com
Tue Dec 15 17:30:30 UTC 2009
Hi,
Daniel P. Berrange wrote:
> From: Wolfgang Mauerer <wolfgang.mauerer at siemens.com>
>
> This patch allows for explicit hotplug/unplug of SCSI controllers.
> Ordinarily this is not required, since QEMU/libvirt will attach
> a new SCSI controller whenever one is required. Allowing explicit
> hotplug of controllers though, enables the caller to specify a
> static PCI address, instead of auto-assigning the next available
> PCI slot. Or it will when we have static PCI addressing.
>
> This patch is derived from Wolfgang Mauerer's disk controller
> patch series.
>
> * src/qemu/qemu_driver.c: Support hotplug & unplug of SCSI
> controllers
> * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
> src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
> src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add
> new API for attaching PCI SCSI controllers
(...)
> +int qemuMonitorTextAttachPCIDiskController(qemuMonitorPtr mon,
> + const char *bus,
> + virDomainDevicePCIAddress *guestAddr)
> +{
> + char *cmd = NULL;
> + char *reply = NULL;
> + int tryOldSyntax = 0;
> + int ret = -1;
> +
> +try_command:
> + if (virAsprintf(&cmd, "pci_add %s storage if=%s",
> + (tryOldSyntax ? "0": "pci_addr=auto"), bus) < 0) {
> + virReportOOMError(NULL);
> + goto cleanup;
> + }
I just realised that qemu-kvm HEAD prohibits adding empty SCSI
controllers currently, they consider this to be a bug. I've asked
to revert the corresponding patch on qemu-devel, but if this does
not happen, we will need to devise some other mechanism.
Regards, Wolfgang
More information about the libvir-list
mailing list