Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1082921lqo; Fri, 17 May 2024 10:05:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUNoocc3ewa70EtbSNeALfnVT6kqsjYq7ReYYNDeGKi5TsA/znQ21gyuZBW0Ilmj2pGYqQ37oKTA6NEyGMxzFLodXRdEpT9jiNi2f1m1g== X-Google-Smtp-Source: AGHT+IG/Kjpl/55O/ABTXRS0FSVNTU1kPjOYZGQfhYmGZ3v10Rtuhuixu4l22CzykOx9EIL1Q+BN X-Received: by 2002:a19:770b:0:b0:51e:f8ae:db35 with SMTP id 2adb3069b0e04-5220fe798b9mr14361020e87.43.1715965531230; Fri, 17 May 2024 10:05:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715965531; cv=pass; d=google.com; s=arc-20160816; b=fFRS3bh8gzTNkTJ+jBXi9q1DcSzxqLhlq8HkrHPj2ACjkRTbnVbtkwpOnFRSKyAOgB +uwIqbNhS7fdX4rRchNUexpUpRC3fi/m0PX2nwQ6jN0K1oc4ANiJFivPK/CHFGRzoWHJ FuK593X1LogRBgorVK35Q+0J+QUobBkLsh9x5zyY8VxtAk7W8RhzoVoqcm1SbcK9xX+z 7KkOQrpV6EZqCYYOsunINitVybzEGqge+EkSZ2LcW/SRZ/JcIVbvs0chpDdENXks1+zz Hl6LfPCyvW/ENGbDp5vg0B1jvCOeM2KO+YvcBPSAfheZnDX5ZrUxHIkO/utTMXOxVIhf n+1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=NWyzI/owlrZS3OdD2++L32ikBFzAP0809WyjNtkngNs=; fh=QTLa+GK+M2dmk7cOvCKAed3ETk9eEU5Dz02gskPS5V0=; b=Lq1I/HkBXILOLcFHrAPvHaKpbpAjh4zKSw1YpHR4DAgkfhjRCNR+ycmRIvTqmd4Js1 bTySupuKL9mmtXcZbf5I4Xqj7XEsg40WhG3nN8YFXWljMobJAiZvwFIED47/YgrmPsa1 vc5AOoZlqqZSUMggnt2fLYss089eO5dsLBieDFXZfK5cauH0eziEuNPX5pPlLPAHXuNI m7P6qjGrkl4fvlR6kQ7rqLdIVn6V/3AyXUdlUQg4juwgKBja+4K0q95KvESTuCbCmOsS iw+kT88KmGl4kIW7tFiyzBKwrjqVfVUF2HcfDuPdwAGJegNNxj/pGBLoVvNkGtCwM2nC 3ORw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZzmFZOeJ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-182374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-574db0eae54si4978874a12.251.2024.05.17.10.05.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 10:05:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZzmFZOeJ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-182374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C40361F24C83 for ; Fri, 17 May 2024 17:05:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E870213DDA0; Fri, 17 May 2024 17:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZzmFZOeJ" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A17AD12F5A3 for ; Fri, 17 May 2024 17:05:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715965511; cv=none; b=LJYVR6PNlfK6C+ey4yjpNX5UoPsKxkvoQBfMz5IpZQ6D6dA8g2rGsimTNLcgOsKNQXrwzI6zVhHSg27suutvbjBFoGA4ocsHOkjwqDiWyhT+mEqgTdSFyEd4iu8JFwUC6FECXiqhzhDP2m/nn/wQq4fDbWDsi+BrFeY0hSsQhDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715965511; c=relaxed/simple; bh=cicBuaDXb0+iJuraKbqW3IUKE/RHOlM5V7//N93fDUE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=s/RZO1qFWGVxzCKxw0y3nx55n7VeL2zTSvkuR4JqeEXmW0TUsu5zxeOaloJec3r/35kgh/Ujle3fLhMiFSXAySq/0kv8UQQbk+2J/lijgGmOOzx1tBh6kuMsUffUlIJeCnlnNVZ3E58bGgnxH+0GiWFOwfpd5hxM0UJLX9Yymjc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZzmFZOeJ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715965508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=NWyzI/owlrZS3OdD2++L32ikBFzAP0809WyjNtkngNs=; b=ZzmFZOeJkVlklJJGzPP8OAZnsLuzSRtqJKq+e6pqJzRGGupxfXrXjchj/yhxK/LDzLsP1c VrVsNvg7tCvk0U+dKUS08F+s+E1FWOP8yfZIS0tHfEV985zn87GfcSUuee6GfipaMQLbs8 PlV+bGOUilbTdjUxbPSFDyLz4kcfz/k= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-486-u54_WeD_MD2YgKX5AYSIgw-1; Fri, 17 May 2024 13:05:07 -0400 X-MC-Unique: u54_WeD_MD2YgKX5AYSIgw-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-56c1ac93679so4094182a12.2 for ; Fri, 17 May 2024 10:05:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715965506; x=1716570306; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NWyzI/owlrZS3OdD2++L32ikBFzAP0809WyjNtkngNs=; b=DRmBrSMUDXw70cs0VoGo91vGQp4tvzneDHBxo50hDxY7KWeNh3FYTtkdCn7/bfNbIz A5fnyyvKrmZqDRus+iZAq2Sg9RocuUrKAmCenKWkuIAuoPce/r0kkdVJmYpnSuRfdIVC usoes6jRWeYqGhSNMXkhSqgrnfEVJUhZAXTUCBEM9oWu3lkwF3hdxXEbl+j+aPIHiRzd 0pYBxiTZvE4Jeo7HEybMrBhJmLlkEzZ6Dnvqp5ypEcO1RTuE2uexIi95BHGWOhxbhu6W /PnrlxqOmJVNvA4Sc3lCHzQcWJKjxpqVUsHbY+FBXMAJcyT+F5ZmPHgo5B6PeN3grKeJ xdBA== X-Forwarded-Encrypted: i=1; AJvYcCVizTdXsw4GN/bjxbxUFhVdoh/a+Y+tw/X0zhRo90RhY7Wqk4MiYaXCGmC5g2a14kHFJyqP2NqLVMwpNORNb9I6HBCBSJh/Dw/NGiHG X-Gm-Message-State: AOJu0YwIzWJP/qWhVXJtQXLAm6G9gNPpwmnCWOQP0JDE6h2vm0FmGwpt HtoHEox1uBtyFqj8cfJc2I9KLmJfdRXaJmLwbO5N8v+zyUBWhyAPS+6C90tk09NYY0WJDES3rnk bLWqaZVE4dwAnNlcr+FG6fBbJzygWxVYWIu4CJ2ahK67o5rouBZGbJaEaxMBUXA== X-Received: by 2002:a50:d7c2:0:b0:572:68a6:97c with SMTP id 4fb4d7f45d1cf-5734d5ccb06mr14616434a12.11.1715965506088; Fri, 17 May 2024 10:05:06 -0700 (PDT) X-Received: by 2002:a50:d7c2:0:b0:572:68a6:97c with SMTP id 4fb4d7f45d1cf-5734d5ccb06mr14616416a12.11.1715965505723; Fri, 17 May 2024 10:05:05 -0700 (PDT) Received: from [192.168.10.81] ([151.95.155.52]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5733bea65e2sm12095404a12.19.2024.05.17.10.04.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 May 2024 10:05:04 -0700 (PDT) Message-ID: <05277f00-d5a9-46a4-b11e-8ed6e8885e73@redhat.com> Date: Fri, 17 May 2024 19:04:49 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 14/20] x86/tdx: Add macros to generate TDCALL wrappers To: "Kirill A. Shutemov" , Sean Christopherson , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Josh Poimboeuf , Peter Zijlstra Cc: linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org References: <20240517141938.4177174-1-kirill.shutemov@linux.intel.com> <20240517141938.4177174-15-kirill.shutemov@linux.intel.com> From: Paolo Bonzini Content-Language: en-US Autocrypt: addr=pbonzini@redhat.com; keydata= xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2 CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04 hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S P/kXmHDXxhe23gKb3dgwxU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tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0 JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w= In-Reply-To: <20240517141938.4177174-15-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/17/24 16:19, Kirill A. Shutemov wrote: > Introduce a set of macros that allow to generate wrappers for TDCALL > leafs. > > There are three macros differentiated by number of return parameters. > > Signed-off-by: Kirill A. Shutemov > --- > arch/x86/include/asm/shared/tdx.h | 58 +++++++++++++++++++++++++++++++ > 1 file changed, 58 insertions(+) Can you explain in the commit message why you picked a different approach? That is, a sequence of inlined movq instructions here vs. compiler-generated movqs + a trampoline for TDVMCALL. Paolo