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 984406 - the locked value of HMP monitor are wrong when attach a cdrom media under Q35
Summary: the locked value of HMP monitor are wrong when attach a cdrom media under Q35
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Ademar Reis
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-15 07:40 UTC by Sibiao Luo
Modified: 2013-12-10 17:00 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-10 17:00:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2013-07-15 07:40:31 UTC
Description of problem:
the locked and tray-open value of HMP monitor are wrong when change the cdrom under Q35. Also tested with the pc-xxx machine type which has no such issue.

Version-Release number of selected component (if applicable):
host info:
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm-1.5.1-2.el7.x86_64
guest info:
3.10.0-0.rc7.64.el7.x86_64

How reproducible:
100%
Steps to Reproduce:
1.boot guest with a media cdrom under Q35.
e.g: # /usr/libexec/qemu-kvm -S -M q35 -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection...-drive file=/home/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso,if=none,id=drive-cd-disk1,media=cdrom,format=raw,cache=none -device ide-cd,drive=drive-cd-disk1,id=cd-disk1,bus=ide.0,unit=0
2.check the block info via HMP and QMP monitor.
(qemu) info block
{"execute": "query-block"}
3.change the cdrom.
{"execute":"eject","arguments":{"device":"drive-cd-disk1"}}
4.check the block info via HMP and QMP monitor again.
(qemu) info block
{"execute": "query-block"}

Actual results:
1.after step 2, the locked value of HMP monitor are wrong, it should be '1', but QMP monitor are right.
(qemu) info block
drive-system-disk: removable=0 io-status=ok file=/home/RHEL-7.0-20130628.0-Server-x86_64.qcow3 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-cd-disk1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso ro=1 drv=raw encrypted=0 
...
{"execute": "query-block"}
{"io-status": "ok", "device": "drive-cd-disk1", "locked": true, "removable": true, "inserted": {"iops_rd": 0, "iops_wr": 0, "ro": true, "backing_file_depth": 0, "drv": "raw", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/home/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}...

2.after step 3, change the cdrom correctly.(udev is locking the tray for the first time, BZ#920924)
{"execute":"eject","arguments":{"device":"drive-cd-disk1"}}
{"error": {"class": "GenericError", "desc": "Device 'drive-cd-disk1' is locked"}}

{"timestamp": {"seconds": 1373871994, "microseconds": 730059}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "drive-cd-disk1", "tray-open": true}}

{"execute":"eject","arguments":{"device":"drive-cd-disk1"}}
{"return": {}}

3.after step 4,
(qemu) info block
drive-system-disk: removable=0 io-status=ok file=/home/RHEL-7.0-20130628.0-Server-x86_64.qcow3 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-cd-disk1: removable=1 locked=0 tray-open=1 io-status=ok [not inserted]
{"execute": "query-block"}
{"io-status": "ok", "device": "drive-cd-disk1", "locked": false, "removable": true, "tray_open": true, "type": "unknown"}

Expected results:
after step 2, the locked status should be 1.
drive-cd-disk1: removable=1 *locked=1* tray-open=0 io-status=ok file=/home/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso ro=1 drv=raw encrypted=0

Additional info:

Comment 1 Sibiao Luo 2013-07-15 07:51:46 UTC
If use pc-XXX machine type, it have no such issue.
(qemu) info block
drive-system-disk: removable=0 io-status=ok file=/home/RHEL-7.0-20130628.0-Server-x86_64.qcow3 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-cd-disk1: removable=1 locked=1 tray-open=0 io-status=ok file=/home/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0

(qemu) eject -f drive-cd-disk1

(qemu) info block
drive-system-disk: removable=0 io-status=ok file=/home/RHEL-7.0-20130628.0-Server-x86_64.qcow3 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-cd-disk1: removable=1 locked=0 tray-open=1 io-status=ok [not inserted]

Best Regards,
sluo

Comment 2 Ademar Reis 2013-12-10 17:00:04 UTC
HMP will not be supported in RHEL7, closing bug.


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