Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp144637ybg; Sun, 31 May 2020 19:55:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9i5LdrFh1ysB33jUT50DUybpwlINulPmR5qQGOkTlSXhOBCvbXsF+psF9I0YqRKN6glB0 X-Received: by 2002:a17:906:6686:: with SMTP id z6mr12108515ejo.258.1590980146272; Sun, 31 May 2020 19:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590980146; cv=none; d=google.com; s=arc-20160816; b=FPnBzettFivu1p4N0xWHN/G9fx6bRWZEaiFQ+2CxuNWJ+SWQJiAGvBC31GWNC2b1D5 CDfGXink4q+onff80Qq40mtf3DcU6cUs0ZQVLNsDjfSGHbSdafgG1KcAy/t1iyRTaKua ePWXsy4/Iihyk9/N1pKtE4NVmnqOjzCIwG7OSkhKMMDUMjU/RMXn+Vprp6DsolDIBQfD is5eE4MN8xkYXSUk/4r29OeEZZfDcyrSuaY1A4ofqX0GKPm6elobj1xHxs+CLTiuqT02 qYBRxcemO3GNLroIC9mBRbcmB56+lVFe2QUe0DTG72xWCBLx2rQ5puJt9dUQ1zAvKyy2 WedA== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=8bv38r7PltN4X+fRXaHI/PD8U5pCI5F+RxGrYuPQO/w=; b=t7t3cGIAtkhBv8Y2PGskvaemwBVPQ2Oy/z3rbniz4ohzSXwhbytk/P4NpWnGvu5L8g IfVamr+hDzcFxJ4umPigIqYgRS0Qn9epaYg4lWjH6NpJUB2DEIYTmvawMjkraB2bmnFB NU0e+FKkAyjqZMD5SJ/HnEC+k8/phjlyRfKaQJISMgaQiNQlBicHAJe9u+nCthS7UJvB G8DususmeSZlySoJ3b/n7chSZE6vbwogC16LCtfw+MMtyeeZVhP9IfU5btXUAmSCiFQE 5blO0hqoNvSIPDlZxI3QJ+qA35W0RsYyXKIrsIZ8WB5DzxolbI/I2orVW9v17dNHcU9I +G3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qh14si1603263ejb.259.2020.05.31.19.55.23; Sun, 31 May 2020 19:55:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727814AbgFACxf (ORCPT + 99 others); Sun, 31 May 2020 22:53:35 -0400 Received: from kernel.crashing.org ([76.164.61.194]:53914 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbgFACxf (ORCPT ); Sun, 31 May 2020 22:53:35 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 0512rEYW003141 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 31 May 2020 21:53:18 -0500 Message-ID: <6bc1b1febd8b8b1ed8d86bc0951637ed521ca2d5.camel@kernel.crashing.org> Subject: Re: [PATCH v3 02/18] nitro_enclaves: Define the PCI device interface From: Benjamin Herrenschmidt To: "Paraschiv, Andra-Irina" , Greg KH Cc: linux-kernel@vger.kernel.org, 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 , kvm@vger.kernel.org, ne-devel-upstream@amazon.com Date: Mon, 01 Jun 2020 12:53:13 +1000 In-Reply-To: References: <20200525221334.62966-1-andraprs@amazon.com> <20200525221334.62966-3-andraprs@amazon.com> <20200526064455.GA2580530@kroah.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-05-26 at 20:01 +0300, Paraschiv, Andra-Irina wrote: > > On 26/05/2020 09:44, Greg KH wrote: > > On Tue, May 26, 2020 at 01:13:18AM +0300, Andra Paraschiv wrote: > > > +struct enclave_get_slot_req { > > > + /* Context ID (CID) for the enclave vsock device. */ > > > + u64 enclave_cid; > > > +} __attribute__ ((__packed__)); > > > > Can you really "pack" a single member structure? > > > > Anyway, we have better ways to specify this instead of the "raw" > > __attribute__ option. But first see if you really need any of > > these, at > > first glance, I do not think you do at all, and they can all be > > removed. > > There are a couple of data structures with more than one member and > multiple field sizes. And for the ones that are not, gathered as > feedback from previous rounds of review that should consider adding > a > "flags" field in there for further extensibility. > > I can modify to have "__packed" instead of the attribute callout. I tend to prefer designing the protocol so that all the fields are naturally aligned, which should avoid the need for the attribute. Is it possible in this case ? Cheers, Ben.