From: "Michael S. Tsirkin" <mst@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH RFC] virtio: add features qdev property
Date: Mon, 14 Dec 2009 15:59:15 +0200 [thread overview]
Message-ID: <20091214135915.GN973@redhat.com> (raw)
In-Reply-To: <m3y6l51y50.fsf@crossbow.pond.sub.org>
On Mon, Dec 14, 2009 at 02:30:19PM +0100, Markus Armbruster wrote:
> Gerd Hoffmann <kraxel@redhat.com> 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))
> >> features |= 1<< VIRTIO_BLK_F_RO;
> >
> > Sure you want these be configurable?
> >
> >> Also, I'd like these things to be saved in bits and not add a ton
> >> of fields in device. Ideas how to do this?
> >
> > I guess you only want disable features?
It's not an easy quesiton.
If we do it as disable bits, then we get incompatible
machines when running on different hosts.
Would it be better to fail instead?
> > You could have a bitmap property then, which accepts names for the
> > bits. It would need a table like this ...
> >
> > char *bitnames[] = {
> > [ VIRTIO_BLK_F_IDENTIFY ] = "blk-identify",
> > [ VIRTIO_BLK_F_RO [ = "blk-ro",
> > [ ... ]
> > };
> >
> > 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-hostile, because it
> requires quoting in the shell. What about '+'?
I am guessing that '|' parsing is already there,
but yes + would be a nice touch.
--
MST
next prev parent reply other threads:[~2009-12-14 14:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-13 20:43 [Qemu-devel] [PATCH RFC] virtio: add features qdev property Michael S. Tsirkin
2009-12-14 9:41 ` [Qemu-devel] " Gerd Hoffmann
2009-12-14 9:42 ` Michael S. Tsirkin
2009-12-14 10:24 ` Gerd Hoffmann
2009-12-14 11:10 ` Michael S. Tsirkin
2009-12-14 11:37 ` Gerd Hoffmann
2009-12-14 13:15 ` Michael S. Tsirkin
2009-12-14 13:30 ` Markus Armbruster
2009-12-14 13:59 ` Michael S. Tsirkin [this message]
2009-12-14 15:01 ` Gerd Hoffmann
2009-12-14 16:23 ` Michael S. Tsirkin
2009-12-14 17:18 ` Gerd Hoffmann
2009-12-14 19:17 ` Michael S. Tsirkin
2009-12-14 20:40 ` Gerd Hoffmann
2009-12-14 20:43 ` Michael S. Tsirkin
2009-12-14 21:12 ` Gerd Hoffmann
2009-12-14 21:14 ` Michael S. Tsirkin
2009-12-14 21:24 ` Gerd Hoffmann
2009-12-14 14:56 ` Gerd Hoffmann
2009-12-14 19:20 ` Michael S. Tsirkin
2009-12-14 20:42 ` Gerd Hoffmann
2009-12-14 11:50 ` Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091214135915.GN973@redhat.com \
--to=mst@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).