Message ID | 1423746533-45739-3-git-send-email-jfrei@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On 12 February 2015 at 13:08, Jens Freimann <jfrei@linux.vnet.ibm.com> wrote: > We have defines for VIRTIO_TRANSPORT_F_START/_END in two places. > In include/hw/virtio/virtio.h and in linux-headers/linux/virtio_config.h > > Since we already get virtio_config.h via update-linux-headers.sh, > there's no need to have duplicate defines in QEMU headers files. > > Let's remove this define from include/hw/virtio/virtio.h Isn't this going to break compilation on non-linux hosts? They don't get linux-headers/ on their include path, so our virtio.h is their only source for this define... -- PMM
On Thu, Feb 12, 2015 at 02:41:15PM +0000, Peter Maydell wrote: > On 12 February 2015 at 13:08, Jens Freimann <jfrei@linux.vnet.ibm.com> wrote: > > We have defines for VIRTIO_TRANSPORT_F_START/_END in two places. > > In include/hw/virtio/virtio.h and in linux-headers/linux/virtio_config.h > > > > Since we already get virtio_config.h via update-linux-headers.sh, > > there's no need to have duplicate defines in QEMU headers files. > > > > Let's remove this define from include/hw/virtio/virtio.h > > Isn't this going to break compilation on non-linux hosts? > They don't get linux-headers/ on their include path, so > our virtio.h is their only source for this define... Ok, that's a fair point that I didn't think of. What's the correct way to fix this then? Change our virtio.h manually? In a separate commit or in the one generated by update-linux-headers (so we don't break bisect)? Jens > > -- PMM >
On Thu, 12 Feb 2015 15:53:49 +0100 Jens Freimann <jfrei@linux.vnet.ibm.com> wrote: > On Thu, Feb 12, 2015 at 02:41:15PM +0000, Peter Maydell wrote: > > On 12 February 2015 at 13:08, Jens Freimann <jfrei@linux.vnet.ibm.com> wrote: > > > We have defines for VIRTIO_TRANSPORT_F_START/_END in two places. > > > In include/hw/virtio/virtio.h and in linux-headers/linux/virtio_config.h > > > > > > Since we already get virtio_config.h via update-linux-headers.sh, > > > there's no need to have duplicate defines in QEMU headers files. > > > > > > Let's remove this define from include/hw/virtio/virtio.h > > > > Isn't this going to break compilation on non-linux hosts? > > They don't get linux-headers/ on their include path, so > > our virtio.h is their only source for this define... > > Ok, that's a fair point that I didn't think of. What's the correct way > to fix this then? Change our virtio.h manually? In a separate commit > or in the one generated by update-linux-headers (so we don't break bisect)? I think this is fixed by MST's standard headers patch series.
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index f24997d..f0350db 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -35,11 +35,6 @@ /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 -/* Some virtio feature bits (currently bits 28 through 31) are reserved for the - * transport being used (eg. virtio_ring), the rest are per-device feature bits. */ -#define VIRTIO_TRANSPORT_F_START 28 -#define VIRTIO_TRANSPORT_F_END 32 - /* We notify when the ring is completely used, even if the guest is suppressing * callbacks */ #define VIRTIO_F_NOTIFY_ON_EMPTY 24
We have defines for VIRTIO_TRANSPORT_F_START/_END in two places. In include/hw/virtio/virtio.h and in linux-headers/linux/virtio_config.h Since we already get virtio_config.h via update-linux-headers.sh, there's no need to have duplicate defines in QEMU headers files. Let's remove this define from include/hw/virtio/virtio.h Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> --- include/hw/virtio/virtio.h | 5 ----- 1 file changed, 5 deletions(-)