Bug 727896

Summary: ACPI description of serial and parallel ports incorrect with -chardev/-device
Product: Red Hat Enterprise Linux 6 Reporter: RHEL Program Management <pm-rhel>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: armbru, bsarathy, bugproxy, dornelas, gcosta, juzhang, mjenner, mkenneth, mshao, msvoboda, pbonzini, pm-eus, qzhang, sforsber, tburke, virt-maint
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.160.el6_1.7 Doc Type: Bug Fix
Doc Text:
When KVM guests were launched with the "-device isa-serial" option instead of the "-serial" option, serial devices created were not visible by Windows guests. This issue arose because QEMU did not expose these devices in the guests' ACPI tables. With this fix, the guest's ACPI Differentiated System Description Table (DSDT) now properly senses the presence of serial devices and Windows guests can now see them properly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-25 08:02:53 UTC Type: ---
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: 707130    
Bug Blocks:    

Description RHEL Program Management 2011-08-03 14:54:30 UTC
This bug has been copied from bug #707130 and has been proposed
to be backported to 6.1 z-stream (EUS).

Comment 7 Qunfang Zhang 2011-08-12 01:47:40 UTC
Reproduced on qemu-kvm-0.12.1.2-2.160.el6_1.6 and verified pass on
qemu-kvm-0.12.1.2-2.160.el6_1.8.
Steps:
1. Boot guest A with
-chardev tty,id=serial0,path=/dev/ttyS0 -device isa-serial,chardev=serial0
Inside guest:
#udevadm info --query path --name /dev/ttyS0
#!! --attribute-walk | grep looking

2. Boot guest B with
-serial /dev/ttyS0
Inside guest:
#udevadm info --query path --name /dev/ttyS0
#!! --attribute-walk | grep looking

Results:
For old qemu-kvm version:
Guest A:
[root@virtlab-66-85-138 ~]# udevadm info --query path --name /dev/ttyS0
/devices/platform/serial8250/tty/ttyS0
[root@virtlab-66-85-138 ~]# !! --attribute-walk | grep looking
udevadm info --query path --name /dev/ttyS0 --attribute-walk | grep looking
  looking at device '/devices/platform/serial8250/tty/ttyS0':
  looking at parent device '/devices/platform/serial8250':
  looking at parent device '/devices/platform':

Guest B:
[root@virtlab-66-85-105 ~]#  udevadm info --query path --name /dev/ttyS0
/devices/pnp0/00:06/tty/ttyS0
[root@virtlab-66-85-105 ~]#  !! --attribute-walk | grep looking
  udevadm info --query path --name /dev/ttyS0 --attribute-walk | grep looking
  looking at device '/devices/pnp0/00:06/tty/ttyS0':
  looking at parent device '/devices/pnp0/00:06':
  looking at parent device '/devices/pnp0':

For fixed version:
Guest A and guest B are the same:
[root@virtlab-66-85-138 ~]# !! --attribute-walk | grep looking
udevadm info --query path --name /dev/ttyS0 --attribute-walk | grep looking
  looking at device '/devices/pnp0/00:06/tty/ttyS0':
  looking at parent device '/devices/pnp0/00:06':
  looking at parent device '/devices/pnp0':

So, this bug is fixed.

Comment 9 Miroslav Svoboda 2011-08-23 15:05:24 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When KVM guests were configured with the "-serial" option or the "-device isa-serial" option, serial devices created were displayed incorrectly by the system and were not visible by Windows guests. This issue arose because such devices were described incorrectly in the Advanced Configuration and Power Interface (ACPI) Differentiated System Description Table (DSDT). To fix this issue, the code has been modified to report such serial devices in the PCI IDE ISA Xcelerator 4 (PIIX4) configuration space. The system now shows these serial devices correctly and such devices are now registered by ACPI DSDT so Windows systems can now see these devices properly.

Comment 10 Paolo Bonzini 2011-08-23 16:13:12 UTC
Fixed and cleaned up the description; the bug only occurs with "-serial", not "-device isa-serial".  I omitted the expansion of ACPI, and avoided mentioning PIIX4 which is just an implementation detail of current versions of QEMU.  In general, if somebody really cares about how the fix works, they should know at least what ACPI is, even though perhaps not that the fix involves the DSDT.

Comment 11 Paolo Bonzini 2011-08-23 16:13:13 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-When KVM guests were configured with the "-serial" option or the "-device isa-serial" option, serial devices created were displayed incorrectly by the system and were not visible by Windows guests. This issue arose because such devices were described incorrectly in the Advanced Configuration and Power Interface (ACPI) Differentiated System Description Table (DSDT). To fix this issue, the code has been modified to report such serial devices in the PCI IDE ISA Xcelerator 4 (PIIX4) configuration space. The system now shows these serial devices correctly and such devices are now registered by ACPI DSDT so Windows systems can now see these devices properly.+When KVM guests were launched with the "-device isa-serial" option instead of the "-serial" option (as libvirt does in Red Hat Enterprise Linux version 6), serial devices created were not visible by Windows guests. This issue arose because QEMU did not expose these devices in the guest's ACPI tables.  With the fix, the ACPI Differentiated System Description Table (DSDT) will properly sense the presence of serial devices and Windows guests will see them properly.

Comment 12 Miroslav Svoboda 2011-08-23 17:33:51 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-When KVM guests were launched with the "-device isa-serial" option instead of the "-serial" option (as libvirt does in Red Hat Enterprise Linux version 6), serial devices created were not visible by Windows guests. This issue arose because QEMU did not expose these devices in the guest's ACPI tables.  With the fix, the ACPI Differentiated System Description Table (DSDT) will properly sense the presence of serial devices and Windows guests will see them properly.+When KVM guests were launched with the "-device isa-serial" option instead of the "-serial" option, serial devices created were not visible by Windows guests. This issue arose because QEMU did not expose these devices in guests' ACPI tables.  With this fix, the guest's ACPI Differentiated System Description Table (DSDT) now properly senses the presence of serial devices and Windows guests can now see them properly.

Comment 13 Miroslav Svoboda 2011-08-23 17:39:50 UTC
I've done several style corrections and reflected the description to the related advisory.

Comment 14 Miroslav Svoboda 2011-08-24 15:34:30 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-When KVM guests were launched with the "-device isa-serial" option instead of the "-serial" option, serial devices created were not visible by Windows guests. This issue arose because QEMU did not expose these devices in guests' ACPI tables.  With this fix, the guest's ACPI Differentiated System Description Table (DSDT) now properly senses the presence of serial devices and Windows guests can now see them properly.+When KVM guests were launched with the "-device isa-serial" option instead of the "-serial" option, serial devices created were not visible by Windows guests. This issue arose because QEMU did not expose these devices in the guests' ACPI tables.  With this fix, the guest's ACPI Differentiated System Description Table (DSDT) now properly senses the presence of serial devices and Windows guests can now see them properly.

Comment 15 errata-xmlrpc 2011-08-25 08:02:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1211.html