#include "pc.h"
#include "apic.h"
#include "pci.h"
+#include "pci_ids.h"
#include "net.h"
#include "boards.h"
#include "ide.h"
.driver = "isa-fdc",\
.property = "check_media_rate",\
.value = "off",\
+ }, {\
+ .driver = "virtio-balloon-pci",\
+ .property = "class",\
+ .value = stringify(PCI_CLASS_MEMORY_RAM),\
}
static QEMUMachine pc_machine_v1_0 = {
VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
VirtIODevice *vdev;
+ if (proxy->class_code != PCI_CLASS_OTHERS &&
+ proxy->class_code != PCI_CLASS_MEMORY_RAM) { /* qemu < 1.1 */
+ proxy->class_code = PCI_CLASS_OTHERS;
+ }
+
vdev = virtio_balloon_init(&pci_dev->qdev);
if (!vdev) {
return -1;
static Property virtio_balloon_properties[] = {
DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
+ DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
DEFINE_PROP_END_OF_LIST(),
};
k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
k->device_id = PCI_DEVICE_ID_VIRTIO_BALLOON;
k->revision = VIRTIO_PCI_ABI_VERSION;
- k->class_id = PCI_CLASS_MEMORY_RAM;
+ k->class_id = PCI_CLASS_OTHERS;
dc->reset = virtio_pci_reset;
dc->props = virtio_balloon_properties;
}