Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 607263 - Remove -M pc-0.12 support
Remove -M pc-0.12 support
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Jes Sorensen
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-23 12:29 EDT by Daniel Berrange
Modified: 2013-01-09 17:46 EST (History)
8 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.94.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:25:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2010-06-23 12:29:59 EDT
Description of problem:

When attempting to configure a virtio serial PCI device, along with the 'pc-0.12' machine type I get a fatal error at startup:

# /usr/libexec/qemu-kvm  -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -M pc-0.12
qemu-kvm: -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7: Property 'virtio-serial-pci.max_nr_ports' not found


I'm not setting any max_nr_ports parameter myself, and the parameter should be called max_ports

# /usr/libexec/qemu-kvm -device 'virtio-serial-pci,?'
virtio-serial-pci.vectors=uint32
virtio-serial-pci.class=hex32
virtio-serial-pci.indirect_desc=on/off
virtio-serial-pci.max_ports=uint32


The problem appears to be in the machine type definitions


    .compat_props = (GlobalProperty[]) {
        {
            .driver   = "virtio-serial-pci",
            .property = "max_nr_ports",
            .value    = stringify(1),
        },{

That should be max_ports i presume.




Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.78.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. /usr/libexec/qemu-kvm  -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -M pc-0.12
2.
3.
  
Actual results:
qemu-kvm: -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7: Property 'virtio-serial-pci.max_nr_ports' not found

Expected results:
Boots

Additional info:
Comment 1 RHEL Product and Program Management 2010-06-23 12:32:54 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Dor Laor 2010-06-24 04:45:04 EDT
Have you tested it also with -M 6.0 ?
Comment 7 Shirley Zhou 2010-07-06 02:13:27 EDT
Verify this bug with 
qemu-kvm-0.12.1.2-2.90.el6.x86_64
kernel-2.6.32-37.el6.x86_64

Guest:RHEL6.0-64
CLI:[root@dhcp-91-121 ~]# /usr/libexec/qemu-kvm -M pc-0.12 -m 4G -smp 2 -cpu qemu64,+x2apic -usbdevice tablet -drive file=/home/RHEL-Server-6.0-64.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:00:14:3F:20:1A,bus=pci.0 -uuid 1234127c-e6e3-4e67-95da-8dd0a8891cc4 -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -name RHEL6-64 -device virtio-balloon-pci,bus=pci.0 -qmp tcp:0:4444,server,nowait -vnc :1 -boot c -device virtio-serial-pci,id=virtio-serial0  -chardev pty,id=channel0 -device virtserialport,chardev=channel0,bus=virtio-serial0.0
char device redirected to /dev/pts/2


After run above command, prompt info as following, and qemu could not lanuch.

qemu-kvm: -device virtserialport,chardev=channel0,bus=virtio-serial0.0: virtio-serial-bus: Out-of-range port id specified, max. allowed: 0
qemu-kvm: -device virtserialport,chardev=channel0,bus=virtio-serial0.0: Device 'virtserialport' could not be initialized

And the same command can be run after change machine type from pc-0.12 to rhel6.0.0

[root@dhcp-91-121 ~]# /usr/libexec/qemu-kvm -M rhel6.0.0 -m 4G -smp 2 -cpu qemu64,+x2apic -usbdevice tablet -drive file=/home/RHEL-Server-6.0-64.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:00:14:3F:20:1A,bus=pci.0 -uuid 1234127c-e6e3-4e67-95da-8dd0a8891cc4 -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -name RHEL6-64 -device virtio-balloon-pci,bus=pci.0 -qmp tcp:0:4444,server,nowait -vnc :1 -boot c -device virtio-serial-pci,id=virtio-serial0  -chardev pty,id=channel0 -device virtserialport,chardev=channel0,bus=virtio-serial0.0
char device redirected to /dev/pts/2
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) 

And after I add ",max_ports=16,vectors=4" to command, the qemu can be lanuch as following:

[root@dhcp-91-121 ~]# /usr/libexec/qemu-kvm -M pc-0.12 -m 4G -smp 2 -cpu qemu64,+x2apic -usbdevice tablet -drive file=/home/RHEL-Server-6.0-64.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:00:14:3F:20:1A,bus=pci.0 -uuid 1234127c-e6e3-4e67-95da-8dd0a8891cc4 -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -name RHEL6-64 -device virtio-balloon-pci,bus=pci.0 -qmp tcp:0:4444,server,nowait -vnc :1 -boot c -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=4  -chardev pty,id=channel0 -device virtserialport,chardev=channel0,bus=virtio-serial0.0
char device redirected to /dev/pts/2
QEMU 0.12.1 monitor - type 'help' for more information
(qemu)

So I think this bug still exist.
Comment 10 Jes Sorensen 2010-07-08 16:12:47 EDT
Did some more digging around on this one, and I figured out what is happening.

The problem with the test case above is that in legacy mode, eg.
pc-0.12, virtio-serial only offers one virtual channel, and at the
same time qemu hard reserves channel 0 for console due to legacy kernel
compat mode. In order for it to work, you have to hard code it to use
id 0, by specifying ,nr=0 as an argument.

It's worth noting that you can reproduce this problem with -M rhel6.0.0
by specifying max_ports=1 and not specifying nr=0. Ie. like this:
-device virtserialport,chardev=channel0,bus=virtio-serial0.0,nr=0

In other words the code is behaving as designed, though I will check with
Amit whether we should make it smarter in upstream.

For now I have posted a patch to disable legacy machine types as was
requested.

Jes
Comment 12 Amit Shah 2010-07-12 05:00:14 EDT
pc-0.12 shouldn't support any virtserialport devices.

You can try the above cmd line with -device virtconsole and you won't see this happen.
Comment 16 lihuang 2010-07-28 05:21:23 EDT
Verified on qemu-kvm-0.12.1.2-2.96.el6
pc-0.12 is removed from -M type 
^C[root@t70 ~]# /usr/libexec/qemu-kvm -M ?
Supported machines are:
pc         RHEL 6.0.0 PC (alias of rhel6.0.0)
rhel6.0.0  RHEL 6.0.0 PC (default)
rhel5.5.0  RHEL 5.5.0 PC
rhel5.4.4  RHEL 5.4.4 PC
rhel5.4.0  RHEL 5.4.0 PC
Comment 17 releng-rhel@redhat.com 2010-11-10 16:25:41 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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