From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrptT-0002bS-Im for qemu-devel@nongnu.org; Mon, 11 May 2015 11:45:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YrptS-0000s9-CJ for qemu-devel@nongnu.org; Mon, 11 May 2015 11:45:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrptS-0000ry-7x for qemu-devel@nongnu.org; Mon, 11 May 2015 11:45:22 -0400 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 (Postfix) with ESMTPS id D92F9B6A4C for ; Mon, 11 May 2015 15:45:21 +0000 (UTC) Message-ID: <5550CE8D.3010709@redhat.com> Date: Mon, 11 May 2015 17:45:17 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1431352157-40283-1-git-send-email-pbonzini@redhat.com> <1431352157-40283-24-git-send-email-pbonzini@redhat.com> <5550C808.8000505@redhat.com> <5550C8FE.8080804@redhat.com> <5550CC6D.7080903@redhat.com> In-Reply-To: <5550CC6D.7080903@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 23/31] ich9: implement SMI_LOCK List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek , kraxel@redhat.com Cc: qemu-devel@nongnu.org, mst@redhat.com On 11/05/2015 17:36, Laszlo Ersek wrote: > It's not about feature detection -- the question (from > <553F4D23.3060305@redhat.com>) is whether I should set APMC_EN myself > *every time* before writing to APM_CNT, in the > EFI_SMM_CONTROL2_PROTOCOL.Trigger() method. That protocol is provided by > a runtime DXE driver and would be exercised by eg. the non-privileged > half of the runtime variable service driver. Oh sorry, I couldn't find that message ID. > It's no problem to set it, I have the code ready, I was just wondering > if I should keep that hunk. (In fact it might not even matter: if the OS > interferes and clears APMC_EN before the non-privileged half mentioned > above manages to raise the SMI, then the call / transition to SMM will > simply not happen, which is bad for the OS, and probably irrelevant for > the firmware (... the security thereof).) The OS can also race against you and clear APMC_EN, so it's even unnecessary to reset it. Paolo