Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5812224rwb; Mon, 5 Dec 2022 04:34:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf4MtRpGwuTTgUJFh49YggWHVUzlU5PNBNIRR6X2Vs69wr7G4qqnGP7+dKK1B173tFd1HJK6 X-Received: by 2002:a17:907:b606:b0:7af:ecf4:61c0 with SMTP id vl6-20020a170907b60600b007afecf461c0mr55734852ejc.178.1670243696365; Mon, 05 Dec 2022 04:34:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670243696; cv=none; d=google.com; s=arc-20160816; b=vvFGn1aUKWbQ5e+Z215I3ZAUW9LFqH4VudVAS1UcP39flX51JOXS1W3t+OGNAjJXMz eU/8aiW9lXTSm40DrFUmhmyg91wMffugv4ktlbzPeZJnDzX8Jf83T8KsDNwi99fAyPK6 oeVEBRFg4YM5CUtnHyVPWHmSQLykKtHihWZEt0+AH/1WCiniAOm0+XlizgiPvxnGki5e CLQlSxfWeb328S4J1TULL1CMhjy/3cIKDr0vFUu9XI6l6/S03T/+40qmF30CWj71Gqqp JRYd1Krfel4NdCrPDwxiJOTtkQL/GWQsQ74NtLVZGFAgk7AmHrFiQZ0jdioP6BqZodQO t5xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=8c0wk4OjXRa/QesbL2vsgHn8e80nbdEdde63Cqs79LU=; b=u7JSP/IeJ+BM58qyECma9wS9LyyOgCwfBcoq9kHKTiR6Nr6tFXXR1jfYnjLVS2GawW LDoZjPVfQ4zlMtKDOjgmfdqPukIABWtitS8BrKHExMyASAfN83vYucCD26tRDJgKsUHM yeUDmWse2rAU0zNzyVU5BaqhXfLtQAwHDkzV39jP13nyd+HrcjWK9oBzn6ILQ1wDi4fO 5e8UZGssa4l/a92FEXX+sca3O2z9PqYA6l0FCG+xbM1k5fbHidQHsvV+XhzE2sb1W2DF NFAL1atmNxjXB7PVyIovkKiF9DVf9S1CL44SUilnhHe7Sr2XJe9V0b0wwk481K8DABgc VXEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm3 header.b=V00lIOL6; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Ymhyjo4C; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j17-20020aa7ca51000000b004683b475587si5326737edt.274.2022.12.05.04.34.34; Mon, 05 Dec 2022 04:34:56 -0800 (PST) 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=@shutemov.name header.s=fm3 header.b=V00lIOL6; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Ymhyjo4C; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231755AbiLEMVh (ORCPT + 83 others); Mon, 5 Dec 2022 07:21:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231744AbiLEMVf (ORCPT ); Mon, 5 Dec 2022 07:21:35 -0500 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E7A8F5B8 for ; Mon, 5 Dec 2022 04:21:33 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8B01B320091F; Mon, 5 Dec 2022 07:21:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 05 Dec 2022 07:21:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1670242890; x=1670329290; bh=8c 0wk4OjXRa/QesbL2vsgHn8e80nbdEdde63Cqs79LU=; b=V00lIOL6pRsSMCtU95 vKHxeJ4m9ufk9wwAspWvf1e3s6HrMeTbhsuyPc6OenXh52/DZ908dt0LANk8Vx0S rLL/MG16b64cOopmHEBwbZwf2fY4Crqhnv4G3mO4Dwaghlc6Nk32EpzscJS5nLzb LmDjElro2B1yCMpQYu6A8M8cnpWuHfixu1sI/L9Vw2MuimSj7k/HPQLDcuJJo1TQ 6SJ45XSBha1WanrCd+qshB+b5VH/9HZvLfuPsOEkX2MblPXwlf4P+e1o0uIF52ev LA0KAkHX6o4Yi2DyTYUTztR2XyNkBMoyNIy7kZsqtk2/qOHQ/dMZxHFoEUVsuDOS SV/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1670242890; x=1670329290; bh=8c0wk4OjXRa/QesbL2vsgHn8e80n bdEdde63Cqs79LU=; b=Ymhyjo4CLdPwJWL2RhBjtEKy6dSusKREfgc87T61vKIf CGj+zLKQL3C+rUPN6gxZH/40+YixrKB/OwcIPwFsjI0rVzzjBwMziYyum+ZYeYjz BB/HlkZlyU8usAhwwA3m9FsfripbzN/+jCHvVMxYNx4mOFRstdd8wPippq6Iugtp hU74td094dahVYhv5jS+rBZ3CHooGrUMVfdxIF+k8qH689U3NgXb2sDnjz1mS3+L d7RIYZaJ9VMDu2mt6RTiImlkGH3JH+KyarVKwklBY3FTAuYU8Hxyt1X4gw2SGCfG +Y0tOVnRg/qR+FdmXbGAJK/jAqn3vLXX6d8V6ltdvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttddttddttddvnecuhfhrohhmpedfmfhirhhi lhhlucetrdcuufhhuhhtvghmohhvfdcuoehkihhrihhllhesshhhuhhtvghmohhvrdhnrg hmvgeqnecuggftrfgrthhtvghrnhepfeeileeffeeiteeljeekheetieehhffhfeeuheel tdetgfeuvddvffegvdelhfdunecuffhomhgrihhnpehinhhtvghlrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepkhhirhhilhhlsehs hhhuthgvmhhovhdrnhgrmhgv X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Dec 2022 07:21:28 -0500 (EST) Received: by box.shutemov.name (Postfix, from userid 1000) id 6994610948F; Mon, 5 Dec 2022 15:21:24 +0300 (+03) Date: Mon, 5 Dec 2022 15:21:24 +0300 From: "Kirill A. Shutemov" To: Juergen Gross Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra Subject: Re: [PATCH v5 13/16] x86: decouple PAT and MTRR handling Message-ID: <20221205122124.3sixqn52i4xsdxbt@box.shutemov.name> References: <20221102074713.21493-14-jgross@suse.com> <20221201162639.omlr5ff55go7uhlf@box.shutemov.name> <6d642051-31d8-81d5-f379-568360c5cb60@suse.com> <20221201235753.ybfc7gkgj7hlfkru@box.shutemov.name> <20221202132701.ymcp7a2yv3st33so@box.shutemov.name> <20221202143316.mtjz6dghecshldk2@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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, Dec 05, 2022 at 08:40:06AM +0100, Juergen Gross wrote: > > That's a question for the Intel architects, I guess. > > > > I'd just ask them how to setup PAT in TDX guests. Either they need to > > change the recommended setup sequence, or the PAT support bit needs to > > be cleared IMO. > > I've forwarded the question to Intel, BTW. I've initiated the talk internally too. > Another question to you: where does the initial PAT MSR value come from? > I guess from UEFI? It is set by TDX module on initialization. See section 21.2.4.1.2. "TD VMCS Guest MSRs" of TDX module spec[1] [1] https://cdrdv2.intel.com/v1/dl/getContent/733568 -- Kiryl Shutsemau / Kirill A. Shutemov