From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gF570-0007i4-Np for qemu-devel@nongnu.org; Tue, 23 Oct 2018 18:25:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gF56q-0006LG-1M for qemu-devel@nongnu.org; Tue, 23 Oct 2018 18:25:15 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33371) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gF56k-0006DK-3b for qemu-devel@nongnu.org; Tue, 23 Oct 2018 18:25:04 -0400 Received: by mail-wr1-f67.google.com with SMTP id u1-v6so3393652wrn.0 for ; Tue, 23 Oct 2018 15:24:59 -0700 (PDT) References: <20181022183656.4902-1-sameo@linux.intel.com> <20181022183656.4902-2-sameo@linux.intel.com> From: Paolo Bonzini Message-ID: Date: Wed, 24 Oct 2018 00:24:53 +0200 MIME-Version: 1.0 In-Reply-To: <20181022183656.4902-2-sameo@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/26] hw: i386: Decouple the ACPI build from the PC machine type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Ortiz , qemu-devel@nongnu.org Cc: Peter Maydell , "Michael S. Tsirkin" , Eduardo Habkost , Shannon Zhao , Igor Mammedov , Richard Henderson On 22/10/2018 20:36, Samuel Ortiz wrote: > +static void acpi_conf_pc_init(MachineState *machine) This should take a PCMachineState*, since you never use "machine" except for downcasting. Paolo > +{ > + PCMachineState *pcms = PC_MACHINE(machine); > + PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(machine); > + AcpiConfiguration *conf = &pcms->acpi_configuration; > + > + /* Machine class settings */ > + conf->legacy_acpi_table_size = pcmc->legacy_acpi_table_size; > + conf->legacy_cpu_hotplug = pcmc->legacy_cpu_hotplug; > + conf->rsdp_in_ram = pcmc->rsdp_in_ram; > + > + /* ACPI build state */ > + conf->build_state = NULL; > +} > +