David Gibson
2015-Jan-29 00:11 UTC
[Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits
On Wed, Jan 28, 2015 at 04:59:45PM +0100, Cornelia Huck wrote:> On Thu, 22 Jan 2015 12:43:43 +1100 > David Gibson <david at gibson.dropbear.id.au> wrote: > > > On Thu, Dec 11, 2014 at 02:25:07PM +0100, Cornelia Huck wrote: > > > With virtio-1, we support more than 32 feature bits. Let's extend both > > > host and guest features to 64, which should suffice for a while. > > > > > > vhost and migration have been ignored for now. > > > > [snip] > > > > > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > > > index f6c0379..08141c7 100644 > > > --- a/include/hw/virtio/virtio.h > > > +++ b/include/hw/virtio/virtio.h > > > @@ -55,6 +55,12 @@ > > > /* A guest should never accept this. It implies negotiation is broken. */ > > > #define VIRTIO_F_BAD_FEATURE 30 > > > > > > +/* v1.0 compliant. */ > > > +#define VIRTIO_F_VERSION_1 32 > > > > This is already in the kernel header, isn't it?> > Yes. But nearly all files include this header but not the kernel > header.Can't you change that? Or this file include the kernel header? -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20150129/773c47ea/attachment.sig>
Thomas Huth
2015-Jan-29 09:24 UTC
[Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits
Hi, On Thu, 29 Jan 2015 11:11:32 +1100 David Gibson <david at gibson.dropbear.id.au> wrote:> On Wed, Jan 28, 2015 at 04:59:45PM +0100, Cornelia Huck wrote: > > On Thu, 22 Jan 2015 12:43:43 +1100 > > David Gibson <david at gibson.dropbear.id.au> wrote: > > > > > On Thu, Dec 11, 2014 at 02:25:07PM +0100, Cornelia Huck wrote: > > > > With virtio-1, we support more than 32 feature bits. Let's extend both > > > > host and guest features to 64, which should suffice for a while. > > > > > > > > vhost and migration have been ignored for now. > > > > > > [snip] > > > > > > > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > > > > index f6c0379..08141c7 100644 > > > > --- a/include/hw/virtio/virtio.h > > > > +++ b/include/hw/virtio/virtio.h > > > > @@ -55,6 +55,12 @@ > > > > /* A guest should never accept this. It implies negotiation is broken. */ > > > > #define VIRTIO_F_BAD_FEATURE 30 > > > > > > > > +/* v1.0 compliant. */ > > > > +#define VIRTIO_F_VERSION_1 32 > > > > > > This is already in the kernel header, isn't it? > > > > > Yes. But nearly all files include this header but not the kernel > > header. > > Can't you change that? Or this file include the kernel header?AFAIK non-KVM code should never try to include one of the Linux headers to avoid breaking on non-Linux platforms (for example <linux/types.h> is not available on OS X, see http://patchwork.ozlabs.org/patch/424655/ ). So it's a little bit ugly to define these things twice, but it seems the only way to stay portable. Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20150129/760f55bb/attachment-0001.sig>
David Gibson
2015-Jan-29 10:01 UTC
[Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits
On Thu, Jan 29, 2015 at 10:24:00AM +0100, Thomas Huth wrote:> > Hi, > > On Thu, 29 Jan 2015 11:11:32 +1100 > David Gibson <david at gibson.dropbear.id.au> wrote: > > > On Wed, Jan 28, 2015 at 04:59:45PM +0100, Cornelia Huck wrote: > > > On Thu, 22 Jan 2015 12:43:43 +1100 > > > David Gibson <david at gibson.dropbear.id.au> wrote: > > > > > > > On Thu, Dec 11, 2014 at 02:25:07PM +0100, Cornelia Huck wrote: > > > > > With virtio-1, we support more than 32 feature bits. Let's extend both > > > > > host and guest features to 64, which should suffice for a while. > > > > > > > > > > vhost and migration have been ignored for now. > > > > > > > > [snip] > > > > > > > > > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > > > > > index f6c0379..08141c7 100644 > > > > > --- a/include/hw/virtio/virtio.h > > > > > +++ b/include/hw/virtio/virtio.h > > > > > @@ -55,6 +55,12 @@ > > > > > /* A guest should never accept this. It implies negotiation is broken. */ > > > > > #define VIRTIO_F_BAD_FEATURE 30 > > > > > > > > > > +/* v1.0 compliant. */ > > > > > +#define VIRTIO_F_VERSION_1 32 > > > > > > > > This is already in the kernel header, isn't it? > > > > > > > > Yes. But nearly all files include this header but not the kernel > > > header. > > > > Can't you change that? Or this file include the kernel header? > > AFAIK non-KVM code should never try to include one of the Linux headers > to avoid breaking on non-Linux platforms (for example <linux/types.h> is > not available on OS X, see http://patchwork.ozlabs.org/patch/424655/ ). > So it's a little bit ugly to define these things twice, but it seems > the only way to stay portable.Ah, yeah, good point. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20150129/b35f2b3f/attachment.sig>
Apparently Analagous Threads
- [Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits
- [Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits
- [Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits
- [Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits
- [Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits