From patchwork Mon May 23 17:40:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 9132211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B68F8607D5 for ; Mon, 23 May 2016 17:49:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B03E528246 for ; Mon, 23 May 2016 17:49:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2C7428249; Mon, 23 May 2016 17:49:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 24E0028246 for ; Mon, 23 May 2016 17:49:58 +0000 (UTC) Received: from localhost ([::1]:49632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4tzJ-0000S4-Bo for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 May 2016 13:49:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4tqL-00018J-Bb for qemu-devel@nongnu.org; Mon, 23 May 2016 13:40:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4tqA-0001oc-Nq for qemu-devel@nongnu.org; Mon, 23 May 2016 13:40:40 -0400 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]:33002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4tqA-0001oS-Gy for qemu-devel@nongnu.org; Mon, 23 May 2016 13:40:30 -0400 Received: by mail-pa0-x243.google.com with SMTP id f8so6751951pag.0 for ; Mon, 23 May 2016 10:40:30 -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=4FjNohUp+qc6Is7HIw9kbC0cUT0Yv2okJ3KZx8GfIhQ=; b=aB4Wsdns06kjfqXPbmTdQPwU24TS3vj2gFmkO5Kcu+p1WCmyJOfp8h9ltVKRm6PPT4 8UB8JZ9m/lXMNqWBO2lDHKZrpr8PUO5QMxz9B5aT1J/BIAxji77zBAc90gROSxStTcXk 9iPSnn1g/RQO29cJsPLec9na3CIPGkWdCBGzd58qhm/3GatqoHfBQ/w5FZcKZjSUl9xV NZ5e4k2SmgMkqUb3G3S3QhahQNIdWxX4GOV8fxA1dbNYYfRyWU9sS9feKyU4aa9T5qWH XpUSXSZc6SPDojN7DvIiewmSxn38Eg3P4c8SKEJuGg2PF3lS1Q7bjiRGfriGwG2VXCj3 r46g== 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=4FjNohUp+qc6Is7HIw9kbC0cUT0Yv2okJ3KZx8GfIhQ=; b=Kel1sSJECAQQalWQOGQSLfp78ZtZaiYFKfOBxyrH1zb6cl1cZE+JSptf2iabolJMCF X6PAdqJUQNoWhWhgE9lJkmQzzPEso41ZyOJy5qbkVTuTX4imIRTxoDSjj5+p8jDPa0Z8 Kfz/2qKZLdxIZC84MUB8YFCO2vkdtzzxEhvxsUTHfnNGBjlQuSXmmXLQ8bJ/54P9krxB Z4uX4ZkVTzHLGMxg1n/UHombIlJ65Tg7xAdNXfGRtJS48Y9TGCxJ4RwLEDyD9LmFZQdp lhw5khQOq+bx4YczjGcqGScohUmdrfXEhrnxoMngdlx3Sn/0ZiwX8Jt0hLl4EhhhDxdT 5A+Q== X-Gm-Message-State: ALyK8tLYHrhyY4m7X1/IOAAzxKkZ6b8HMpZWO3a9tmxCiHQSP3PkQX1cUQI0Cj4u6SdzmQ== X-Received: by 10.67.30.68 with SMTP id kc4mr51268pad.19.1464025229044; Mon, 23 May 2016 10:40:29 -0700 (PDT) Received: from serve.minyard.net ([108.19.215.157]) by smtp.gmail.com with ESMTPSA id g77sm48093138pfg.78.2016.05.23.10.40.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 10:40:27 -0700 (PDT) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 8BF041D4A; Mon, 23 May 2016 12:40:25 -0500 (CDT) Received: by t430.minyard.net (Postfix, from userid 1000) id DC0A0300556; Mon, 23 May 2016 12:40:23 -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: Mon, 23 May 2016 12:40:13 -0500 Message-Id: <1464025217-24054-3-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464025217-24054-1-git-send-email-minyard@acm.org> References: <1464025217-24054-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:400e:c03::243 Subject: [Qemu-devel] [PATCH v6 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 99437e0..c2bc4af 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -764,8 +764,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, @@ -1181,6 +1179,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)