qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-balloon: virtio 1 support
Date: Mon, 13 Apr 2015 14:15:51 +0200	[thread overview]
Message-ID: <20150413141551.41daad1e.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20150413134908-mutt-send-email-mst@redhat.com>

On Mon, 13 Apr 2015 13:49:42 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Mon, Apr 13, 2015 at 01:35:21PM +0200, Cornelia Huck wrote:
> > On Mon, 13 Apr 2015 13:26:31 +0200
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > 
> > > On Mon, Apr 13, 2015 at 10:02:58AM +0200, Cornelia Huck wrote:
> > 
> > > > Also, doesn't get_features need to be modified as well so that
> > > > VERSION_1 is advertised?
> > > 
> > > virtio_pci_device_plugged seems to set it ATM. I'll re-test to confirm.
> > 
> > Indeed, pci sets it, but ccw does not. And virtio-net, for example,
> > sets it explicitly as well. We need to unify this :)
> 
> I'm inclined to set it in transport and black-list in specific devices.
> 

Agreed, let's set it in the transports.

For ccw, I'd probably only want to offer it once the driver has
negotiated a revision >= 1, so something like the following (untested):

diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 8b6b2ab..4d8cc24 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -703,6 +703,9 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
         dev->host_features =
             virtio_bus_get_vdev_features_rev(&dev->bus, dev->host_features,
                                              dev->revision >= 1 ? 1 : 0);
+        if (dev->revision >= 1) {
+            virtio_add_feature(&dev->host_features, VIRTIO_F_VERSION_1);
+        }
         break;
     default:
         ret = -ENOSYS;

  reply	other threads:[~2015-04-13 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-12 15:00 [Qemu-devel] [PATCH 1/2] virtio_balloon: header update for virtio 1 Michael S. Tsirkin
2015-04-12 15:00 ` [Qemu-devel] [PATCH 2/2] virtio-balloon: virtio 1 support Michael S. Tsirkin
2015-04-13  8:02   ` Cornelia Huck
2015-04-13 11:26     ` Michael S. Tsirkin
2015-04-13 11:35       ` Cornelia Huck
2015-04-13 11:49         ` Michael S. Tsirkin
2015-04-13 12:15           ` Cornelia Huck [this message]
2015-04-13 14:20       ` Cornelia Huck

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=20150413141551.41daad1e.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=aliguori@amazon.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.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).