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 893334 - fail to detect AHCI interface data disk in guest using the unit=1
Summary: fail to detect AHCI interface data disk in guest using the unit=1
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-09 06:52 UTC by Suqin Huang
Modified: 2013-10-14 05:45 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-14 05:45:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Suqin Huang 2013-01-09 06:52:08 UTC
Description of problem:
boot cdrom with 
-device ide-cd,bus=ide.1,unit=1,.... the cdrom can not be recognized, but it works
if unit=0

Version-Release number of selected component (if applicable):

qemu-kvm-1.3.0-3.el7.x86_64
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. cmd
/usr/libexec/qemu-kvm -nodefaults \
-device ich9-usb-uhci1,id=usb1,bus=pcie.0,addr=0x4 \
-drive file='/home/autotest-devel/client/tests/kvm/images/RHEL-Server-6.4-64-virtio.qcow2',if=none,id=drive-ide0-0-0,media=disk,cache=none,format=qcow2,aio=native \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
-device virtio-net-pci,netdev=idUMvixC,mac=9a:87:88:89:8a:8b,bus=pcie.0,addr=0x3,id='idMztaHV' -netdev tap,id=idUMvixC,vhost=on,script=/home/autotest-devel/client/virt/scripts/qemu-ifup-switch \
-m 2048 -smp 2,cores=1,threads=1,sockets=2 -cpu 'Opteron_G3' \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :0 -vga cirrus -rtc base=utc,clock=host,driftfix=slew  -boot order=cdn,once=c,menu=off   -no-kvm-pit-reinjection -enable-kvm -M q35 -monitor stdio  \
-chardev socket,id=serial_id,path=/tmp/serial-shuang,server,nowait \
-device isa-serial,chardev=serial_id \
-drive file='/home/autotest-devel/client/tests/kvm/isos/linux/RHEL6.4-Server-i386.iso',if=none,id=drive-ide0-0-1,media=cdrom,snapshot=off,format=raw -device ide-cd,bus=ide.1,unit=1,drive=drive-ide0-0-1,id=ide0-0-1
2.
3.
  
Actual results:
no /dev/cdrom or /dev/sr0 in guest

Expected results:


Additional info:
1). it works if change unit=1 to unit=0
2). info block
(qemu) info block
drive-ide0-0-0: removable=0 io-status=ok file=/home/autotest-devel/client/tests/kvm/images/RHEL-Server-6.4-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-ide0-0-1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/autotest-devel/client/tests/kvm/isos/linux/RHEL6.4-Server-i386.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0

Comment 2 Hai Huang 2013-01-10 16:18:28 UTC
Gerd provided the following note in BZ893302:

q35 in qemu 1.3 needs the dsdt passed in to work correctly:
"-acpitable file=/path/to/q35-acpi-dsdt.aml"

Comment 3 Suqin Huang 2013-01-11 05:49:46 UTC
still doesn't work while add "-acpitable file=/path/to/q35-acpi-dsdt.aml"

Comment 4 Sibiao Luo 2013-03-07 03:41:26 UTC
Hit it with '-M pc-1.3', boot guest with AHCI interface data disk using the unit=1, the disk fail to be detected in guest, but it can detect it successfully using unit=0.

qemu-kvm command line:
e.g:...-device ahci,id=ahci0,addr=0x5 -drive file=my-data-disk.raw,if=none,id=drive-data-disk,format=raw,werror=stop,rerror=stop,cache=none,aio=native -device ide-hd,bus=ahci0.0,unit=1,drive=drive-data-disk,id=data-disk

host info:
kernel-3.8.0-0.37.el7.x86_64
qemu-kvm-1.3.0-7.el7.x86_64
guest info:
kernel-3.8.0-0.37.el7.x86_64

Best Regards.
sluo

Comment 5 Lukáš Doktor 2013-08-22 18:15:30 UTC
Hi, I had this problem too. I figured out that the early versions of AHCI supported two units per bus, but as the original AHCI supports only one disk per line this feature was disabled. Newer versions of qemu raise exception, when you try to assign unit > 0 (you can find a commit in upstream git which describes it).

But someone with deeper knowledge please verify that I'm not mistaken.

Comment 6 Gerd Hoffmann 2013-10-14 05:45:19 UTC
(In reply to Lukas Doktor from comment #5)
> Hi, I had this problem too. I figured out that the early versions of AHCI
> supported two units per bus,

It never did.  IDE has the concept of master/slave, and unit=$nr can be used to select that.  AHCI reuses IDE code, but you can attach only one device per bus (each ahci port is modeled as ide bus in qemu).

> Newer versions of qemu raise exception,
> when you try to assign unit > 0 (you can find a commit in upstream git which
> describes it).

Yep.  This check was missing in older versions, so you could attach a slave device to ahci, but it didn't gave you a *working* device (as this bug report proves ;)

Bottom line: unit != 0 is not valid for AHCI -> NOTABUG


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