Re: [libvirt] [PATCH 0/2] Disable floppy disk for PowerPC VMs

2015-07-30 Thread madhu pavan



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.

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


Re: [libvirt] [PATCH 0/2] Disable floppy disk for PowerPC VMs

2015-07-29 Thread Andrea Bolognani
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.

Cheers.


[1] I expect ARM to be one such architecture
[2] Such as stripped down / hardened QEMU binaries
-- 
Andrea Bolognani
Software Engineer - Virtualization Team

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


[libvirt] [PATCH 0/2] Disable floppy disk for PowerPC VMs

2015-07-24 Thread Kothapally Madhu Pavan
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.

---

Kothapally Madhu Pavan (2):
  Caps: Disable floppy disk for PowerPC Vm
  Avoid starting a PowerPC VM with floppy disk


 src/conf/domain_conf.c   |   19 +
 src/qemu/qemu_capabilities.c |   15 ++---
 src/qemu/qemu_command.c  |   47 --
 3 files changed, 71 insertions(+), 10 deletions(-)

--

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