From patchwork Wed Nov 14 20:54:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Baron X-Patchwork-Id: 199026 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 91E762C00B5 for ; Thu, 15 Nov 2012 08:20:10 +1100 (EST) Received: from localhost ([::1]:52044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYjzZ-0000i7-SD for incoming@patchwork.ozlabs.org; Wed, 14 Nov 2012 15:55:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYjyQ-0006sL-AV for qemu-devel@nongnu.org; Wed, 14 Nov 2012 15:54:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYjyN-0004Ri-6h for qemu-devel@nongnu.org; Wed, 14 Nov 2012 15:54:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYjyM-0004Rc-Vs for qemu-devel@nongnu.org; Wed, 14 Nov 2012 15:54:11 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAEKs8uD006420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Nov 2012 15:54:08 -0500 Received: from redhat.com (dhcp-185-114.bos.redhat.com [10.16.185.114]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAEKs7q3031752; Wed, 14 Nov 2012 15:54:07 -0500 Date: Wed, 14 Nov 2012 15:54:07 -0500 From: Jason Baron To: anthony@codemonkey.ws, qemu-devel@nongnu.org Message-Id: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: alex.williamson@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, armbru@redhat.com, agraf@suse.de, blauwirbel@gmail.com, yamahata@valinux.co.jp, juzhang@redhat.com, kevin@koconnor.net, kraxel@redhat.com, gsomlo@gmail.com, mkletzan@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, afaerber@suse.de Subject: [Qemu-devel] [PATCH v4 10/14] 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. Reviewed-by: Paolo Bonzini Signed-off-by: Jan Kiszka Signed-off-by: Jason Baron --- 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 c45921c..61034d3 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 "ich9.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); }