Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22090241rwd; Fri, 30 Jun 2023 03:52:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7etMmNLAyF1YhQrR1HFytkziWxqtpcwPY+gwprdM4SpO1v4Xgu/LjI1BOhBKaWZlruUOzW X-Received: by 2002:a05:6808:23c7:b0:3a1:efe3:e815 with SMTP id bq7-20020a05680823c700b003a1efe3e815mr2432744oib.34.1688122361781; Fri, 30 Jun 2023 03:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688122361; cv=none; d=google.com; s=arc-20160816; b=pluYZRIL2wveljolqgjVx29wqv4+zah+e/nj6szSdm+s6yNKCtyxNAZ4LL13Qai8pF 08UndxtMw14bOmThnz1UTRDJksBs0BygWPvhOlIHc9VwL6SfJ43RqeqIUS5D63fPTu1m yE2/GE6bq4+B1dyIxSoWtUgM6OlDmNJf2L+4rmtJu0ktZvco6YSAkuFHYgAd31uZX9AY OYFu4/He1ziboKaNDJSC39DmvbIDcga/qk0n3Vm9Qu7lLaytvI0U9BDObSFvqBq6uQme OQYMIxqR5R22nn9VZk4dvxLsax2a/cp60RZCp3RGu4arM8SJsPy1Mwg4N0qVM8F5oqVz RnPQ== 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=HZTty5miVE3pLFaCbNCICtFycZZgvwRIvYM0pV9affk=; fh=fOk9OZUSMbB51fwCyVJ/Xtma0ffyyGr1tqaCo5fi3/8=; b=W3gAboMFywbgVKsMw1HDpGhMGKXw8Ia0sLc7TU9wyHhYPQYzZTFjQ+sO5SsCzodxw0 7PNyl02G6kv81ldNsebUx3NT2k8Jif/tywQ9QnQx5IkM+araz+xG2teeesANrwbz7zTg ehCwa4P7KR4fkZNhgJmGIhujdx2elqOwm2miK9zO8zyGrDerMj5gsywwls+5huoShRUh 1r4ZrOnWxROAptpHRbSXrPNextpQfehYvmVq3DsZvXKAwGtondQV98ZH1uYTb3ZyD3Rq t1/y9QgrKjO0jZxMyPZCJ0NCGefDlMvPVa66LuNv36HGTBuCvd0z98ZJuKpFXVdmdlLT aVjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=mr5w8p5k; 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 r9-20020a63ec49000000b0053fc3bc33e4si12429067pgj.795.2023.06.30.03.52.28; Fri, 30 Jun 2023 03:52:41 -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=desiato.20200630 header.b=mr5w8p5k; 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 S231946AbjF3KWH (ORCPT + 99 others); Fri, 30 Jun 2023 06:22:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjF3KWE (ORCPT ); Fri, 30 Jun 2023 06:22:04 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BB4D2705; Fri, 30 Jun 2023 03:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=HZTty5miVE3pLFaCbNCICtFycZZgvwRIvYM0pV9affk=; b=mr5w8p5kFvbz0qkVhJwLHaS4gB GnYulcZDw17ZUPFMeM6y7Op7khTnbhx8ozRYLZsQH54W5wygIBv6uMjs+VJYNwo56SZJ7bpgWHBDX slnIxzMdV43ozSNjwC3T+nHdnJNYRSlnKLVmbAolWhBWTjFn28pNMiSyo035DDo7AZIRB5YNO6UtD gr8MIP22HNB1+dhFTNbyKqxx/EWlnFGG7F4QM+GOqkgdu9LXuAxtSzrv1E/kZ1Iyc9IxGGpUzA5A8 SOz3pGsdN7uzW+eET3vi06wjGGRVyRg8eeG4ks+b8aBqeNODpGys8xfRXC6UspjjKWSYlz5fa9mr2 rXr6Z0zQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qFBG3-007x7D-1G; Fri, 30 Jun 2023 10:21:43 +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 06C69300023; Fri, 30 Jun 2023 12:21:42 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DEF7924819474; Fri, 30 Jun 2023 12:21:41 +0200 (CEST) Date: Fri, 30 Jun 2023 12:21:41 +0200 From: Peter Zijlstra To: "Huang, Kai" Cc: "kvm@vger.kernel.org" , "Raj, Ashok" , "Hansen, Dave" , "david@redhat.com" , "bagasdotme@gmail.com" , "Luck, Tony" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "linux-kernel@vger.kernel.org" , "Christopherson,, Sean" , "mingo@redhat.com" , "pbonzini@redhat.com" , "linux-mm@kvack.org" , "tglx@linutronix.de" , "kirill.shutemov@linux.intel.com" , "Chatre, Reinette" , "Yamahata, Isaku" , "nik.borisov@suse.com" , "hpa@zytor.com" , "Shahar, Sagi" , "imammedo@redhat.com" , "bp@alien8.de" , "Gao, Chao" , "Brown, Len" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Huang, Ying" , "Williams, Dan J" , "x86@kernel.org" Subject: Re: [PATCH v12 20/22] x86/virt/tdx: Allow SEAMCALL to handle #UD and #GP Message-ID: <20230630102141.GA2534364@hirez.programming.kicks-ass.net> References: <20230628152900.GI2438817@hirez.programming.kicks-ass.net> <20230628203823.GR38236@hirez.programming.kicks-ass.net> <42e13ccf7f27a68c0dd64640eed378c38ef40967.camel@intel.com> <20230630100659.GF2533791@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230630100659.GF2533791@hirez.programming.kicks-ass.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Fri, Jun 30, 2023 at 12:07:00PM +0200, Peter Zijlstra wrote: > On Thu, Jun 29, 2023 at 10:33:38AM +0000, Huang, Kai wrote: > > Looking at the later versions of TDX spec (with TD live migration, etc), it > > seems they are already using R12-R13 as SEAMCALL output: > > > > https://cdrdv2.intel.com/v1/dl/getContent/733579 > > Urgh.. I think I read an older versio because I got bleeding eyes from > all this colour coded crap. > > All this red is unreadable :-( Have they been told about the glories of > TeX and diff ? > > > E.g., 6.3.15. NEW: TDH.IMPORT.MEM Leaf > > > > It uses R12 and R13 as input. > > 12 and 14. They skipped 13 for some mysterious raisin. Things like TDH.SERVTD.BIND do use R13. > But also, 10,11 are frequently used as input with this new stuff, which > already suggests the setup from your patches is not tenable. TDG.SERVTD.RD *why* can't they pass that TD_UUID as a pointer? Using *4* registers like that is quite insane. TDG.VP.ENTER :-(((( that has b,15,si,di as additional output. That means there's not a single register left unused. Can we still get this changed, please?!?