Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp954702rwp; Thu, 13 Jul 2023 04:02:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlF+Yp6JpQc9mPEpA0Xs+OHp2NnHgpS6Ak56vJUQTre5kHFq3O7wD7IUL1QELBhvW6z4nsJE X-Received: by 2002:a17:906:151:b0:992:8092:c109 with SMTP id 17-20020a170906015100b009928092c109mr1157457ejh.51.1689246174196; Thu, 13 Jul 2023 04:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689246174; cv=none; d=google.com; s=arc-20160816; b=zkZOaSRLarbjmh1xAG65RbqTsntHAk5yjmy8RlkIFv8NOQviQzSL5MPsHEettTD1Ke sIXyIBEcZz/tTKvKTWhXNJ7nrGRvaV/7aLH/x6XYeFE6T6GrEHZPVV8m4S1W730U5ymm UG7Bxysiv9UO7ikkssFIU1fccEeDQ/l8kuUp8jS8uYaTDvLbGXJauqnyA6p16sFMGdXd nc8qsx8ZoBsPf5gvRwQ8YiQg+Gkftzx8qFwdcXnaEaDqsoygK8VrfSvWXxpTMkcUC/Ai 6tsP+8wSLSVmaSYD8KQKslZUhNxYUSVGAOLKU9OpK2pOfeNoKAox7lbICQUA3s58Nulh nEAg== 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:dkim-signature; bh=RGWiHPH2+ZEm4azekOzq5SLUvXL6kF7cN7yMOiGExus=; fh=N+OK3Z4UlsoYtYFjfiw+LF5DCixo9u8YyFGQpJCZL3w=; b=QKYB8AiiwVELcC5wYV4hSm5/5MnOx4bXDxpX2VnF5HR4abelY4++ypyAl0N7atDUtj ZMKJJRmM7XeM48/88xwGqo4fL9eM+iUL4xUvH3A76+f6eLNSqbfVWd6gFZjnmQ1rk475 6j1jo74E1EetT6U2e2IpAI07/JpKQ3/VN7NojUIdXOoW526QhjHqTzjl1gc8Qty4LA0r RGil9AqTqgNDbG9oc7/P94+oZsYfsnOMYhIYBDUlOYT1ZcPbj0gQJ8TtGRewlyqQgnvC FqHuy42TyTwyhsOCXYOum/GItnsoZ0AggOPaLS5LMeQxoWfhDwz/IaWy6IVCpgRr5DO5 YdoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=JKZOJ4x1; 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 z22-20020a17090655d600b00977e10fafd3si6632880ejp.1045.2023.07.13.04.02.29; Thu, 13 Jul 2023 04:02:54 -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=@infradead.org header.s=casper.20170209 header.b=JKZOJ4x1; 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 S234210AbjGMKkC (ORCPT + 99 others); Thu, 13 Jul 2023 06:40:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234195AbjGMKj5 (ORCPT ); Thu, 13 Jul 2023 06:39:57 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAE7A1BFB; Thu, 13 Jul 2023 03:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=RGWiHPH2+ZEm4azekOzq5SLUvXL6kF7cN7yMOiGExus=; b=JKZOJ4x1CIfR1NN9pq2Eexy56E ZnRZckblEqHnPJOW4jadEfACb4Gy8pBAtwZqt8PHzXEFledXs9YL2Fg/mhfuIxcvE5/iKCB+o+r84 tbDgI90AySN5OzOD+WX/vo2g9dYGv2WkEN/+wQN3MiioW3r0YHbQT8LH8cF8ATC6n5UQlDFDyvuIF ipr5Fl5CMc1PU+UzqJJYO9MKjHiZgz5seo9vLSbxz7hjSsANyIXjUDdBQhqecLDJcPu/BxfKSJb7L GRB687ywBCWH8m+DxGVbkijVHMKe6P87OJ4l/WsEI0+KLr4FiD0nKDSRbp3D9Zd3l3cl9TjCWwJ8L Mi2e0XoQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qJtje-0003cv-Jx; Thu, 13 Jul 2023 10:39:46 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 41B8D300362; Thu, 13 Jul 2023 12:39:46 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 29C9E245CA111; Thu, 13 Jul 2023 12:39:46 +0200 (CEST) Date: Thu, 13 Jul 2023 12:39:46 +0200 From: Peter Zijlstra To: "Huang, Kai" Cc: "Hansen, Dave" , "Christopherson,, Sean" , "bp@alien8.de" , "x86@kernel.org" , "hpa@zytor.com" , "mingo@redhat.com" , "kirill.shutemov@linux.intel.com" , "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "pbonzini@redhat.com" , "Yamahata, Isaku" , "kvm@vger.kernel.org" , "sathyanarayanan.kuppuswamy@linux.intel.com" Subject: Re: [PATCH 07/10] x86/tdx: Extend TDX_MODULE_CALL to support more TDCALL/SEAMCALL leafs Message-ID: <20230713103946.GG3139243@hirez.programming.kicks-ass.net> References: <20230712165336.GA3115257@hirez.programming.kicks-ass.net> <20230712165912.GA3100142@hirez.programming.kicks-ass.net> <20230713084324.GA3138667@hirez.programming.kicks-ass.net> <5cc5ba09636647a076206fae932bbf88f233b8b2.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Thu, Jul 13, 2023 at 10:24:48AM +0000, Huang, Kai wrote: > On Thu, 2023-07-13 at 10:19 +0000, Huang, Kai wrote: > > On Thu, 2023-07-13 at 10:43 +0200, Peter Zijlstra wrote: > > > On Thu, Jul 13, 2023 at 08:02:54AM +0000, Huang, Kai wrote: > > > > > > > Sorry I am ignorant here. Won't "clearing ECX only" leave high bits of > > > > registers still containing guest's value? > > > > > > architecture zero-extends 32bit stores > > > > Sorry, where can I find this information? Looking at SDM I couldn't find :-( > > > > > > Hmm.. I think I found it -- it's in SDM vol 1: > > 3.4.1.1 General-Purpose Registers in 64-Bit Mode > > 32-bit operands generate a 32-bit result, zero-extended to a 64-bit result in > the destination general-purpose register. Yes, that's it.