Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2230131ybg; Fri, 5 Jun 2020 08:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhLDXk0uhbCzaer1MdQTe19TK9ffA46YdU0y8D7CstwPfAbItouOf3CLuFdJ5WNWlcFbZy X-Received: by 2002:a17:907:2162:: with SMTP id rl2mr8774097ejb.365.1591371731599; Fri, 05 Jun 2020 08:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591371731; cv=none; d=google.com; s=arc-20160816; b=Tp4GiKsh5LIdB3P2nriuqPhLiFIZ9cmzB/e3z/UksFcgAtXB4uPB1g3tUtkMPLrfh6 QRsTjjsZHeHpXXOSG8z1Gt9EF9rKkLtOYKEaDmUjeIY6T7Sp6o871Ogn+gqP4S9TtTRY /y2z9kOujjkurQFj22zPBSQK4xkit/m3Hq+owEC+q2OWAcNAG1r2qbfVhxUzUbQLuYyh COwEBZ0vlhLXAdT0U8lBTMVFz4XWeedODgafrHU/2zj6CNmHhrRYOSASFN9v6WFqJqRA zvag1aqBrYlQdnIhJBvc5qIKszr94p8GI6IBpzsdZJUz2nXgF5juMa6rHZBhAC1iv92z W5mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr :dkim-signature; bh=bpxi5R4bZVMT/3MFEoBfMtJ94Rym4esyRQkAw8vEPzE=; b=s7yYSNuUu8tE0Zl4VlclScsM1lnMCXOFcjiTvbr1EJVQqnAGVOky12xhuTBQJR7vHZ Ye0MeAcDhLmmpPUg40yW1fguHMWdXj3ZpewtG3IYB7vrw9mLPxnHh7va3lJZhlNZ4gYL zUty1cq1sn/4OpGv2f3xIa11wcjqu5Eo4Udcca9hVKO53rF9LPZ9ieadlA5cAu8Z+PEk Y5w/i8Vx3y5HJJJLJk6GzWcO4iUnT8mtl/Xk97b0xKNm1YlFT62TCbfQdDvBuu/uXsyb whuaPqB4opMyFLAGBgygLT04nAndkPSbNc36FI+MtcQEUOmaZtawDDI9u8+rMLQ5IYZZ K+hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=rhWN8qCv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ly15si3808244ejb.649.2020.06.05.08.41.49; Fri, 05 Jun 2020 08:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=rhWN8qCv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728118AbgFEPjj (ORCPT + 99 others); Fri, 5 Jun 2020 11:39:39 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:37295 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbgFEPji (ORCPT ); Fri, 5 Jun 2020 11:39:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1591371578; x=1622907578; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=bpxi5R4bZVMT/3MFEoBfMtJ94Rym4esyRQkAw8vEPzE=; b=rhWN8qCv7RMgVHc/VHcpY7aFwUQzLaqZttX6qEi0w38/cSUbFC4tO7Vc dEUF9h3oZGR39lQZc0IkI6tKL8ury0zvAQ4oaAK8DNbKhR2QE6TP0hTqc xZby2CrjxuRu4D6YWEyp58DkeYJmSCkhwCl9pt/qZuRlKjp8RYvN/oPYd Y=; IronPort-SDR: 5oiTao/Y/+2/exBBlvBCg+94gByxVMIU/9O22P8t8Z8AeIwNGDtJumrAR2ISQ4Z93kHTD+Jt0A ePERMDp7myjg== X-IronPort-AV: E=Sophos;i="5.73,476,1583193600"; d="scan'208";a="34687396" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2b-4e24fd92.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 05 Jun 2020 15:39:36 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2b-4e24fd92.us-west-2.amazon.com (Postfix) with ESMTPS id EC151A1C39; Fri, 5 Jun 2020 15:39:34 +0000 (UTC) Received: from EX13D16EUB003.ant.amazon.com (10.43.166.99) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 5 Jun 2020 15:39:34 +0000 Received: from 38f9d34ed3b1.ant.amazon.com (10.43.160.90) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 5 Jun 2020 15:39:24 +0000 Subject: Re: [PATCH v3 01/18] nitro_enclaves: Add ioctl interface definition To: Stefan Hajnoczi CC: Benjamin Herrenschmidt , , Anthony Liguori , "Colm MacCarthaigh" , Bjoern Doebel , "David Woodhouse" , Frank van der Linden , Alexander Graf , Martin Pohlack , "Matt Wilson" , Paolo Bonzini , Balbir Singh , Stefano Garzarella , "Stefan Hajnoczi" , Stewart Smith , "Uwe Dannowski" , , References: <20200525221334.62966-1-andraprs@amazon.com> <20200525221334.62966-2-andraprs@amazon.com> <20200527084959.GA29137@stefanha-x1.localdomain> <20200605081503.GA59410@stefanha-x1.localdomain> From: "Paraschiv, Andra-Irina" Message-ID: <8dbf6822-d835-8c1f-64ff-3e07a77aa8f9@amazon.com> Date: Fri, 5 Jun 2020 18:39:15 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200605081503.GA59410@stefanha-x1.localdomain> Content-Language: en-US X-Originating-IP: [10.43.160.90] X-ClientProxiedBy: EX13D05UWB003.ant.amazon.com (10.43.161.26) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Content-Type: text/plain; charset="windows-1252"; format="flowed" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/06/2020 11:15, Stefan Hajnoczi wrote: > On Mon, Jun 01, 2020 at 10:20:18AM +0300, Paraschiv, Andra-Irina wrote: >> >> On 01/06/2020 06:02, Benjamin Herrenschmidt wrote: >>> On Wed, 2020-05-27 at 09:49 +0100, Stefan Hajnoczi wrote: >>>> What about feature bits or a API version number field? If you add >>>> features to the NE driver, how will userspace detect them? >>>> >>>> Even if you intend to always compile userspace against the exact kernel >>>> headers that the program will run on, it can still be useful to have an >>>> API version for informational purposes and to easily prevent user >>>> errors (running a new userspace binary on an old kernel where the API = is >>>> different). >>>> >>>> Finally, reserved struct fields may come in handy in the future. That >>>> way userspace and the kernel don't need to explicitly handle multiple >>>> struct sizes. >>> Beware, Greg might disagree :) >>> >>> That said, yes, at least a way to query the API version would be >>> useful. >> I see there are several thoughts with regard to extensions possibilities= . :) >> >> I added an ioctl for getting the API version, we have now a way to query >> that info. Also, I updated the sample in this patch series to check for = the >> API version. > Great. The ideas are orthogonal and not all of them need to be used > together. As long as their is a way of extending the API cleanly in the > future then extensions can be made without breaking userspace. Agree, as we achieve the ultimate goal of having a stable interface, = open for extensions without breaking changes. Thanks, Andra Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar= Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in R= omania. Registration number J22/2621/2005.