qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v17 7/9] add MachineClass->default_props for set


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH v17 7/9] add MachineClass->default_props for setting default device properties
Date: Tue, 26 Jan 2016 11:28:01 +0100

On Sat, 23 Jan 2016 12:59:56 -0200
Eduardo Habkost <address@hidden> wrote:

> On Tue, Jan 19, 2016 at 02:06:27PM +0100, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> >  include/hw/boards.h | 1 +
> >  vl.c                | 4 ++++
> >  2 files changed, 5 insertions(+)
> > 
> > diff --git a/include/hw/boards.h b/include/hw/boards.h
> > index 0f30959..d495611 100644
> > --- a/include/hw/boards.h
> > +++ b/include/hw/boards.h
> > @@ -90,6 +90,7 @@ struct MachineClass {
> >      const char *default_machine_opts;
> >      const char *default_boot_order;
> >      const char *default_display;
> > +    GlobalProperty *default_props;
> >      GlobalProperty *compat_props;  
> 
> Could you explain (in a comment?) the purpose of each field? They
> seem to do exactly the same thing, so why couldn't they become a
> single linked list, where the compat classes just append new
> items to the existing default_props list?
> 
> (If we build default_props by appending instead of overwriting
> the parent class list, we will be able to finally eliminate
> PC_COMPAT_* macro nesting)
The only reason I've added it as separate field is to keep the
current way compat_props are working instead of rewriting
not related to this series part.

Alternatively we could add qdev_prop_prepend_global_list() API
and add static defaults calling it from board's machine-init.



reply via email to

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