Bug 1227282

Summary: tighten conditions for board-implied FDC in pc-q35-rhel7.2.0+
Product: Red Hat Enterprise Linux 7 Reporter: Laszlo Ersek <lersek>
Component: qemu-kvm-rhevAssignee: Laszlo Ersek <lersek>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: areis, armbru, huding, juzhang, virt-maint, xfu, xwei
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.3.0-11.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1227880 (view as bug list) Environment:
Last Closed: 2015-12-04 16:43:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1227278, 1227880    

Description Laszlo Ersek 2015-06-02 10:20:02 UTC
Rationale:
http://thread.gmane.org/gmane.comp.emulators.qemu.block/2054

Upstream commits:
1 fd53c87 i386/pc: pc_basic_device_init(): delegate FDC creation request
2 936a7c1 i386/pc: '-drive if=floppy' should imply a board-default FDC
3 6cd2234 i386/pc_q35: don't insist on board FDC if there's no default floppy
4 ea96bc6 i386: drop FDC in pc-q35-2.4+ if neither it nor floppy drives are
          wanted

Comment 1 Laszlo Ersek 2015-06-02 10:24:41 UTC
*** Bug 1227283 has been marked as a duplicate of this bug. ***

Comment 2 Laszlo Ersek 2015-06-03 12:41:09 UTC
Test steps: in each invocation below, issue the "info qtree" command at the QEMU monitor prompt, and check if the "isa-fdc" device is present in the response. The common part of the commands is simply

  /usr/libexec/qemu-kvm -monitor stdio

options                                        isa-fdc available
-------                                        -----------------
-M pc-i440fx-rhel7.2.0                         yes
-M pc-q35-rhel7.2.0                            no
-M pc-q35-rhel7.1.0                            yes
-M pc-q35-rhel7.2.0 -drive if=floppy,file=...  yes

Comment 5 Laszlo Ersek 2015-06-29 10:02:47 UTC
The following patches need to be backported on top:
http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg06677.html

Comment 6 Laszlo Ersek 2015-07-08 16:52:09 UTC
Upstream commit hashes:

1 7444ca4 hw/i386/pc: factor out pc_cmos_init_floppy()
2 b86f461 hw/i386/pc: reflect any FDC @ ioport 0x3f0 in the CMOS
3 220a884 hw/i386/pc: don't carry FDC from pc_basic_device_init() to
          pc_cmos_init()

Comment 8 Miroslav Rezanina 2015-07-17 08:57:40 UTC
Fix included in qemu-kvm-rhev-2.3.0-11.el7

Comment 10 Xiaoqing Wei 2015-07-23 08:23:31 UTC
/usr/libexec/qemu-kvm -monitor stdio -M pc-i440fx-rhel7.2.0

        bus: isa.0
          type ISA
          dev: isa-fdc, id ""                       -> Yes
            iobase = 1008 (0x3f0)
            irq = 6 (0x6)
            dma = 2 (0x2)
            driveA = "floppy0"
            driveB = ""
            check_media_rate = true
            isa irq 6
info block
ide1-cd0: [not inserted]
    Removable device: not locked, tray closed

floppy0: [not inserted]
    Removable device: not locked, tray closed

sd0: [not inserted]
    Removable device: not locked, tray closed

---------------------------------
/usr/libexec/qemu-kvm -monitor stdio -M pc-q35-rhel7.2.0

no fdc in 'info qtree'             ---------------------> no

(qemu) info block
ide1-cd0: [not inserted]
    Removable device: not locked, tray closed

sd0: [not inserted]
    Removable device: not locked, tray closed

---------------------------------
/usr/libexec/qemu-kvm -monitor stdio -M pc-q35-rhel7.1.0

        bus: isa.0
          type ISA
          dev: isa-fdc, id ""   -----------------------> yes
            iobase = 1008 (0x3f0)
            irq = 6 (0x6)
            dma = 2 (0x2)
            driveA = "floppy0"
            driveB = ""
            check_media_rate = true
            isa irq 6
(qemu) info block
ide1-cd0: [not inserted]
    Removable device: not locked, tray closed

floppy0: [not inserted]
    Removable device: not locked, tray closed

sd0: [not inserted]
    Removable device: not locked, tray closed

-----------------------------------

/usr/libexec/qemu-kvm -monitor stdio -M pc-q35-rhel7.2.0 -drive if=floppy,file=""
        bus: isa.0
          type ISA
          dev: isa-fdc, id "" ------------------> yes
            iobase = 1008 (0x3f0)
            irq = 6 (0x6)
            dma = 2 (0x2)
            driveA = "floppy0"
            driveB = ""
            check_media_rate = true
            isa irq 6
(qemu) info block
floppy0: [not inserted]
    Removable device: not locked, tray closed

ide1-cd0: [not inserted]
    Removable device: not locked, tray closed

sd0: [not inserted]
    Removable device: not locked, tray closed


result as expected, moving to VERIFIED.

qemu-kvm-rhev-2.3.0-12.el7.x86_64

Comment 12 errata-xmlrpc 2015-12-04 16:43:40 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/RHBA-2015-2546.html