Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225826 > unrolled thread

vhost: build failure

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2015-09-16 10:30 +0200
Last post2015-09-16 12:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  vhost: build failure Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-16 10:30 +0200
    Re: vhost: build failure "Michael S. Tsirkin" <mst@redhat.com> - 2015-09-16 10:40 +0200
      Re: vhost: build failure Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-16 12:00 +0200

#1225826 — vhost: build failure

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-09-16 10:30 +0200
Subjectvhost: build failure
Message-ID<q9ggi-7oR-23@gated-at.bofh.it>
Hi,
While crosscompiling the kernel for openrisc with allmodconfig the build
failed with the error:
drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
drivers/vhost/vhost.c:818:3: error: call to '__compiletime_assert_818' declared with attribute error: BUILD_BUG_ON failed: __alignof__
*vq->avail > VRING_AVAIL_ALIGN_SIZE

Can you please give me any idea about what the problem might be and how
it can be solved.

You can see the build log at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/80365425

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1225835

From"Michael S. Tsirkin" <mst@redhat.com>
Date2015-09-16 10:40 +0200
Message-ID<q9gpY-7A2-25@gated-at.bofh.it>
In reply to#1225826
On Wed, Sep 16, 2015 at 01:50:08PM +0530, Sudip Mukherjee wrote:
> Hi,
> While crosscompiling the kernel for openrisc with allmodconfig the build
> failed with the error:
> drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
> drivers/vhost/vhost.c:818:3: error: call to '__compiletime_assert_818' declared with attribute error: BUILD_BUG_ON failed: __alignof__
> *vq->avail > VRING_AVAIL_ALIGN_SIZE
> 
> Can you please give me any idea about what the problem might be and how
> it can be solved.
> 
> You can see the build log at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/80365425
> 
> regards
> sudip

Yes - I think I saw this already.
I think the openrisc cross-compiler is broken.

VRING_AVAIL_ALIGN_SIZE is 2

*vq->avail is:

struct vring_avail {
        __virtio16 flags;
        __virtio16 idx;
        __virtio16 ring[];
};

And __virtio16 is just a u16 with some sparse annotations.

Looking at openrisc architecture document:
	Operand:		Length		addr[3:0] if aligned
	Halfword (or half) 	2 bytes 	Xxx0

Type	C-TYPE        Sizeof Alignment Openrisc Equivalent
Short   Signed short    2      2       Signed halfword

and

16.1.2
Aggregates and Unions
Aggregates (structures and arrays) and unions assume the alignment of their most
strictly aligned element.

So to me, it looks like your gcc violates the ABI
by adding alignment requirements > 2.

-- 
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1225903

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-09-16 12:00 +0200
Message-ID<q9hFn-Ro-1@gated-at.bofh.it>
In reply to#1225835
On Wed, Sep 16, 2015 at 11:36:45AM +0300, Michael S. Tsirkin wrote:
> On Wed, Sep 16, 2015 at 01:50:08PM +0530, Sudip Mukherjee wrote:
> > Hi,
> > While crosscompiling the kernel for openrisc with allmodconfig the build
> > failed with the error:
> > drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
> > drivers/vhost/vhost.c:818:3: error: call to '__compiletime_assert_818' declared with attribute error: BUILD_BUG_ON failed: __alignof__
> > *vq->avail > VRING_AVAIL_ALIGN_SIZE
> > 
> > Can you please give me any idea about what the problem might be and how
> > it can be solved.
> > 
> > You can see the build log at:
> > https://travis-ci.org/sudipm-mukherjee/parport/jobs/80365425
> > 
> > regards
> > sudip
> 
> Yes - I think I saw this already.
> I think the openrisc cross-compiler is broken.
I thought so. Thanks for the quick reply. I will open a bug in gcc and
lets see what they say.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web