Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp108570rwb; Tue, 13 Dec 2022 14:46:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf7dfjJGNVKJEQXHBq5ITuXIFT0nXaiTF/Ywp+ofocEUx+4gC8znxu5EwgcZRahF1Usrhgye X-Received: by 2002:a05:6402:3641:b0:462:6d7d:ab09 with SMTP id em1-20020a056402364100b004626d7dab09mr19791215edb.38.1670971614539; Tue, 13 Dec 2022 14:46:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670971614; cv=none; d=google.com; s=arc-20160816; b=x7x+sKpmkMcpOdCK6aBU4FOOZH/CZ/WN7irUqhDc1o6wn0j9pX5jR8LqeqHVKu4ZIg hlEJfeFwuRzh9SJcCStuGTN7CQJ0IHbXURqlgGPh+8tckn6cxt0bM1n2YeZf9C5anpOu RRlRI877W9c1HMb1nF6ZVYL7ps32DuNukZjRR2BNuC/NS/R5jeiDZFug44G2zSq5DHMY 16+E2VuMY1lADupVMiv1m4wllN2n9mtr2a1H69rTlYwwxKcInlXn87mZnLLvRbDAELxN 6joUwR3vNzxLIOfY7ikZfZP+DgyWdXsD3+0TiGqSGt2WVQ4QuCxKf0X+z/37d5jP98ZZ 3MGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=jOkN6mx0JfX+EBDBTfIU4veE+N2rPkSLe772MmeRWmk=; b=YTKhO8xl95EhaPnjvS/eRZ6LyBbjgLoCvjZtwmK9OCCdFKM0b+tUE11uQufxaf8H11 z+LcJfDEmWM4E2fmjaiaX89gqH73jlTefeZI3e48yAz95tzBIEEW88CWqZeuTJbUzJVS MIHMYki/+CoBiscQrLxcbsy2jzWSJfUPoB7joo/+18TyVUmNsb8552V6wm5B3SO7R4mC o81Kwoy3kzePRGk8pAY/LmnSvS5EgZY02ZRLkyAHu9SQMJDjcBLCIJDImvpji8y1Jrlq vtZWn9IDoPWO5qekDj9iI/y8LTVc2IUZxCXzJWerk8k0bxOxy/YeDTPK53JGDhScYa9Z Li0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BiBZOzve; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a056402320300b004690009024csi10988054eda.503.2022.12.13.14.46.36; Tue, 13 Dec 2022 14:46:54 -0800 (PST) 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=@intel.com header.s=Intel header.b=BiBZOzve; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236844AbiLMWpJ (ORCPT + 73 others); Tue, 13 Dec 2022 17:45:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236882AbiLMWop (ORCPT ); Tue, 13 Dec 2022 17:44:45 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A5625EA2 for ; Tue, 13 Dec 2022 14:44:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670971470; x=1702507470; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=c+9YkiDCKG1HcuHGaSW/UZ3+yOPPib+maJicYy8Yu2w=; b=BiBZOzveuxMXT/HG6xbK/QdVcPydmx2JeDafIUUG8CfmHzcVMxUZRzbR yhI4UfJVmNQ1GBb+xTHZAul/fQ/ii4pTdzT+PoPqAR1VAaU4123ZhHckE N82ixr2b+ur2Re3iAUBFTY65AscC3rX77r37X//ogi9k+mFcsv3cMOetJ uM26IeRyBWtzrAaIePSq1theomVBMFiw4HY7wOugayttd3y+Bj3EgpAwz urZVUaEzyom/vLHHGauvHoiXJFdby1TCgqa+e/tPyOxvHlTHEUqU7rSSd C4O/gBOmdA+0Mhn+ERB1cSfVXjXmFmv5aQ7IQYEdqvSSfLzfVyaGRiS6M Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10560"; a="380463006" X-IronPort-AV: E=Sophos;i="5.96,242,1665471600"; d="scan'208";a="380463006" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2022 14:44:28 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10560"; a="977595516" X-IronPort-AV: E=Sophos;i="5.96,242,1665471600"; d="scan'208";a="977595516" Received: from snjones-mobl1.amr.corp.intel.com (HELO [10.212.218.27]) ([10.212.218.27]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2022 14:44:27 -0800 Message-ID: <7d2a1ae7-56cf-a83d-4883-b2f8631a5e3d@intel.com> Date: Tue, 13 Dec 2022 14:44:27 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 1/4] x86/tdx: Expand __tdx_hypercall() to handle more arguments Content-Language: en-US To: "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski Cc: Kuppuswamy Sathyanarayanan , Thomas Gleixner , Elena Reshetova , x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org References: <20221209132524.20200-1-kirill.shutemov@linux.intel.com> <20221209132524.20200-2-kirill.shutemov@linux.intel.com> From: Dave Hansen In-Reply-To: <20221209132524.20200-2-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 12/9/22 05:25, Kirill A. Shutemov wrote: > So far __tdx_hypercall() only handles six arguments for VMCALL. > Expanding it to six more register would allow to cover more use-cases. like... > Using RDI and RSI as VMCALL arguments requires more register shuffling. > RAX is used to hold tdx_hypercall_args pointer and RBP stores flags. > > While there, fix typo in the comment on panic branch. This isn't the world's largest patch, but it doing at least three or four different logical things. Ideally, you'd do the restructuring in a couple of patches and then the last one would just add the six new registers. Could you take 20 minutes and see if you can break this down into three or four patches? It looks _ok_. I'd almost ack it as-is, but it should be pretty simple to break down.