[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] PCMachineState: introduce acpi_build_enabled field
On Tue, Nov 01, 2016 at 02:59:25PM -0200, Eduardo Habkost wrote: > On Tue, Nov 01, 2016 at 04:53:17PM +0000, Wei Liu wrote: > > On Tue, Nov 01, 2016 at 02:48:27PM -0200, Eduardo Habkost wrote: > > [...] > > > > static void pc_machine_set_nvdimm(Object *obj, bool value, Error > > > > **errp) > > > > { > > > > PCMachineState *pcms = PC_MACHINE(obj); > > > > @@ -2159,6 +2173,8 @@ static void pc_machine_initfn(Object *obj) > > > > pcms->vmport = ON_OFF_AUTO_AUTO; > > > > /* nvdimm is disabled on default. */ > > > > pcms->acpi_nvdimm_state.is_enabled = false; > > > > + /* acpi build is enabled by default. */ > > > > + pcms->acpi_build_enabled = true; > > > > > > If you set: > > > pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build; > > > the default value will be more consistent with the actual results > > > (where pc-1.6 and older don't have ACPI build). Then you would > > > probably be able to remove the pcmc->has_acpi_build check from > > > acpi_setup() and only check pcms->acpi_build_enabled. > > > > > > > Thank you for your good advice. > > > > I take it that you're ok with the name of the field and the code in > > general? If so I will drop RFC tag in my next submission. > > The rest looks good to me, except that I don't see a reason to > add a "acpi-build" property if it's not used for anything (all > code is using the struct field directly). > OK. I'm fine with deleting that. I was just following existing examples. Wei. > -- > Eduardo _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |