qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] per-machine vs per-qemu-version compat_props macros (was Re


From: Eduardo Habkost
Subject: [Qemu-devel] per-machine vs per-qemu-version compat_props macros (was Re: acpi:ich9: add memory hotplug handling)
Date: Tue, 24 Jun 2014 13:44:31 -0300
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Jun 18, 2014 at 07:17:13PM +0300, Michael S. Tsirkin wrote:
[...]
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -286,7 +286,12 @@ int e820_get_num_entries(void);
>  bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
>  
>  #define PC_Q35_COMPAT_2_0 \
> -        PC_COMPAT_2_0
> +        PC_COMPAT_2_0, \
> +        {\
> +            .driver   = "ICH9 LPC",\
> +            .property = "memory-hotplug-support",\
> +            .value    = "off",\
> +        }

I have been wondering why exactly we need PC_Q35_COMPAT_* macros at all.

 * If another machine (e.g. pc-i40fx) doesn't instantiate ICH9-LPC, it
   won't be affected at all by a ICH9-LPC property on compat_props;
 * If another machine does instantiate ICH9-LPC, it would also need the
   same compat property.

So we could just add all the q35 compat properties to PC_COMPAT_* and
stop having to maintain different sets of compat_props for pc-i440fx and
pc-q35.

(I would go even further and say that no compat_props bit need to be
specific to a machine-type family, and they are simply tied to the code
included in a QEMU version. So every PC_COMPAT_* bit could go to a
common QEMU_COMPAT_<version> macro, that could be reusable by all
machine-types, and there's no need PC-specific compat macros.)

-- 
Eduardo



reply via email to

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