Skip to contentSkip to conversation

virtio balloon PCI class code

Qemu-devel David Gibson 3 participants 3 messages Mar 13, 2012 – Mar 14, 2012

lore
Share & tools
lore
#0 lore raw

Currently the virtio-pci driver advertises the virtio balloon device as having the PCI class code PCI_CLASS_MEMORY_RAM. Although the balloon device is vaguely related to RAM management, it doesn't operate anything like a PCI memory device in the sense of the class code (in fact it's all about taking RAM away from the guest, not obtaining it). Nor does this PCI class code appear to be suggested by the virtio PCI specification.

This recently caused problems on the pseries machine - the class code caused the firmware to mark the corresponding device tree node as a memory node, which cause the guest to get horribly confused attempting to discover memory early in boot. That was due to a guest kernel bug, but since the bug is widespread in existing deployed kernels, we don't really want to trigger it from qemu.

We can work around the problem in the guest firmware for now, but using PCI_CLASS_MEMORY_RAM for the balloon just seems wrong. Are there things out there already that rely on this, or should we just drop the class code?

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#1 lore raw
Quoted 15 lines · David Gibson

Currently the virtio-pci driver advertises the virtio balloon device as having the PCI class code PCI_CLASS_MEMORY_RAM. Although the balloon device is vaguely related to RAM management, it doesn't operate anything like a PCI memory device in the sense of the class code (in fact it's all about taking RAM away from the guest, not obtaining it). Nor does this PCI class code appear to be suggested by the virtio PCI specification.

This recently caused problems on the pseries machine - the class code caused the firmware to mark the corresponding device tree node as a memory node, which cause the guest to get horribly confused attempting to discover memory early in boot. That was due to a guest kernel bug, but since the bug is widespread in existing deployed kernels, we don't really want to trigger it from qemu.

Quoted 4 lines

We can work around the problem in the guest firmware for now, but using PCI_CLASS_MEMORY_RAM for the balloon just seems wrong. Are there things out there already that rely on this, or should we just drop the class code?

CC'ing Michael.

Alex

#2 lore raw
In reply to David Gibson
Quoted 15 lines · David Gibson

Currently the virtio-pci driver advertises the virtio balloon device as having the PCI class code PCI_CLASS_MEMORY_RAM. Although the balloon device is vaguely related to RAM management, it doesn't operate anything like a PCI memory device in the sense of the class code (in fact it's all about taking RAM away from the guest, not obtaining it). Nor does this PCI class code appear to be suggested by the virtio PCI specification.

This recently caused problems on the pseries machine - the class code caused the firmware to mark the corresponding device tree node as a memory node, which cause the guest to get horribly confused attempting to discover memory early in boot. That was due to a guest kernel bug, but since the bug is widespread in existing deployed kernels, we don't really want to trigger it from qemu.

Quoted 4 lines

We can work around the problem in the guest firmware for now, but using PCI_CLASS_MEMORY_RAM for the balloon just seems wrong. Are there things out there already that rely on this, or should we just drop the class code?

We can just drop it...

Cheers,
Rusty.

Signature · 1 line
  How could I marry someone with more hair than me?  http://baldalex.org