Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/14/09 22:14, Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 10:12:14PM +0100, Gerd Hoffmann wrote: On 12/14/09 21:43, Michael S. Tsirkin wrote: What do we put in e.g. 0.11 compat? Any features we enable there might not be supported by host. compat properties as usual? Sorry, I still

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 10:12:14PM +0100, Gerd Hoffmann wrote: > On 12/14/09 21:43, Michael S. Tsirkin wrote: >> What do we put in e.g. 0.11 compat? Any features we enable >> there might not be supported by host. > > compat properties as usual? > > Sorry, I still fail to see your problem. > > You'l

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/14/09 21:43, Michael S. Tsirkin wrote: What do we put in e.g. 0.11 compat? Any features we enable there might not be supported by host. compat properties as usual? Sorry, I still fail to see your problem. You'll have a 'disable' bitmap. Fill it via 'features='. Or using separate prope

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 09:40:28PM +0100, Gerd Hoffmann wrote: > On 12/14/09 20:17, Michael S. Tsirkin wrote: >> On Mon, Dec 14, 2009 at 06:18:29PM +0100, Gerd Hoffmann wrote: >>> On 12/14/09 17:23, Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 04:01:33PM +0100, Gerd Hoffmann wrote: S

[Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
-device 'virtio-blk-pci,disable=blk-identify|ring-indirect' The driver will just do 'vdev->host_features&= ~disable'. cheers, Gerd Is there an example of an existing property that is like this? No. A new property type is needed for this. cheers, Gerd

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/14/09 20:17, Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 06:18:29PM +0100, Gerd Hoffmann wrote: On 12/14/09 17:23, Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 04:01:33PM +0100, Gerd Hoffmann wrote: So how do you do this? Assume we have -disable_hw_csum. We want new machine typ

[Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 12:37:29PM +0100, Gerd Hoffmann wrote: > On 12/14/09 12:10, Michael S. Tsirkin wrote: >> On Mon, Dec 14, 2009 at 11:24:41AM +0100, Gerd Hoffmann wrote: >> for block: >> if (strcmp(s->serial_str, "0")) >> features |= 1<< VIRTIO_BLK_F_IDENTIFY; >> >> if (bd

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 06:18:29PM +0100, Gerd Hoffmann wrote: > On 12/14/09 17:23, Michael S. Tsirkin wrote: >> On Mon, Dec 14, 2009 at 04:01:33PM +0100, Gerd Hoffmann wrote: >> So how do you do this? >> Assume we have -disable_hw_csum. >> We want new machine type to have it off, right? >> But now

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/14/09 17:23, Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 04:01:33PM +0100, Gerd Hoffmann wrote: So how do you do this? Assume we have -disable_hw_csum. We want new machine type to have it off, right? But now you run qemu on host which does not support hw_csum. With your suggestion it

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 04:01:33PM +0100, Gerd Hoffmann wrote: > On 12/14/09 14:59, Michael S. Tsirkin wrote: >> It's not an easy quesiton. >> If we do it as disable bits, then we get incompatible >> machines when running on different hosts. > > In case that one host supports feature which the othe

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/14/09 14:59, Michael S. Tsirkin wrote: It's not an easy quesiton. If we do it as disable bits, then we get incompatible machines when running on different hosts. In case that one host supports feature which the other doesn't and the feature isn't masked out? Well, management failure I'd

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/14/09 14:30, Markus Armbruster wrote: Then the property parser would accepts strings such as 'bit1|bit2' and you can have -device 'virtio-blk-pci,disable=blk-identify|ring-indirect' The driver will just do 'vdev->host_features&= ~disable'. Use of '|' in option argument syntax is user

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 02:30:19PM +0100, Markus Armbruster wrote: > Gerd Hoffmann writes: > > > On 12/14/09 12:10, Michael S. Tsirkin wrote: > >> On Mon, Dec 14, 2009 at 11:24:41AM +0100, Gerd Hoffmann wrote: > >> for block: > >> if (strcmp(s->serial_str, "0")) > >> features |= 1<<

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Markus Armbruster
Gerd Hoffmann writes: > On 12/14/09 12:10, Michael S. Tsirkin wrote: >> On Mon, Dec 14, 2009 at 11:24:41AM +0100, Gerd Hoffmann wrote: >> for block: >> if (strcmp(s->serial_str, "0")) >> features |= 1<< VIRTIO_BLK_F_IDENTIFY; >> >> if (bdrv_is_read_only(s->bs)) >> fea

[Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 12:37:29PM +0100, Gerd Hoffmann wrote: > On 12/14/09 12:10, Michael S. Tsirkin wrote: >> On Mon, Dec 14, 2009 at 11:24:41AM +0100, Gerd Hoffmann wrote: >> for block: >> if (strcmp(s->serial_str, "0")) >> features |= 1<< VIRTIO_BLK_F_IDENTIFY; >> >> if (bd

Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Alexander Graf
Am 14.12.2009 um 12:10 schrieb "Michael S. Tsirkin" : On Mon, Dec 14, 2009 at 11:24:41AM +0100, Gerd Hoffmann wrote: On 12/14/09 10:42, Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 10:41:26AM +0100, Gerd Hoffmann wrote: On 12/13/09 21:43, Michael S. Tsirkin wrote: Add features property

[Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/14/09 12:10, Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 11:24:41AM +0100, Gerd Hoffmann wrote: for block: if (strcmp(s->serial_str, "0")) features |= 1<< VIRTIO_BLK_F_IDENTIFY; if (bdrv_is_read_only(s->bs)) features |= 1<< VIRTIO_BLK_F_RO; Sure you wa

[Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 11:24:41AM +0100, Gerd Hoffmann wrote: > On 12/14/09 10:42, Michael S. Tsirkin wrote: >> On Mon, Dec 14, 2009 at 10:41:26AM +0100, Gerd Hoffmann wrote: >>> On 12/13/09 21:43, Michael S. Tsirkin wrote: Add features property to virtio. This makes it possible to e.g.

[Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/14/09 10:42, Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 10:41:26AM +0100, Gerd Hoffmann wrote: On 12/13/09 21:43, Michael S. Tsirkin wrote: Add features property to virtio. This makes it possible to e.g. define machine without indirect buffer support, which is required for 0.10 com

[Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 10:41:26AM +0100, Gerd Hoffmann wrote: > On 12/13/09 21:43, Michael S. Tsirkin wrote: >> Add features property to virtio. This makes it >> possible to e.g. define machine without indirect >> buffer support, which is required for 0.10 >> compatibility. or without hardware che

[Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property

2009-12-14 Thread Gerd Hoffmann
On 12/13/09 21:43, Michael S. Tsirkin wrote: Add features property to virtio. This makes it possible to e.g. define machine without indirect buffer support, which is required for 0.10 compatibility. or without hardware checksum support, which is required for 0.11 compatibility. I'd suggest to a