• D
    virtio-pci: change virtio balloon PCI class code · 2ba1d381
    David Gibson 提交于
    Currently the virtio balloon device, when using the virtio-pci interface
    advertises itself with PCI class code MEMORY_RAM.  This is wrong; the
    balloon is vaguely related to memory, but is nothing like a PCI memory
    device in the meaning of the class code, and this code is not required
    or suggested by the virtio PCI specification.
    
    Worse, this patch causes problems on the pseries machine, because the
    firmware, seeing this class code, advertises the device as memory in the
    device tree, and then a guest kernel bug causes it to see this "memory"
    before the real system memory, leading to a crash in early boot.
    
    This patch fixes the problem by removing the bogus PCI class code on the
    balloon device.  The backwards compatibility PC machines get new compat
    properties so that they don't change.
    
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
    2ba1d381
pc_piix.c 17.7 KB