From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ZEI-0007tT-0R for qemu-devel@nongnu.org; Mon, 29 Jun 2015 09:36:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9ZEC-0003gG-I8 for qemu-devel@nongnu.org; Mon, 29 Jun 2015 09:36:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ZEC-0003fO-7y for qemu-devel@nongnu.org; Mon, 29 Jun 2015 09:36:04 -0400 Message-ID: <1435584959.30958.16.camel@redhat.com> From: Gerd Hoffmann Date: Mon, 29 Jun 2015 15:35:59 +0200 In-Reply-To: <20150629131934.GA31640@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> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel@nongnu.org, "Michael S. Tsirkin" 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. > BTW, it would be nice (but certainly not required) to move these types > of interface definitions to a new virtio header in the std/ directory. Can do that. cheers, Gerd