qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Remove PCI class code from virtio balloon devic


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] Remove PCI class code from virtio balloon device
Date: Thu, 22 Mar 2012 10:01:46 +0000

On Thu, Mar 22, 2012 at 9:09 AM, David Gibson
<address@hidden> wrote:
> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
> index 3f99f9a..72a4250 100644
> --- a/hw/pc_piix.c
> +++ b/hw/pc_piix.c
> @@ -386,6 +386,10 @@ static QEMUMachine pc_machine_v1_0 = {
>             .driver   = "isa-fdc",
>             .property = "check_media_rate",
>             .value    = "off",
> +        }, {
> +            .driver   = "virtio-balloon-pci",
> +            .property = "class",
> +            .value    = stringify(PCI_CLASS_MEMORY_RAM),
>         },
>         { /* end of list */ }
>     },
> @@ -449,6 +453,10 @@ static QEMUMachine pc_machine_v0_14 = {

pc_machine_v0_15 should also use PCI_CLASS_MEMORY_RAM?  Did you skip
it on purpose?

> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> index a0fb7c1..1fd5768 100644
> --- a/hw/virtio-pci.c
> +++ b/hw/virtio-pci.c
> @@ -790,6 +790,10 @@ static int virtio_balloon_init_pci(PCIDevice *pci_dev)
>     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;
> +

Why is this hunk is needed?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]