Bug 607263 - Remove -M pc-0.12 support
Summary: Remove -M pc-0.12 support
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jes Sorensen
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-23 16:29 UTC by Daniel Berrange
Modified: 2013-01-09 22:46 UTC (History)
8 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2010-11-10 21:25:41 UTC


Attachments (Terms of Use)

Description Daniel Berrange 2010-06-23 16:29:59 UTC
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 16:32:54 UTC
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 08:45:04 UTC
Have you tested it also with -M 6.0 ?

Comment 7 Shirley Zhou 2010-07-06 06:13:27 UTC
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 20:12:47 UTC
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 09:00:14 UTC
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 09:21:23 UTC
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 21:25:41 UTC
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.