Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3203010rwo; Mon, 24 Jul 2023 07:44:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlHND+8j8gxm5zqQ91+psjzpHFIEnRViH3A0Oxjfl/+BMUtMXv/zXJyOO0HRhUBDNB4xvzw+ X-Received: by 2002:a05:6a20:8e1f:b0:122:20c:fbb1 with SMTP id y31-20020a056a208e1f00b00122020cfbb1mr11539147pzj.44.1690209848773; Mon, 24 Jul 2023 07:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690209848; cv=none; d=google.com; s=arc-20160816; b=NyGONa7RqGnkqkViez0qjRk9zcv3KhjcFxihpK4QnzaCbWrxQZ/K9JJsQaTe3h6ijf 4bI6g0O36AWLHVFHvi+kz1W9TTjJuQUIlZWeDs8C7Qi6b5TVpqfgdAiJGqSPsfwKpYbo BGmJ45oGl+2vnKjfc/rXCtbXWwqxcLOjaKUGJMbwHjLH02E/aai1FFN5uDtwhiFFBKo1 unMdL7AJ+fgCF23Bg+ECTT8ShnhuRcE8R0vfQ0Q1E1R4e4rO7xvlJhNDBWVTZ4zCn8gv VY/VvjPCkkvB2fLiYbq9yarL4S+HvJBtKKc32O5d4RY46BygxuLVo/wGg70hJN62MkTQ 3CWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=mL4/hlRXZM4j4GENS2ROMNedOywN4Y40WobkLyw1U40=; fh=8yDcEaXe7PrgXz/IhXjRZhqy5KneLcM3YQJ8S86MP64=; b=hYywOzTLMITvbw3CN0CXw8/ru0sFAe1YJKGOxuKRT33SjfscoqoMNupGIUKWuDyDYR o/w0wwW1xhdvbj41LM6UXHti3/ZQYKpBHeIMQBhyvKA6Ydddd0WFkNHGwJTf8jtPyyt7 lmsG5Ue5NlT1hUxXLdHvQuisIKNmfREUlq0/xE5kMoMo/MfP/wQ/OSbNs5KFsOo9P/Va jEySFQPtMdEkdJ8d17hiSAFQdL2FW+nYuxfnBDPmMIZVsSYfSWZA2GdH9w/6eb6cEdB0 rCLqZ6yn1Ruwf2hFv+CJdzQP908OwzFdOY5t8hlfk4FcXdf1wqh9SyKCKIfl1yNrL6Kf AZvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=0JZayPTG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s42-20020a056a0017aa00b0065b4e2b52c5si9692814pfg.196.2023.07.24.07.43.55; Mon, 24 Jul 2023 07:44:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=0JZayPTG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231268AbjGXO0d (ORCPT + 99 others); Mon, 24 Jul 2023 10:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230418AbjGXO0b (ORCPT ); Mon, 24 Jul 2023 10:26:31 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D617DE59 for ; Mon, 24 Jul 2023 07:26:29 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id d9443c01a7336-1bba5563cd6so4247505ad.3 for ; Mon, 24 Jul 2023 07:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690208789; x=1690813589; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=mL4/hlRXZM4j4GENS2ROMNedOywN4Y40WobkLyw1U40=; b=0JZayPTGquYMXgHedz2hVa/hjidK4VJ6suGY6Orxvr2MZMl6Nut3abBRV+HiLbzZRo F+nvPbzsjDa9VR+zsMB4l7U2NAtdY1VdejY5y0bunyXVFRDhZ9M89dR/8Z+j2vg6mMkZ WEU+ig754rCd8A4KzB8m4nWMV6egaYovtCF1oQFqBTrppB0xdGi3xRjdXn2LTT0+mRsw 0v04VoXaAVEtAd5Rrj1mACnYuMS3Oy0p0OmUVW5o/GsRV3hqAvICaaTChRYImZ+0jZGW 1+FpiAlKB1e2nIgLaNPm55MdM+vwxadyWPX2OqMmSaSvoYNrLfMRPdDDefvL9Y4OFxkw CgZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690208789; x=1690813589; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mL4/hlRXZM4j4GENS2ROMNedOywN4Y40WobkLyw1U40=; b=Q0ze/2Vd842ii4gOjL07cisrefTFHPk4D9pPLWaPPG/2XhYCHNNVVZi0/JbTgABeUo A0w88T/Mq2/IgWp/SzKDzow3gf2e73sWnk2x0NWRWSop3VVRusNgPMQs1nLw6ZbMHBsZ B+1faKNlASRkwVFHo8PyTL3B75yKjpEaEhGWH6R2+Bgz261M66mYMgL+DM5gHBxg3F6O pcSgrAj4/YHMLqNGoAF19sO5fU3Qhp1mKfWhSNjoAP/tg+v5jlsthsIeZeTDFjgFf9Jq Objl3CsQSvNseCSrV+JPbsCyko6s/LGJEEdOHXejbdxAvRCpwbTqAZSEZBeLUzgT/Fk2 vdwA== X-Gm-Message-State: ABy/qLa38wOYtDGvz4qk7j+oHvogAySwXsFk6JOwN5YUYzI3CVhjHqvN vszEiHPgHZ0pDsoEpArWz0/PrMU4AS0= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:903:2305:b0:1b7:edcd:8dcf with SMTP id d5-20020a170903230500b001b7edcd8dcfmr42791plh.4.1690208789053; Mon, 24 Jul 2023 07:26:29 -0700 (PDT) Date: Mon, 24 Jul 2023 07:26:27 -0700 In-Reply-To: <296c5c68-d03b-65bd-bfb6-41e6046ed389@intel.com> Mime-Version: 1.0 References: <20230721030352.72414-1-weijiang.yang@intel.com> <20230721030352.72414-12-weijiang.yang@intel.com> <296c5c68-d03b-65bd-bfb6-41e6046ed389@intel.com> Message-ID: Subject: Re: [PATCH v4 11/20] KVM:x86: Save and reload GUEST_SSP to/from SMRAM From: Sean Christopherson To: Weijiang Yang Cc: Chao Gao , pbonzini@redhat.com, peterz@infradead.org, john.allen@amd.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, rick.p.edgecombe@intel.com, binbin.wu@linux.intel.com Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 24, 2023, Weijiang Yang wrote: > > On 7/24/2023 5:13 PM, Chao Gao wrote: > > On Thu, Jul 20, 2023 at 11:03:43PM -0400, Yang Weijiang wrote: > > > Save GUEST_SSP to SMRAM on SMI and reload it on RSM. > > > KVM emulates architectural behavior when guest enters/leaves SMM > > > mode, i.e., save registers to SMRAM at the entry of SMM and reload > > > them at the exit of SMM. Per SDM, GUEST_SSP is defined as one of > > To me, GUEST_SSP is confusing here. From QEMU's perspective, it reads/writes > > the SSP register. People may confuse it with the GUEST_SSP in nVMCS field. > > I prefer to rename it to MSR_KVM_SSP. > > Hmm, looks a bit, I'll change it, thanks! Please just say "SSP". The SMRAM field has nothing to do with KVM's synthetic MSR.