RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1180486 - [Power KVM] Floppy disk couldn't be detected on PPC64 guest
Summary: [Power KVM] Floppy disk couldn't be detected on PPC64 guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: ppc64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrea Bolognani
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-09 09:59 UTC by Gu Nini
Modified: 2016-11-03 18:11 UTC (History)
19 users (show)

Fixed In Version: libvirt-1.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:11:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 121452 0 None None None 2019-03-22 08:05:45 UTC
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Gu Nini 2015-01-09 09:59:03 UTC
Description of problem:
Boot a guest with floppy disk in virsh, after the disk boot up, couldn't find any related device.

Version-Release number of selected component (if applicable):
Host kernel: 3.10.0-217.el7.ppc64
Guest kernel: 3.10.0-217.el7.ppc64/3.10.0-217.ael7a.ppc64le
qemu-kvm-rhev:
qemu-kvm-common-rhev-2.1.2-17.el7.ppc64
qemu-kvm-rhev-debuginfo-2.1.2-17.el7.ppc64
qemu-kvm-rhev-2.1.2-17.el7.ppc64
qemu-kvm-tools-rhev-2.1.2-17.el7.ppc64


How reproducible:
100%

Steps to Reproduce:
1.Boot up a guest in virsh with a floppy disk:

    <disk type='file' device='floppy'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/media/ngu-nfs/fd-disk'>
        <seclabel model='selinux' labelskip='yes'/>
      </source>
      <backingStore/>
      <target dev='fda' bus='fdc'/>
      <alias name='fdc0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

2.Wait the guest boots up, try to find the floppy disk with cmd 'll /dev/fd*' or 'll /dev/fb*"

Actual results:
No floppy disk could be found

Expected results:
There is a floppy disk

Additional info:
None

Comment 2 Karen Noel 2015-01-09 12:04:39 UTC
Can you see floppy in ppc64 (BE) guest? What about RHEL 7.0 ppc64 (BE) guest?

Is floppy supported on PowerKVM? If the host is IBM's PowerKVM, can the same RHEL guests see the floppy?

Comment 3 David Gibson 2015-01-12 02:12:38 UTC
The floppy disk controller, as a legacy ISA device, is not supported on ppc64.

So, this isn't a bug in qemu.  I'm not sure if it should be considered a bug in libvirt that it doesn't provide an earlier and more useful error message.

Jirka, do you have an opinion?

Comment 4 Jiri Denemark 2015-01-12 09:23:01 UTC
Yeah, we should definitely fail to start the domain. If there is a way to check whether fdc is supported by QEMU, we should make sure ppc64 version of QEMU does not advertise the support and libvirt should start probing for it. If this can't be done, it shouldn't be hard to hack around it in libvirt. BTW, does 32b PPC support floppies?

Comment 5 David Gibson 2015-01-13 00:58:35 UTC
Ok,. I'm moving this bug over to libvirt.

It should be possible to check for floppy support by looking for the "isa-fdc" device in "qemu -device ?" output.  I've verified this doesn't appear on the ppc64 version of qemu-kvm.

"does 32b PPC support floppies?" isn't really a meaningful question - it depends on the emulated platform, not on whether the cpu is 32 or 64 bit.  Technically any platform with PCI could have an ISA bridge, and an FDC connected to that.  So the ppc64 "pseries" platform *could* have an FDC, but it's unlikely in real hardware, and we've chosen not to support it in emulation.  There's a lot more variety in 32-bit platforms.  The 32-bit "PReP" platform would usually have the legacy ISA suite including the FDC, but the embedded 32-bit platforms would be even less likely to have one than pseries.  The 32-bit Mac platforms could have floppy too, I think, but I think it's an Apple specific controller instead of the normal ISA one.

Comment 6 Gu Nini 2015-02-06 03:29:53 UTC
The bug also exists on power system, the software versions are as follows:

Host kernel: 3.10.53-2020.1.pkvm2_1_1.49.ppc64
Qemu kvm:
qemu-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-debuginfo-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-common-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-kvm-tools-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-img-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-kvm-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-system-x86-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-system-ppc-2.0.0-2.1.pkvm2_1_1.20.40.ppc64

Comment 7 David Gibson 2015-02-06 04:46:01 UTC
That's expected, but thanks for confirming.  I'll request this bug be mirrored to IBM.

Comment 8 Frank Novak 2015-02-06 13:03:31 UTC
So is the bug and solution we're looking for a better / earlier error by libvirt? Because as David points out, floppy is not supported on Power systems...

Comment 9 IBM Bug Proxy 2015-02-06 13:20:27 UTC
------- Comment From fnovak.com 2015-02-06 13:17 EDT-------
reverse mirror of RHBZ 1180486 - [Power KVM] Floppy disk couldn't be detected on PPC64 guest

Comment 10 IBM Bug Proxy 2015-02-06 13:30:49 UTC
------- Comment From fnovak.com 2015-02-06 13:19 EDT-------

Comment 11 David Gibson 2015-02-09 00:05:49 UTC
Frank,

Yes, we're looking for libvirt to detect the case of ppc and not offer the FDC as an option.

Comment 12 IBM Bug Proxy 2015-02-17 03:43:57 UTC
------- Comment From saxena.prerna.com 2015-02-17 03:36 EDT-------
Posted a patch to libvirt mailing list : https://www.redhat.com/archives/libvir-list/2015-February/msg00487.html.
This is pending community feedback.

Comment 13 David Gibson 2015-02-18 01:43:25 UTC
Prerna, that patch doesn't look like the right approach.

Surely it would be better to check for the availability of the isa-fdc device, rather than explicitly checking for the pseries machine type.

Comment 14 IBM Bug Proxy 2015-02-18 03:50:19 UTC
------- Comment From saxena.prerna.com 2015-02-18 03:44 EDT-------
(In reply to comment #8)
> Prerna, that patch doesn't look like the right approach.
>
> Surely it would be better to check for the availability of the isa-fdc
> device, rather than explicitly checking for the pseries machine type.

Hi David,
Qemu doesnt seem to advertise supported devices in an arch-specific manner :

I used the following command to verify if ISA -fdc is supported on PowerKVM 2.1.1 SP1 system :
[root@PowerKVM] # qemu-system-ppc64 -M pseries -device ?

And I see isa-fdc listed therein :
.....
name "ich9-ahci", bus PCI, alias "ahci"
name "ide-cd", bus IDE, desc "virtual IDE CD-ROM"
name "ide-drive", bus IDE, desc "virtual IDE disk or CD-ROM (legacy)"
name "ide-hd", bus IDE, desc "virtual IDE disk"
name "isa-fdc", bus ISA
name "isa-ide", bus ISA
name "lsi53c810", bus PCI
name "lsi53c895a", bus PCI, alias "lsi"
name "megasas", bus PCI, desc "LSI MegaRAID SAS 1078"
name "nvme", bus PCI, desc "Non-Volatile Memory Express"
....[snip]

This listing is certainly odd, and cannot be relied upon. This is why I have had to patch libvirt per https://bugzilla.redhat.com/show_bug.cgi?id=1180486#c4

Comment 15 David Gibson 2015-02-18 05:34:38 UTC
Prerna,

Ok, I think that's a problem better fixed in the powerkvm version of qemu.  In the RHEL version we've already removed the isa-fdc device.

Comment 16 Ján Tomko 2015-02-18 09:38:28 UTC
Libvirt uses -M none when probing for the available devices ("qom-list-types" on the QMP monitor). Probing for all machine types would require a major rewrite of the code.

So if at least one machine type provided by the qemu binary supports isa-fdc, it will be detected. Filtering it out after that, as was proposed by Michal for another capability could be a nicer solution:
https://www.redhat.com/archives/libvir-list/2015-February/msg00410.html

Comment 17 IBM Bug Proxy 2015-02-18 11:20:26 UTC
------- Comment From saxena.prerna.com 2015-02-18 11:14 EDT-------
(In reply to comment #11)
> Libvirt uses -M none when probing for the available devices
> ("qom-list-types" on the QMP monitor). Probing for all machine types would
> require a major rewrite of the code.
>
> So if at least one machine type provided by the qemu binary supports
> isa-fdc, it will be detected. Filtering it out after that, as was proposed
> by Michal for another capability could be a nicer solution:
> https://www.redhat.com/archives/libvir-list/2015-February/msg00410.html

Thanks for the tip, Jan.
I will rework my patch in line with this patchset and repost it.

Comment 19 IBM Bug Proxy 2015-06-17 14:10:22 UTC
------- Comment From seg.com 2015-06-17 14:00 EDT-------
In the absence of additional justification for customer impact, we will not be working this in the 2.1x maintenance stream. We will consider it for the 3.1.1 release.

Comment 20 Ján Tomko 2015-08-04 10:47:12 UTC
Pushed upstream as:
commit d9557572ae7a67f4af0b064e5923568cff63966c
Author:     Kothapally Madhu Pavan <kmp.ibm.com>
AuthorDate: 2015-07-30 07:55:36 -0400
Commit:     Ján Tomko <jtomko>
CommitDate: 2015-08-04 10:17:07 +0200

    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 <kmp.ibm.com>
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1180486
    
    Signed-off-by: Ján Tomko <jtomko>

commit 020a1783183d2993506e4c09aef0b435595ba9ed
Author:     Kothapally Madhu Pavan <kmp.ibm.com>
AuthorDate: 2015-07-30 07:54:26 -0400
Commit:     Ján Tomko <jtomko>
CommitDate: 2015-08-04 10:16:20 +0200

    Caps: Disable floppy disk for PowerPC VM
    
    PowerPC pseries based VMs do not support a floppy disk controller.
    This prohibits libvirt from adding floppy disk for a PowerPC pseries VM.
    
    Signed-off-by: Kothapally Madhu Pavan <kmp.ibm.com>

git describe: v1.2.18-23-gd955757

Comment 22 Andrea Bolognani 2016-08-04 10:18:01 UTC
The fix has made it downstream with the (not so)
recent rebases. Moving the bug to MODIFIED.

Comment 24 Dan Zheng 2016-09-12 08:02:10 UTC
Test packages:

qemu-kvm-rhev-2.6.0-24.el7.ppc64le
libvirt-2.0.0-8.el7.ppc64le
kernel-3.10.0-500.el7.ppc64le


# virsh dumpxml avocado-vt-vm1 | grep disk -a3 -A3
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/usr/share/avocado/data/avocado-vt/images/jeos-23-64.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='floppy'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/nfs/dzheng.test.raw'/>
      <target dev='fda' bus='fdc'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
...

# virsh start avocado-vt-vm1
error: Failed to start domain avocado-vt-vm1
error: unsupported configuration: PowerPC pseries machines do not support floppy device

Comment 25 Dan Zheng 2016-09-12 08:08:54 UTC
Check the libvirtd.log and can find 
2016-09-12 07:58:14.855+0000: 12994: error : qemuBuildDiskDriveCommandLine:2126 : unsupported configuration: PowerPC pseries machines do not support floppy device


So mark it verified.

Comment 27 errata-xmlrpc 2016-11-03 18:11:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html


Note You need to log in before you can comment on or make changes to this bug.