Bug 1003756 - balloon device PCI class code should be 0x5 for older RHEL machine types
balloon device PCI class code should be 0x5 for older RHEL machine types
Status: CLOSED DUPLICATE of bug 983991
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Luiz Capitulino
Virtualization Bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-03 03:06 EDT by Qian Guo
Modified: 2013-09-10 04:33 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-06 08:10:37 EDT
Type: Bug
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 Qian Guo 2013-09-03 03:06:29 EDT
Description of problem:
Boot a RHEL guest in RHEL7 host w/ virtio balloon device, inside guest, the balloon device is named as:
#lspci
...
00:05.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon
..

Check this device when guest is booting in a rhel6.4GA host, the name is
# lspci
..
00:05.0 RAM memory: Red Hat, Inc Virtio memory balloon

Version-Release number of selected component (if applicable):
Host components:
# uname -r
3.10.0-15.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.5.3-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot guest w/ virtio-balloon device in RHEL7 host.
# /usr/libexec/qemu-kvm -cpu Penryn -enable-kvm -m 4096 -smp 4,sockets=1,cores=4,threads=1 -name rhel7base -drive file=/mnt/rhel7cp1.qcow2_v3,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -boot menu=on -monitor stdio -netdev tap,id=hostnet0,ifname=guest1,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on,queues=4 -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test,mq=on,vectors=9 -nodefaults -nodefconfig -spice disable-ticketing,port=5930,seamless-migration=on -vga qxl -global qxl-vga.vram_size=67108864 -device virtio-balloon-pci,id=balloon1 -qmp tcp:0:4446,server,nowait

2.Inside guest, check device via lspci
# lspci |grep balloon

3.

Actual results:
# lspci |grep balloon
00:05.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon

The name is not friendly


Expected results:
Change the "Unclassified device [00ff]" to be friendly.


Additional info:

Contrast with guest in RHEL7 host, that the result is:
00:05.0 RAM memory: Red Hat, Inc Virtio memory balloon
Comment 2 Qian Guo 2013-09-03 04:39:46 EDT
(In reply to Qian Guo from comment #0)

> 
> 
> Additional info:
> 
> Contrast with guest in RHEL7 host, that the result is:
Sorry, typo here, RHEL7 should be RHEL6.4GA
> 00:05.0 RAM memory: Red Hat, Inc Virtio memory balloon
Comment 3 Luiz Capitulino 2013-09-05 12:01:38 EDT
Until QEMU v1.0 the balloon device had the PCI class 0x5 (Memory Controller) assigned to it. However, it has been found that having this class was problematic in some platforms, because the system would try to operate the balloon device as a memory controller, which it isn't (see upstream commit 2ba1d381c2f5f5868fe071b45977c2ed459d78f0). So in QEMU v1.1 the balloon device class has been changed from 0x5 to 0xff which, according to the PCI spec, means "Device does not fit in any defined classes".

This is really the best we can do for the balloon device I guess, because it's a device that doesn't exist in real life and as such there's no PCI class that can describe it better than 0xff.

You see the friendlier string in RHEL6 because RHEL6's qemu-kvm has been forked before QEMU v1.1, but I'd say that it's RHEL6 that needs fixing instead!

Closing as CANTFIX.
Comment 4 Amit Shah 2013-09-05 14:44:08 EDT
(In reply to Luiz Capitulino from comment #3)
> Until QEMU v1.0 the balloon device had the PCI class 0x5 (Memory Controller)
> assigned to it. However, it has been found that having this class was
> problematic in some platforms, because the system would try to operate the
> balloon device as a memory controller, which it isn't (see upstream commit
> 2ba1d381c2f5f5868fe071b45977c2ed459d78f0). So in QEMU v1.1 the balloon
> device class has been changed from 0x5 to 0xff which, according to the PCI
> spec, means "Device does not fit in any defined classes".
> 
> This is really the best we can do for the balloon device I guess, because
> it's a device that doesn't exist in real life and as such there's no PCI
> class that can describe it better than 0xff.
> 
> You see the friendlier string in RHEL6 because RHEL6's qemu-kvm has been
> forked before QEMU v1.1, but I'd say that it's RHEL6 that needs fixing
> instead!

However, for migration compatibility, we may have to continue advertising the older PCI class for machines started with -M rhel6x and older (stable guest ABI).

We could use this bug to do that.
Comment 5 Luiz Capitulino 2013-09-05 15:07:39 EDT
Oh, good catch! That problem didn't occur to me. I'd prefer creating a new, clearer bz, but patching this one works too.
Comment 6 Luiz Capitulino 2013-09-06 08:10:37 EDT
It turns out that this is already fixed. The tracking bz is bug 983991, closing as duplicated.

*** This bug has been marked as a duplicate of bug 983991 ***
Comment 7 Markus Armbruster 2013-09-10 04:33:39 EDT
Fixed in upstream commit 2ba1d38 for the upstream machine types, and
RHEL-7 commit 69018e8 for the RHEL machine types.

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