From patchwork Tue May 24 17:37:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 68524 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp768305qge; Tue, 24 May 2016 10:39:58 -0700 (PDT) X-Received: by 10.200.46.200 with SMTP id i8mr5292857qta.60.1464111598299; Tue, 24 May 2016 10:39:58 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id i4si3491495qtb.95.2016.05.24.10.39.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 May 2016 10:39:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:54574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5GJB-0004wu-Pa for patch@linaro.org; Tue, 24 May 2016 13:39:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5GGy-0003lB-S1 for qemu-devel@nongnu.org; Tue, 24 May 2016 13:37:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5GGr-0004bA-Qr for qemu-devel@nongnu.org; Tue, 24 May 2016 13:37:39 -0400 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]:33113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5GGr-0004a4-Ma for qemu-devel@nongnu.org; Tue, 24 May 2016 13:37:33 -0400 Received: by mail-oi0-x243.google.com with SMTP id m198so5648466oig.0 for ; Tue, 24 May 2016 10:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=TGUsb2+WIV8KnawH51Dye/KH+45bm20rU6MeUD4XSwY=; b=p1an8wK9cZHbPA4RNxTSxm+eXqLjgg8RElOjOpkyW+T4PcEHsZfBReSmojuTrXIAaT +pjgTupRtHQXuECE/7TdK6hSTmoq8/1Z+rVz5ADCmVTvic89Pir1y5yu7DT/0XVxAxqT dGVWFmoEerBB1snUxfFUZGdvmqiTAN+5g+TCt7AM+EWUfPokbY+r+17J7AJFWSbhi8Rg w+RXv822i20QTPwBf9Mcqs/Gnr3sO9Z8INrE6iBnyLgF+5J1V20FVJA+IE4Ynspw3GEg O3mdRmDRXMCPvr7CtyMFMwAipXn4Tudbye/9uZUr1I96I79/KdrXZ383X4rDpWNZIMQI 8Uow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=TGUsb2+WIV8KnawH51Dye/KH+45bm20rU6MeUD4XSwY=; b=Wl5MPYO6rylEoJex/LNFT9/6b/C7c4PWzD7c8RoABVNhra7gF6ffO+FJLrYG7PcD8m ic0g7fTG8Lo33FRS/WpDrHLdiGZIFgBwVIzHjtvFG9DgLDK/6PvO76oU7840mlDcfaci zSXOvFbZLFJ+LzXoS6LGbrDTRm9l6NfDE2etVWIgZ4cUyks4xeBSzoAaQb//iV88097b wiQfzMW2g1nLZXuVz82UqEw0mHJVpZ1AHZbGRfrtKSZ218wNrL44HNiVo3OpJgbtNgXv T2faagRU695c/DS6dXwnxzt3cnA9c7fFU8ktA8thLdeesOFhINRNp8aIbO9THoSHaLyB P7xg== X-Gm-Message-State: ALyK8tJyehd3WHdsrAAyhSkRepiTh9uEx442DNAxMvuPa764jICh5MYyjsk6j9TIMWn2Jw== X-Received: by 10.202.75.132 with SMTP id y126mr7684383oia.107.1464111451794; Tue, 24 May 2016 10:37:31 -0700 (PDT) Received: from serve.minyard.net ([108.19.215.157]) by smtp.gmail.com with ESMTPSA id a71sm1871321oic.16.2016.05.24.10.37.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 May 2016 10:37:28 -0700 (PDT) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id CABE76E0; Tue, 24 May 2016 12:37:26 -0500 (CDT) Received: by t430.minyard.net (Postfix, from userid 1000) id 277F5300530; Tue, 24 May 2016 12:37:24 -0500 (CDT) From: minyard@acm.org To: Igor Mammedov , "Michael S . Tsirkin" , Paolo Bonzini , qemu-devel@nongnu.org, minyard@acm.org, cminyard@mvista.com Date: Tue, 24 May 2016 12:37:18 -0500 Message-Id: <1464111442-10387-3-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464111442-10387-1-git-send-email-minyard@acm.org> References: <1464111442-10387-1-git-send-email-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::243 Subject: [Qemu-devel] [PATCH v7 2/6] pc: Postpone SMBIOS table installation to post machine init X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Corey Minyard This is the same place that the ACPI SSDT table gets added, so that devices can add themselves to the SMBIOS table. Signed-off-by: Corey Minyard --- hw/i386/pc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e29ccc8..92125a8 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -765,8 +765,6 @@ static FWCfgState *bochs_bios_init(AddressSpace *as, PCMachineState *pcms) acpi_tables, acpi_tables_len); fw_cfg_add_i32(fw_cfg, FW_CFG_IRQ0_OVERRIDE, kvm_allows_irq0_override()); - pc_build_smbios(fw_cfg); - fw_cfg_add_bytes(fw_cfg, FW_CFG_E820_TABLE, &e820_reserve, sizeof(e820_reserve)); fw_cfg_add_file(fw_cfg, "etc/e820", e820_table, @@ -1182,6 +1180,9 @@ void pc_machine_done(Notifier *notifier, void *data) } acpi_setup(); + if (pcms->fw_cfg) { + pc_build_smbios(pcms->fw_cfg); + } } void pc_guest_info_init(PCMachineState *pcms)