Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp416039rwb; Fri, 4 Aug 2023 15:11:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHpUmYLEHYvz3ClrknGQgz84OadW204ap56SVU42nUwixJfZqqPVDf/Ax/9ygQ+TK2TUpuf X-Received: by 2002:a17:902:da8a:b0:1b8:9b1b:ae8e with SMTP id j10-20020a170902da8a00b001b89b1bae8emr3104681plx.59.1691187075420; Fri, 04 Aug 2023 15:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691187075; cv=none; d=google.com; s=arc-20160816; b=H9M00RA7RoNJrXNiXpIyKGJB30WQLB59HjL9h6maLOo90fwVxrEzXHg6bvrt29Lupt Kvx8Pomr9RfNU5/8teckNVL2ikAPoSm8eFsIaaNdQZEFOFoEi4TgjaCtpRM8gkkzDT1C o968XBFMMy6qUUzNCghHN285nXZyuQe4EHHJrgTUgXmfGV4a+bL8MK4Mw0DOdZkz2amE HenK1+pe/0boMjTyxJSeWuetncdFusrABFvqATSYZReyKI0PoKhpbQcdW+J7907UFwhm 80irF6pi8aaYsjzEA7eKZEp6/N8crJNZASfitnJpJ7uu3gyir5MECtq63BHEgJQGwGgP cz4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=lc7ZeUSNeeQ2dg0g08+fgQtHSCaTeyofmNinP6tH5aA=; fh=ivS+A1CtFGD2w0aqk0V9u5eHiPL8CmsIeN1YNtu74tY=; b=siO0D58oPj/L8H/tOuGkQEqhzcLlNRKy59QaYDSbsNR0QLjyHPHhtlE8qmlSxYotUb izKaV6gw4CjzfGeD1kUcZwk0JYvEzHnNvRQPXdXTQqa2PqqQqcqaj0V5SOShb73pzVA9 DtrW1cfLCP7n8idYcj77NEmBy6rLYbiZcHPlcpVZoy+s/Qh11JFdXgv9CljtF4InR/j3 O0hrRStJU+xg0/BQmcMiqUtg7G8YomWuhNuuv/zGk3nlzYhaJgAw9z9tgttrjBJw2Oz1 D/M8/t5GyNpcF8qqzh0c6sb4qvkQ9QgXEulTnuTdNJV8Xmt095iO3G/svIHXErlqvEzM uWJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a25vzXLx; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a170903120500b001bb8e3f3475si2441295plh.52.2023.08.04.15.11.02; Fri, 04 Aug 2023 15:11:15 -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=@redhat.com header.s=mimecast20190719 header.b=a25vzXLx; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229828AbjHDVlj (ORCPT + 99 others); Fri, 4 Aug 2023 17:41:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjHDVlg (ORCPT ); Fri, 4 Aug 2023 17:41:36 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 530E5B2 for ; Fri, 4 Aug 2023 14:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691185249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lc7ZeUSNeeQ2dg0g08+fgQtHSCaTeyofmNinP6tH5aA=; b=a25vzXLxuQ8zseDXOK7fKJ7zrnQapiWkmmvJTqJTEMU9wUOumQfOXbHU9Wf3OUoKaxCLmu FUmRVkSeQtPbwUvD24xYdarQd7dW1BMBJH/qhnc9FtwnnYkurkAR2VSbsbgtlinmdJX03Y abM0hMprSGMJoELRPcZw3Sn3/XxP2do= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-193-9Z1afCOlPgmn1zk9B7GGdQ-1; Fri, 04 Aug 2023 17:40:48 -0400 X-MC-Unique: 9Z1afCOlPgmn1zk9B7GGdQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-99bc711a20eso171880366b.1 for ; Fri, 04 Aug 2023 14:40:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691185247; x=1691790047; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lc7ZeUSNeeQ2dg0g08+fgQtHSCaTeyofmNinP6tH5aA=; b=f2ygVII2Im0hd2YXk9k1ZKdkFhU4LEv/sZn4HAJVo3vOMsABuhUnCvTA7L1bBLNhRx zeC0P4ETqCUQ5zx/mGDkpoofO+RlmxLgmH7Iqen9fdEB9xJAtWdL14F1Id6uZ+u6y6vN 62MVpPzyPmaOtSg2M4ZHZL6urqkxArW+3V00bNkd6l8P3CtRwRxQwUqx+RUYs4S0DjdI 4HXVkFLooAvB1JsBlDgQ/m1tKADLCrr/6gDkci3otsFwSjpYAYtHode/eajTiYbaaZMn 6yFdb41C0FVeUwBUJkkTFq3MXkwXZdNJo0Qbc+UfwGgCIFjfRZ94Ha5Ltt3NNwqNtX8l WkcQ== X-Gm-Message-State: AOJu0YzxmjoCURnyRmi/lsLTbXX65KYTNlxnMojgJqnlHEXy+XESRBuF MCiuGeGYNdf/sH2qiPksRzS4+BepQo+6SrDbEYt2GEPfgX3Dk6pkp2HIHihAyB8jLxpRnE/haJ9 h/v6tDWbuDzMA0aOIAhVQCqrN X-Received: by 2002:a17:907:778d:b0:992:a80e:e5bd with SMTP id ky13-20020a170907778d00b00992a80ee5bdmr2638747ejc.48.1691185247132; Fri, 04 Aug 2023 14:40:47 -0700 (PDT) X-Received: by 2002:a17:907:778d:b0:992:a80e:e5bd with SMTP id ky13-20020a170907778d00b00992a80ee5bdmr2638743ejc.48.1691185246911; Fri, 04 Aug 2023 14:40:46 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:63a7:c72e:ea0e:6045? ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.googlemail.com with ESMTPSA id s15-20020a1709060c0f00b0098e42bef736sm1838745ejf.176.2023.08.04.14.40.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Aug 2023 14:40:46 -0700 (PDT) Message-ID: Date: Fri, 4 Aug 2023 23:40:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v5 11/19] KVM:VMX: Emulate read and write to CET MSRs Content-Language: en-US To: Yang Weijiang , seanjc@google.com, peterz@infradead.org, john.allen@amd.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rick.p.edgecombe@intel.com, chao.gao@intel.com, binbin.wu@linux.intel.com References: <20230803042732.88515-1-weijiang.yang@intel.com> <20230803042732.88515-12-weijiang.yang@intel.com> From: Paolo Bonzini In-Reply-To: <20230803042732.88515-12-weijiang.yang@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE 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 8/3/23 06:27, Yang Weijiang wrote: > + if (msr_info->index == MSR_KVM_GUEST_SSP) > + msr_info->data = vmcs_readl(GUEST_SSP); Accesses to MSR_KVM_(GUEST_)SSP must be rejected unless host-initiated. Paolo