From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1cJP-0004AM-QZ for qemu-devel@nongnu.org; Tue, 01 Nov 2016 12:53:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1cJL-0005y0-0M for qemu-devel@nongnu.org; Tue, 01 Nov 2016 12:53:23 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:15880) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1cJK-0005xt-Qn for qemu-devel@nongnu.org; Tue, 01 Nov 2016 12:53:18 -0400 Date: Tue, 1 Nov 2016 16:53:17 +0000 From: Wei Liu Message-ID: <20161101165317.GD30231@citrix.com> References: <1478018591-26425-1-git-send-email-wei.liu2@citrix.com> <20161101164827.GZ5057@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20161101164827.GZ5057@thinpad.lan.raisama.net> Subject: Re: [Qemu-devel] [PATCH RFC] PCMachineState: introduce acpi_build_enabled field List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Wei Liu , qemu-devel@nongnu.org, Xen-devel , Igor Mammedov , Anthony PERARD , Stefano Stabellini , Sander Eikelenboom 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. Wei.