Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4632474iob; Sun, 8 May 2022 19:58:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOYL/+6aQURr7eCpzSsjSiobsRIfTYxTS8Zl4ynK4OkoE9n0sVjPghI9VGbjyIFpbgsKJp X-Received: by 2002:a05:6a00:b87:b0:510:5e02:79f1 with SMTP id g7-20020a056a000b8700b005105e0279f1mr14014848pfj.80.1652065113984; Sun, 08 May 2022 19:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652065113; cv=none; d=google.com; s=arc-20160816; b=S8NiVnQ80whX8Htap0/U95IzQE/ghxDhnDqCGBhO5OS7GSPKi8Pb5yBgKYjFLt2fDR /i3CHJaBuEZtXoTXDEqQ57sK5SXr2/Y0f+zx66d/CkFt3Fo9weCsOGuuy+eSmaWHVmn8 TonNn8dGB3o3f7c0Na5FeVhAuOKW2RjNEf7FtYaroc2c+kLxd9p3THHLZjzg4mMflCND TrHBTFykyAzFTb06DsTpY8Q5iSQcPtSsHgJqbeGwO3d+w7X4aIidgTrAK+fIYPo5Ad++ wirttbSqvtlHy/vMpz1ir/zDV7GtBiQ901HGdunp/fGSFhNMolapw0jmlQz8M0Xn5mok u2dw== 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 :organization:from:references:cc:to:content-language:subject :reply-to:user-agent:mime-version:date:message-id:dkim-signature; bh=SVrPke/lqrjA1eruVK5ZqtuF2QDsH4+WE7DbjG6xz4w=; b=h7/iaoZgBfzBnMG1m/CqLs1zZfr8RU2oGYqQhAxTpjvueET7pQsCnivR53IXUUEIYH ubrcABUuczTey4M9A9CNTRfkzzkBoezY3mZMvi0P8plHymCwJeMBK5xJTp0s/TJZtJWA L/J8C/RUD47aWGG2s5sLB6LQfUUe1lZN9SFX9EZHMGve5/8nz09hTD/pO+OQMICm3fa4 5uA52Eean//MoRVx1qjX9fMkC2scgA2TdmQVdiKqTwn2SkuPcXlMmyV8cnUbFnejxPgP eQ12IfTDdsaZUpz6tLgZSC+uAT1NHsXBFdPwyUtEn02l2gKE5mDLI51TNHlo8r/hcOxl reIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=p5Zkf2hH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 76-20020a62144f000000b004faac3a73f6si11901860pfu.79.2022.05.08.19.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 19:58:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=p5Zkf2hH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0642884A3C; Sun, 8 May 2022 19:58:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386528AbiEFGu5 (ORCPT + 99 others); Fri, 6 May 2022 02:50:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386438AbiEFGuv (ORCPT ); Fri, 6 May 2022 02:50:51 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A2AA66ADC; Thu, 5 May 2022 23:47:05 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id e5so5402300pgc.5; Thu, 05 May 2022 23:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:reply-to:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=SVrPke/lqrjA1eruVK5ZqtuF2QDsH4+WE7DbjG6xz4w=; b=p5Zkf2hHffFiPP9THSRb07u7RWxN20fY/fGHkeVuflQRrjwRSBK9cd2sUeO7pql7Ih eIgkGJhho1A5j8qGewXD9EiULFIRrKPe3jvxZ5DYF+wi3TXzIu1sp4Patebacss0A1MF 4S+Ipj3D0yzhmsbYG9bCQD9SkCycdGP3kHms8TLXeclu7ZmQulb3Qxh+xKqvpHywI0Kt tb4u7jXZ4kRdFzzDGaVF551Yn4qMoWZtA38LkhVh9kLSwHQG54EhPROfqVEzEGg/kBP6 t+aNIs9dKzP6K315J43S7a7x+9Cm4uZYmQGdO3FXSLViXQlq3uzinNap+q0rS83JX1xK CvSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:reply-to :subject:content-language:to:cc:references:from:organization :in-reply-to:content-transfer-encoding; bh=SVrPke/lqrjA1eruVK5ZqtuF2QDsH4+WE7DbjG6xz4w=; b=ccGZBGjY5ydvl2cT67jkC1rzWH6y3aWkDsteVmJAH1qbjvHznfc3o/+5p6tSpaiu+c oUeDw9u3NEVRvILIAF4gNfmdHUavF8czSJPagHFSgITogQaExjVOOb+z6I1LnViv9rBf kGIkXV0ipvvltdLI0Ikf8DNKhshZlVeEMWUjJmgL5Zr6Of1U9PITHS+DT/aPkl755Ukm 5HpdD/cHhafScwC6RV2oLT3r0BapMWYccxZ8LOK/pHSGniSww5tKsAP45o/M58w+sRV8 Ue3w6nviC5fDdwc+CYY91UPDVBZAYYdeywMrKNwTK16TXEPI5oGvo2S3MKifCRlFDR73 0JIA== X-Gm-Message-State: AOAM532YCMOzwPOrw1lAG5mQrWKGPozPW54m5uUHP+2D4OfjJcKaZZmQ S6OJW3Jqljy7v/HPI+taxC4= X-Received: by 2002:a63:d07:0:b0:3c2:7317:24c8 with SMTP id c7-20020a630d07000000b003c2731724c8mr1591014pgl.109.1651819624715; Thu, 05 May 2022 23:47:04 -0700 (PDT) Received: from ?IPV6:2404:f801:0:6:8000::e2? ([2404:f801:9000:18:efed::e2]) by smtp.gmail.com with ESMTPSA id y1-20020aa79e01000000b0050dc7628175sm2560205pfq.79.2022.05.05.23.46.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 May 2022 23:47:04 -0700 (PDT) Message-ID: <6a00a53b-0653-4f82-3f7a-7374ec9b0ab8@gmail.com> Date: Fri, 6 May 2022 14:46:54 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Reply-To: tiala@microsoft.com Subject: Re: [PATCH] x86/Hyper-V: Add SEV negotiate protocol support in Isolation VM Content-Language: en-US To: Andrea Parri Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, brijesh.singh@amd.com, venu.busireddy@oracle.com, michael.roth@amd.com, Tianyu.Lan@microsoft.com, thomas.lendacky@amd.com, jroedel@suse.de, michael.h.kelley@microsoft.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, vkuznets@redhat.com References: <20220505131502.402259-1-ltykernel@gmail.com> <20220505154717.GA3526@anparri> From: Tianyu Lan Organization: Microsft In-Reply-To: <20220505154717.GA3526@anparri> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 5/5/2022 11:47 PM, Andrea Parri wrote: > On Thu, May 05, 2022 at 09:15:02AM -0400, Tianyu Lan wrote: >> From: Tianyu Lan >> >> Hyper-V Isolation VM code uses sev_es_ghcb_hv_call() to read/write MSR >> via GHCB page. The SEV-ES guest should negotiate GHCB version before >> reading/writing MSR via GHCB page. Expose sev_es_negotiate_protocol() >> and sev_es_terminate() from AMD SEV code and negotiate GHCB version in >> hyperv_init_ghcb() fro Hyper-V Isolation VM. >> >> Signed-off-by: Tianyu Lan > > Applied to tip's x86/sev and checked that this can fix the regression (to > be introduced) by commit 2ea29c5abbc2 ("x86/sev: Save the negotiated GHCB > version"): > > Tested-by: Andrea Parri (Microsoft) > > Nits: (in the commit message) fro -> for, Isolation VM -> Isolated VM > Nice catch! Thanks.