On 07/29/2015 06:25 PM, Andrea Bolognani wrote:
On Fri, 2015-07-24 at 15:29 -0400, Kothapally Madhu Pavan wrote:
> This is an attempt to fix:
> Libvirt BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1180486
>
> Libvirt currently assumes ISA_based floppy disks to be available
> across all
> architectures and machine types. However, PowerPC Book 3S compatible
> ('ie pseries)
> virtual machines do not support Floppy disks.
>
> This patch series prevents libvirt from launching ppc64[le] -based
> 'pseries'
> VMs with floppy devices.
Hi,
sorry for not replying right away.
I started looking into that bug a while ago but I got sidetracked
shortly afterwards, so I don't have much to show for it. I'd like
to share my opinion on the matter anyway.
I believe you're basically following the right approach, eg. avoid
setting floppy-related capabilities and erroring out afterwards if
attempts are made to use devices that require such capabilites.
However, I think the implementation should be a little more
generic: ideally, the code would contain no references to the
ppc64 architecture and whether or not floppy disks are be allowed
would be determined by probing the QEMU binary.
Writing the code this way would allow us to handle automatically
other architectures where floppy disks do not make sense[1] and
situations where floppy support is not available[2].
If that turns out not to be possible or practical, at the very
least the check should be performed in one single spot, and not
replicated a dozen times thorough the library.So,
As, present method of
capabilities parsing uses "qemu -h", and the list
received in this case is arch agnostic. So, we cannot do arch-specific
caps parsing unless qemu undergoes a rewrite. I will be providing a new
patch set with as minimal changes as possible.
Thanks,
Madhu Pavan.