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


Groups > linux.kernel > #1436276 > unrolled thread

Re: Build regressions/improvements in v4.7-rc6

Started byGeert Uytterhoeven <geert@linux-m68k.org>
First post2016-07-04 10:30 +0200
Last post2016-07-04 13:10 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Build regressions/improvements in v4.7-rc6 Geert Uytterhoeven <geert@linux-m68k.org> - 2016-07-04 10:30 +0200
    Re: Build regressions/improvements in v4.7-rc6 Arnd Bergmann <arnd@arndb.de> - 2016-07-04 11:20 +0200
      Re: Build regressions/improvements in v4.7-rc6 Paolo Bonzini <pbonzini@redhat.com> - 2016-07-04 13:10 +0200

#1436276 — Re: Build regressions/improvements in v4.7-rc6

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-07-04 10:30 +0200
SubjectRe: Build regressions/improvements in v4.7-rc6
Message-ID<rR7qq-3hN-27@gated-at.bofh.it>
On Mon, Jul 4, 2016 at 10:12 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> JFYI, when comparing v4.7-rc6[1] to v4.7-rc5[3], the summaries are:
>   - build errors: +3/-2

  + /home/kisskb/slave/src/drivers/vhost/vhost.c: error: call to
'__compiletime_assert_844' declared with attribute error: BUILD_BUG_ON
failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE:  => 844:3

arm-randconfig

> [1] http://kisskb.ellerman.id.au/kisskb/head/10562/ (260 out of 263 configs)
> [3] http://kisskb.ellerman.id.au/kisskb/head/10532/ (260 out of 263 configs)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [next] | [standalone]


#1436363

FromArnd Bergmann <arnd@arndb.de>
Date2016-07-04 11:20 +0200
Message-ID<rR8cO-3NA-13@gated-at.bofh.it>
In reply to#1436276
On Monday, July 4, 2016 10:21:45 AM CEST Geert Uytterhoeven wrote:
> On Mon, Jul 4, 2016 at 10:12 AM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
> > JFYI, when comparing v4.7-rc6[1] to v4.7-rc5[3], the summaries are:
> >   - build errors: +3/-2
> 
>   + /home/kisskb/slave/src/drivers/vhost/vhost.c: error: call to
> '__compiletime_assert_844' declared with attribute error: BUILD_BUG_ON
> failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE:  => 844:3
> 
> arm-randconfig
> 
> > [1] http://kisskb.ellerman.id.au/kisskb/head/10562/ (260 out of 263 configs)
> > [3] http://kisskb.ellerman.id.au/kisskb/head/10532/ (260 out of 263 configs)

I don't see any changes in the code in this time frame, but this is the
code causing it:


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

/* The virtqueue structure describes a queue attached to a device. */
struct vhost_virtqueue {
        struct vhost_dev *dev;
                        
        /* The actual ring of buffers. */
        struct mutex mutex; 
        unsigned int num; 
        struct vring_desc __user *desc;
        struct vring_avail __user *avail;
        struct vring_used __user *used;
        ...
};

	struct vhost_virtqueue *vq;
   BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);


The alignment of the *vq->avail should be '2' on all architectures,
however an ARM OABI compiler will have a padded structure with alignment '4'.

Looking at the build logs, I find it only in a single randconfig build
at http://kisskb.ellerman.id.au/kisskb/buildresult/12735927/ which apparently
enabled the vhost driver in combination with ARM_AEABI=n.

In my own randconfig builds I am forcing ARM_AEABI=y because there are a
couple of other problems with OABI.

If we want to avoid this one, we could make the inclusion of
drivers/vhost/Kconfig from arch/arm/kvm/Kconfig depend on CONFIG_AEABI,
or perhaps go further force-enable CONFIG_AEABI for ARMv6k and higher
(cmpxchg64() is broken on OABI too), and only include vhost if KVM
is enabled (KVM in turn requires ARMv7).

	Arnd

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


#1436401

FromPaolo Bonzini <pbonzini@redhat.com>
Date2016-07-04 13:10 +0200
Message-ID<rR9Vf-4SC-3@gated-at.bofh.it>
In reply to#1436363

On 04/07/2016 11:17, Arnd Bergmann wrote:
> 
> If we want to avoid this one, we could make the inclusion of
> drivers/vhost/Kconfig from arch/arm/kvm/Kconfig depend on CONFIG_AEABI,
> or perhaps go further force-enable CONFIG_AEABI for ARMv6k and higher
> (cmpxchg64() is broken on OABI too), and only include vhost if KVM
> is enabled (KVM in turn requires ARMv7).

I don't think it is correct to include vhost only if KVM is enabled.
vhost is an implementation of virtio; it is usually used together with
KVM but there's no dependency between the two.

Paolo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web