[libvirt] [PATCH 06/13] qemu: add exceptions for alias names of primary sata/ide controllers
Ján Tomko
jtomko at redhat.com
Mon May 11 07:00:16 UTC 2015
On Tue, May 05, 2015 at 02:03:11PM -0400, Laine Stump wrote:
> If a machine is Q35, the primary sata controller is hardcoded in qemu
> to have the id "ide" (with no index in the name). Likewise on
> 440fx-based machinetypes, the primary ide controller is called
> "ide". All other SATA controllers will have the standard name
> "sata%d", where %d is the index of the controller, and if any
> additional IDE controllers are ever supported, they will have the name
> "ide%d".
> ---
> src/qemu/qemu_command.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 340478c..89beeb3 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -1049,6 +1049,21 @@ qemuAssignDeviceControllerAlias(ATTRIBUTE_UNUSED virDomainDefPtr def,
The attribute is now used.
Jan
> else
> ret = virAsprintf(&controller->info.alias, "pci.%d", controller->idx);
> break;
> + case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
> + /* for any machine based on I440FX, the first (currently only)
> + * IDE controller is an integrated controller hardcoded with
> + * id "ide"
> + */
> + if (qemuDomainMachineIsI440FX(def) && controller->idx == 0)
> + ret = VIR_STRDUP(controller->info.alias, "ide");
> + break;
> + case VIR_DOMAIN_CONTROLLER_TYPE_SATA:
> + /* for any Q35 machine, the first SATA controller is the
> + * integrated one, and it too is hardcoded with id "ide"
> + */
> + if (qemuDomainMachineIsQ35(def) && controller->idx == 0)
> + ret = VIR_STRDUP(controller->info.alias, "ide");
> + break;
> default:
> break;
> }
> --
> 2.1.0
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150511/4cbfb088/attachment-0001.sig>
More information about the libvir-list
mailing list