Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-15 Thread Gerd Hoffmann
Hi, > >> > >> Why do you think that? We have several header files which > >> use QEMU_BUILD_BUG_ON and I don't see any reason why > >> it would have to be invoked from a .c file. > > > Because Gerd wants to share this with linux uapi, and > > you can't use BUILD_BUG_ON in uapi headers on linux.

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-14 Thread Michael S. Tsirkin
On Sun, Sep 14, 2014 at 09:11:45AM -0700, Peter Maydell wrote: > On 14 September 2014 08:09, Michael S. Tsirkin wrote: > > On Sun, Sep 14, 2014 at 07:32:21AM -0700, Peter Maydell wrote: > >> Who owns the "master" copy of the header and commits > >> to making sure it builds on other things than Lin

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-14 Thread Peter Maydell
On 14 September 2014 08:09, Michael S. Tsirkin wrote: > On Sun, Sep 14, 2014 at 07:32:21AM -0700, Peter Maydell wrote: >> Who owns the "master" copy of the header and commits >> to making sure it builds on other things than Linux+gcc >> in that case? > For most of virtio neither linux nor QEMU ar

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-14 Thread Michael S. Tsirkin
On Sun, Sep 14, 2014 at 07:32:21AM -0700, Peter Maydell wrote: > On 14 September 2014 07:11, Michael S. Tsirkin wrote: > > On Sun, Sep 14, 2014 at 07:04:11AM -0700, Peter Maydell wrote: > >> On 14 September 2014 06:46, Michael S. Tsirkin wrote: > >> > BUILD_BUG_ON in linux, QEMU_BUILD_BUG_ON in Q

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-14 Thread Peter Maydell
On 14 September 2014 07:11, Michael S. Tsirkin wrote: > On Sun, Sep 14, 2014 at 07:04:11AM -0700, Peter Maydell wrote: >> On 14 September 2014 06:46, Michael S. Tsirkin wrote: >> > BUILD_BUG_ON in linux, QEMU_BUILD_BUG_ON in QEMU. >> > You have to stick it in a C file though, so it >> > won't be

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-14 Thread Michael S. Tsirkin
On Sun, Sep 14, 2014 at 07:04:11AM -0700, Peter Maydell wrote: > On 14 September 2014 06:46, Michael S. Tsirkin wrote: > > BUILD_BUG_ON in linux, QEMU_BUILD_BUG_ON in QEMU. > > You have to stick it in a C file though, so it > > won't be visible in this patch. > > Why do you think that? We have se

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-14 Thread Peter Maydell
On 14 September 2014 06:46, Michael S. Tsirkin wrote: > BUILD_BUG_ON in linux, QEMU_BUILD_BUG_ON in QEMU. > You have to stick it in a C file though, so it > won't be visible in this patch. Why do you think that? We have several header files which use QEMU_BUILD_BUG_ON and I don't see any reason w

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-12 Thread Peter Maydell
On 12 September 2014 13:48, Eric Blake wrote: > On 09/12/2014 04:44 AM, Gerd Hoffmann wrote: > +enum virtgpu_ctrl_type { +VIRTGPU_UNDEFINED = 0, + +/* 2d commands */ +VIRTGPU_CMD_GET_DISPLAY_INFO = 0x0100, >>> >>> Please consider also adding: >>> >>

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-12 Thread Eric Blake
On 09/12/2014 06:48 AM, Eric Blake wrote: > So if you need more ideas and a good read, check out > the comments in how gnulib does it (the link mentions GPLv3+, but that > file is also shipped as LGPLv2+ so it is compatible with qemu): > > git.savannah.gnu.org/cgit/gnulib.git/tree/lib/verify.h J

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-12 Thread Eric Blake
On 09/12/2014 04:44 AM, Gerd Hoffmann wrote: >>> +enum virtgpu_ctrl_type { >>> +VIRTGPU_UNDEFINED = 0, >>> + >>> +/* 2d commands */ >>> +VIRTGPU_CMD_GET_DISPLAY_INFO = 0x0100, >> >> Please consider also adding: >> >> #define VIRTGPU_CMD_GET_DISPLAY_INFO VIRTGPU_CMD_GET_DISP

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-12 Thread Gerd Hoffmann
Hi, > > @@ -0,0 +1,158 @@ > > +#ifndef VIRTGPU_HW_H > > +#define VIRTGPU_HW_H > > Non-trivial file, deserves a copyright and license notice. Added. > > + > > +enum virtgpu_ctrl_type { > > +VIRTGPU_UNDEFINED = 0, > > + > > +/* 2d commands */ > > +VIRTGPU_CMD_GET_DISPLAY

Re: [virtio-dev] Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-11 Thread Paolo Bonzini
> On Do, 2014-09-11 at 16:20 +0100, Peter Maydell wrote: > > On 11 September 2014 16:09, Gerd Hoffmann wrote: > > > This patch adds the header file with structs and defines for > > > the virtio based gpu device. Covers 2d operations only. > > > > Please don't cc subscriber only mailing lists > >

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-11 Thread Eric Blake
On 09/11/2014 09:09 AM, Gerd Hoffmann wrote: > This patch adds the header file with structs and defines for > the virtio based gpu device. Covers 2d operations only. > > Signed-off-by: Gerd Hoffmann > --- > include/hw/virtio/virtgpu_hw.h | 158 > + > 1 f

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-11 Thread Christopher Covington
On 09/11/2014 11:43 AM, Gerd Hoffmann wrote: > On Do, 2014-09-11 at 16:20 +0100, Peter Maydell wrote: >> On 11 September 2014 16:09, Gerd Hoffmann wrote: >>> This patch adds the header file with structs and defines for >>> the virtio based gpu device. Covers 2d operations only. >> >> Please don't

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-11 Thread Gerd Hoffmann
On Do, 2014-09-11 at 16:20 +0100, Peter Maydell wrote: > On 11 September 2014 16:09, Gerd Hoffmann wrote: > > This patch adds the header file with structs and defines for > > the virtio based gpu device. Covers 2d operations only. > > Please don't cc subscriber only mailing lists > (virtio-...@l

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-11 Thread Gerd Hoffmann
Hi, > > +enum virtgpu_ctrl_type { > > +VIRTGPU_UNDEFINED = 0, > > > > This is clearly all well out of line with our > coding style guide, which isn't a terribly good start... Oh yea, code style is fun. This file is needed in both qemu & linux kernel, which have different code styles.

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-11 Thread Peter Maydell
On 11 September 2014 16:09, Gerd Hoffmann wrote: > This patch adds the header file with structs and defines for > the virtio based gpu device. Covers 2d operations only. Please don't cc subscriber only mailing lists (virtio-...@lists.oasis-open.org) on posts to qemu-devel; it just means everybod

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-11 Thread Peter Maydell
On 11 September 2014 16:09, Gerd Hoffmann wrote: > This patch adds the header file with structs and defines for > the virtio based gpu device. Covers 2d operations only. > > Signed-off-by: Gerd Hoffmann > --- > include/hw/virtio/virtgpu_hw.h | 158 > + >