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 6A9D0EB64DD for ; Fri, 30 Jun 2023 10:22:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232125AbjF3KWJ (ORCPT ); Fri, 30 Jun 2023 06:22:09 -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> 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?!?