Re: [libvirt] [PATCH v2 2/3] Avoid starting a PowerPC VM with floppy disk
On Mon, Aug 03, 2015 at 11:27:56PM +0530, madhu pavan wrote: > > > On 08/03/2015 06:23 PM, Ján Tomko wrote: > > On Thu, Jul 30, 2015 at 07:55:36AM -0400, Kothapally Madhu Pavan wrote: > >> PowerPC pseries based VMs do not support a floppy disk controller. > > Here the commit message mentions a controller, but the code only checks > > for the device, > > not for > > > > Should we forbid that one too? AFAIK we've auto-added it to the XML > > only if there was at least floppy. > We need not forbid fdc, as checking for floppy device will fulfill the > need. Yes, fdc is added only if there was at least one floppy device. > Okay, I've squashed the test together with 2/3 and pushed the series. Jan signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 2/3] Avoid starting a PowerPC VM with floppy disk
On 08/03/2015 06:23 PM, Ján Tomko wrote: On Thu, Jul 30, 2015 at 07:55:36AM -0400, Kothapally Madhu Pavan wrote: PowerPC pseries based VMs do not support a floppy disk controller. Here the commit message mentions a controller, but the code only checks for the device, not for Should we forbid that one too? AFAIK we've auto-added it to the XML only if there was at least floppy. We need not forbid fdc, as checking for floppy device will fulfill the need. Yes, fdc is added only if there was at least one floppy device. Either way, the series looks good to me. Jan This prohibits libvirt from creating qemu command with floppy device. Signed-off-by: Kothapally Madhu Pavan --- src/qemu/qemu_command.c |8 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 09f30c4..501c7df 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9767,6 +9767,14 @@ qemuBuildCommandLine(virConnectPtr conn, continue; } +/* PowerPC pseries based VMs do not support floppy device */ +if ((disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) && +ARCH_IS_PPC64(def->os.arch) && STRPREFIX(def->os.machine, "pseries")) { +virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("PowerPC pseries machines do not support floppy device")); +goto error; +} + switch (disk->device) { case VIR_DOMAIN_DISK_DEVICE_CDROM: bootindex = bootCD; -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Thanks, Madhu Pavan. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 2/3] Avoid starting a PowerPC VM with floppy disk
On Thu, Jul 30, 2015 at 07:55:36AM -0400, Kothapally Madhu Pavan wrote: > PowerPC pseries based VMs do not support a floppy disk controller. Here the commit message mentions a controller, but the code only checks for the device, not for Should we forbid that one too? AFAIK we've auto-added it to the XML only if there was at least floppy. Either way, the series looks good to me. Jan > This prohibits libvirt from creating qemu command with floppy device. > > Signed-off-by: Kothapally Madhu Pavan > --- > src/qemu/qemu_command.c |8 > 1 file changed, 8 insertions(+) > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c > index 09f30c4..501c7df 100644 > --- a/src/qemu/qemu_command.c > +++ b/src/qemu/qemu_command.c > @@ -9767,6 +9767,14 @@ qemuBuildCommandLine(virConnectPtr conn, > continue; > } > > +/* PowerPC pseries based VMs do not support floppy device */ > +if ((disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) && > +ARCH_IS_PPC64(def->os.arch) && STRPREFIX(def->os.machine, > "pseries")) { > +virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > + _("PowerPC pseries machines do not support > floppy device")); > +goto error; > +} > + > switch (disk->device) { > case VIR_DOMAIN_DISK_DEVICE_CDROM: > bootindex = bootCD; > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v2 2/3] Avoid starting a PowerPC VM with floppy disk
PowerPC pseries based VMs do not support a floppy disk controller. This prohibits libvirt from creating qemu command with floppy device. Signed-off-by: Kothapally Madhu Pavan --- src/qemu/qemu_command.c |8 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 09f30c4..501c7df 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9767,6 +9767,14 @@ qemuBuildCommandLine(virConnectPtr conn, continue; } +/* PowerPC pseries based VMs do not support floppy device */ +if ((disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) && +ARCH_IS_PPC64(def->os.arch) && STRPREFIX(def->os.machine, "pseries")) { +virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("PowerPC pseries machines do not support floppy device")); +goto error; +} + switch (disk->device) { case VIR_DOMAIN_DISK_DEVICE_CDROM: bootindex = bootCD; -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list