From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A401C10F11 for ; Wed, 10 Apr 2019 14:17:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4AAD20854 for ; Wed, 10 Apr 2019 14:17:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732343AbfDJORf (ORCPT ); Wed, 10 Apr 2019 10:17:35 -0400 Received: from mga17.intel.com ([192.55.52.151]:26279 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731462AbfDJORf (ORCPT ); Wed, 10 Apr 2019 10:17:35 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 07:17:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="314717641" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.181]) by orsmga005.jf.intel.com with ESMTP; 10 Apr 2019 07:17:34 -0700 Date: Wed, 10 Apr 2019 07:17:34 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Radim =?utf-8?B?S3LEjW3DocWZ?= , Joerg Roedel , kvm@vger.kernel.org, Jon Doron , Jim Mattson , Liran Alon , Vitaly Kuznetsov Subject: Re: [PATCH 1/3] KVM: x86: Load SMRAM in a single shot when leaving SMM Message-ID: <20190410141734.GA10760@linux.intel.com> References: <20190402150311.29481-1-sean.j.christopherson@intel.com> <20190402150311.29481-2-sean.j.christopherson@intel.com> <86ae2c55-d2ce-141d-7e8c-64724c3c1694@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86ae2c55-d2ce-141d-7e8c-64724c3c1694@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Apr 10, 2019 at 11:19:19AM +0200, Paolo Bonzini wrote: > On 02/04/19 17:03, Sean Christopherson wrote: > > Ostensibly, the only motivation for having HF_SMM_MASK set throughout > > the loading of state from the SMRAM save state area is so that the > > memory accesses from GET_SMSTATE() are tagged with role.smm (though > > arguably even that is unnecessary). > > Why is that unnecessary? If they do not have role.smm they would access > video RAM or TSEG, not the state save area. You're right, feel free to strike that line from the record. For some reason I had it in my mind that enter_smm() was writing SMRAM before setting HF_SMM_MASK.