From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32E58C001DC for ; Thu, 13 Jul 2023 10:40:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233207AbjGMKkD (ORCPT ); Thu, 13 Jul 2023 06:40:03 -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: 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.