From patchwork Tue Oct 9 03:30:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Baron X-Patchwork-Id: 190193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AFEED2C00A3 for ; Tue, 9 Oct 2012 15:22:11 +1100 (EST) Received: from localhost ([::1]:50749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLQXP-0002JI-6L for incoming@patchwork.ozlabs.org; Mon, 08 Oct 2012 23:31:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLQWl-0000xD-5v for qemu-devel@nongnu.org; Mon, 08 Oct 2012 23:30:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLQWj-0001r1-Vv for qemu-devel@nongnu.org; Mon, 08 Oct 2012 23:30:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLQWj-0001qv-Nb for qemu-devel@nongnu.org; Mon, 08 Oct 2012 23:30:37 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q993UZW1011006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Oct 2012 23:30:35 -0400 Received: from redhat.com (dhcp-185-114.bos.redhat.com [10.16.185.114]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q993UYQ6006487; Mon, 8 Oct 2012 23:30:35 -0400 Date: Mon, 8 Oct 2012 23:30:34 -0400 From: Jason Baron To: qemu-devel@nongnu.org Message-Id: <4c27506681a076bb646d4661ed7004617405580b.1349749915.git.jbaron@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: aliguori@us.ibm.com, juzhang@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, armbru@redhat.com, agraf@suse.de, blauwirbel@gmail.com, yamahata@valinux.co.jp, alex.williamson@redhat.com, kevin@koconnor.net, avi@redhat.com, mkletzan@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, afaerber@suse.de, kraxel@redhat.com Subject: [Qemu-devel] [PATCH v2 14/21] q35: Suppress SMM BIOS initialization under KVM X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka Same as for i44fx: KVM does not support SMM yet. Signal it initialized to Seabios to avoid failures. Signed-off-by: Jan Kiszka Signed-off-by: Jason Baron Reviewed-by: Paolo Bonzini --- hw/acpi_ich9.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/acpi_ich9.c b/hw/acpi_ich9.c index 9e78b60..1412ad3 100644 --- a/hw/acpi_ich9.c +++ b/hw/acpi_ich9.c @@ -28,6 +28,7 @@ #include "qemu-timer.h" #include "sysemu.h" #include "acpi.h" +#include "kvm.h" #include "q35.h" @@ -292,6 +293,12 @@ static void pm_reset(void *opaque) acpi_pm_tmr_reset(&pm->acpi_regs); acpi_gpe_reset(&pm->acpi_regs); + if (kvm_enabled()) { + /* Mark SMM as already inited to prevent SMM from running. KVM does not + * support SMM mode. */ + pm->smi_en |= ICH9_PMIO_SMI_EN_APMC_EN; + } + pm_update_sci(pm); }