Received: from eggs.gnu.org ([2001:4830:134:3::10]:56993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ZwD-0004AN-0t for qemu-devel@nongnu.org; Mon, 29 Jun 2015 10:21:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9Zw7-00082i-On for qemu-devel@nongnu.org; Mon, 29 Jun 2015 10:21:32 -0400 Received: from mail-qc0-f173.google.com ([209.85.216.173]:35673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9Zw7-00082W-Kx for qemu-devel@nongnu.org; Mon, 29 Jun 2015 10:21:27 -0400 Received: by qcmc1 with SMTP id c1so43211314qcm.2 for ; Mon, 29 Jun 2015 07:21:27 -0700 (PDT) Date: Mon, 29 Jun 2015 10:21:25 -0400 From: Kevin O'Connor Message-ID: <20150629142124.GE30040@morn.localdomain> References: <1435568020-8669-1-git-send-email-kraxel@redhat.com> <1435568020-8669-6-git-send-email-kraxel@redhat.com> <20150629131934.GA31640@morn.localdomain> <1435584959.30958.16.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435584959.30958.16.camel@redhat.com> Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH 05/18] virtio: add version 1.0 structs and #defines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: seabios@seabios.org, qemu-devel@nongnu.org, "Michael S. Tsirkin" On Mon, Jun 29, 2015 at 03:35:59PM +0200, Gerd Hoffmann wrote: > Hi, > > > > +typedef struct virtio_pci_common_cfg { > > > + /* About the whole device. */ > > > + u32 device_feature_select; /* read-write */ > > > > If I understand these structs correctly, they don't reside in memory, > > but instead represent an interface layout and are used with offsetof() > > and sizeof(). > > Correct. > > > If so, I think they should be marked with PACKED. > > They are carefully ordered and padded so that adding PACKED should not > change anything. The linux kernel has them without PACKED too. Okay - it's up to you. It helps a little with documentation - but moving to "std/" would acomplish the same thing. -Kevin