Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28964538rwd; Wed, 5 Jul 2023 05:27:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6zYsvwb3z+mliOSxAso/NUm0FCo0Bm9IM4jUoaKTQc929zvuYvFBrwC06U+K3xQuRvd3Ho X-Received: by 2002:a05:6808:1147:b0:3a1:ce2b:6668 with SMTP id u7-20020a056808114700b003a1ce2b6668mr21878420oiu.21.1688560049805; Wed, 05 Jul 2023 05:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688560049; cv=none; d=google.com; s=arc-20160816; b=ougn3wVWg3ot+EE1I4ymKwRzph08Vc6Hh2j+qQ8XjtfKImllusEH3vOgubZwMQ71xK QPBV8mQnxJAkWvvgzhRJhBaAGduMN55LgeNkysdU5C5exGSska1WTCfBO06nlATDd1lo lAY8zsiLvnfapS9svKczn2EPziheozzqZGT3tNzHXV88+bqWacAlgsNznQc/Ydza+N0h fduvZja/cWa5Drr2o6Xuqmfa4l/ypwUHfYR4lTd0UYg6vKEwt27lVW/JOBqAZeQ9QbXm 1Cm3GFzUNz2DW0lF+fY19qfT4E3B1EPWbSDoF/LGHnqhU3VvlU2TQVf700B0OesRAsJo nUFg== 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=a6Nk9N28tpATSH0+5KW2Z9yQf6QWBdI+heV4d9bxsB0=; fh=cWlCMy5fKqRxM/Sqsly8vkkOMntOkPTK4ObgfVv6bvg=; b=KodBL2rGTpbQvulXTVJ+AzNBdvUa7/YiZOXIf0ATvGKKpNEpDXE3kwSnUXXYO2BGPB ORoeDRmGcWtc/zKhGjiN9NS5P4o2XSFAmvjoshbNySyM1Vy91WyRRbFW1f6ZGdCFR3Jg iazkgyhUHPcLfx5zlj/xfyPzXZcmS0mNl0GjHoYMCcBOiFneRUv+D/sX5R1/OWkVEfNT 6/jsFOOj6nRox8HsoWNQqjNKh+uol1qgaQtzYE0P38TlunqSKKUUT3P2v4NbKKFBtqIz hfWElb2r5xYDnQr1PyGhUf9D9vk/BQ3CGRRvWwmAVyTVQoR8eI34Q7cSHceTE4V6xNYs sr4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ivKX9HIx; 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 f16-20020a631010000000b005428f25f67bsi22550210pgl.784.2023.07.05.05.27.17; Wed, 05 Jul 2023 05:27:29 -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=ivKX9HIx; 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 S231367AbjGEMVY (ORCPT + 99 others); Wed, 5 Jul 2023 08:21:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbjGEMVX (ORCPT ); Wed, 5 Jul 2023 08:21:23 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C9E1E7B; Wed, 5 Jul 2023 05:21:23 -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=a6Nk9N28tpATSH0+5KW2Z9yQf6QWBdI+heV4d9bxsB0=; b=ivKX9HIxU6riK0WSJJLdyvIgi2 NDlZ7qZXzS17fOW9w9bzF9Du8/Ufbc80Igg4RSTEICzPPV0nFt76M+5nXerfm06XUHbfY9IEMlRqQ K6tjcAW6984NHdAzcKNrrRGw2zJb6EO5DB/MuvOeWirPLarZtFiA1Pho3RjZ2aryLUso7Qpfh+EQU J+igUWGpKw8f2vrOojdndQAAoue7f4CzaODAmJp1aS1cZvy8+jOEGIXcytLalcj5/5dDmWHDVg8T+ NMuYbXYK/b5DkrNLG4KKQnygswV4ID4EvTp7HDwgv0PWKl0v8WnDPa2qjfRCwEaoMcJfi0iC0tcir YZqIVtqw==; 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 1qH1VN-00A3sQ-HN; Wed, 05 Jul 2023 12:21:09 +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 2126630012F; Wed, 5 Jul 2023 14:21:09 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0A4BB2022DED3; Wed, 5 Jul 2023 14:21:09 +0200 (CEST) Date: Wed, 5 Jul 2023 14:21:09 +0200 From: Peter Zijlstra To: "Huang, Kai" Cc: "kvm@vger.kernel.org" , "Raj, Ashok" , "Luck, Tony" , "david@redhat.com" , "bagasdotme@gmail.com" , "Hansen, Dave" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "kirill.shutemov@linux.intel.com" , "Chatre, Reinette" , "Christopherson,, Sean" , "pbonzini@redhat.com" , "mingo@redhat.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "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: <20230705122109.GA4253@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> <20230630102141.GA2534364@hirez.programming.kicks-ass.net> <20230630120650.GB2534364@hirez.programming.kicks-ass.net> <20230705102137.GX4253@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed, Jul 05, 2023 at 11:34:53AM +0000, Huang, Kai wrote: > Yeah I think from long-term's view, since SEAMCALLs to support live migration > pretty much uses all RCX/RDX/R8-R15 as input/output, it seems reasonable to > unify all of them, although I guess there might be some special handling to > VP.VMCALL and/or VP.ENTER, e.g., below: > > /* TDVMCALL leaf return code is in R10 */ > movq %r10, %rax Well, that's a problem fo whoever does tdcall(0, &args), no? But did I say it had a crap calling convention already?