[libvirt] Re: [PATCH 10/12] Implement SCSI controller hotplug/unplug for QEMU

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

 



Hi,

Daniel P. Berrange wrote:
> From: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxx>
> 
> 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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]