public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio_ring: make structure defines packed
Date: Sun, 10 Feb 2008 03:18:06 +0100	[thread overview]
Message-ID: <200802100318.07877.arnd@arndb.de> (raw)
In-Reply-To: <47AE4A82.3030504@codemonkey.ws>

On Sunday 10 February 2008, you wrote:
> Christian Borntraeger wrote:
> >  struct vring_used
> >  {
> >       __u16 flags;
> >       __u16 idx;
> > +     __u32 padding;
> >       struct vring_used_elem ring[];
> > -};
> > +} __attribute__ ((packed));
> >   
> 
> This padding that you've put in is not something that would normally 
> occur on x86.  I've checked with GCC on 32-bit and 64-bit and neither 
> would include that padding.  Is that padding included on s390?

No, it is not included on any architecture that is supported by Linux.
The only tricky case to watch out is if vring_used_elem contained
a __u64 member. In that case, the alignment would be 32 bits on x86 and
64 bits on s390, powerpc, mips and parisc.

	Arnd <><

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  reply	other threads:[~2008-02-10  2:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 13:01 [PATCH] virtio_ring: make structure defines packed Christian Borntraeger
2008-02-09  8:56 ` Arnd Bergmann
2008-02-10  0:51 ` Anthony Liguori
2008-02-10  2:18   ` Arnd Bergmann [this message]
2008-02-10  6:32 ` ron minnich
2008-02-11 12:55   ` Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802100318.07877.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=anthony@codemonkey.ws \
    --cc=borntraeger@de.ibm.com \
    --cc=ehrhardt@linux.vnet.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox