From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
virtualization@lists.linux-foundation.org,
Anthony Liguori <anthony@codemonkey.ws>,
kvm@vger.kernel.org, avi@redhat.com,
Carsten Otte <cotte@de.ibm.com>
Subject: Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
Date: Tue, 12 May 2009 10:55:58 +0200 [thread overview]
Message-ID: <200905121055.58304.borntraeger@de.ibm.com> (raw)
In-Reply-To: <20090511221932.GA22915@redhat.com>
Am Tuesday 12 May 2009 00:19:32 schrieb Michael S. Tsirkin:
> This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations,
> and updates all drivers. This is needed for MSI support, because MSI
> needs to know the total number of vectors upfront.
[...]
> diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
This file contains several copy/paste breakages and needs at least the
patch below to compile.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
drivers/s390/kvm/kvm_virtio.c | 28 +++++++---------------------
1 file changed, 7 insertions(+), 21 deletions(-)
Index: kvm/drivers/s390/kvm/kvm_virtio.c
===================================================================
--- kvm.orig/drivers/s390/kvm/kvm_virtio.c
+++ kvm/drivers/s390/kvm/kvm_virtio.c
@@ -237,23 +237,23 @@ static void kvm_del_vqs(struct virtio_de
int i;
if (!kdev->vqs)
return;
- for (i = 0; i < ldev->nvqs; ++i)
+ for (i = 0; i < kdev->nvqs; ++i)
kvm_del_vq(kdev->vqs[i]);
- kfree(ldev->vqs);
- ldev->vqs = NULL;
- ldev->nvqs = 0;
+ kfree(kdev->vqs);
+ kdev->vqs = NULL;
+ kdev->nvqs = 0;
}
static int kvm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
- struct virtqueue *vqs[]
- void (*callbacks)[](struct virtqueue *))
+ struct virtqueue *vqs[],
+ virtqueue_callback *callbacks[])
{
struct kvm_device *kdev = to_kvmdev(vdev);
int i;
/* We must have this many virtqueues. */
if (nvqs > kdev->desc->num_vq)
- return ERR_PTR(-ENOENT);
+ return -ENOENT;
kdev->vqs = kmalloc(GFP_KERNEL, nvqs * sizeof *kdev->vqs);
if (!kdev->vqs)
@@ -272,20 +272,6 @@ error:
return PTR_ERR(vqs[i]);
}
-static void kvm_del_vqs(struct virtio_device *vdev)
-{
- struct lguest_device *ldev = to_lgdev(vdev);
- int i;
-
- if (!ldev->vqs)
- return;
- for (i = 0; i < ldev->nvqs; ++i)
- lg_del_vq(ldev->vqs[i]);
- kfree(ldev->vqs);
- ldev->vqs = NULL;
- ldev->nvqs = 0;
-}
-
/*
* The config ops structure as defined by virtio config
*/
next prev parent reply other threads:[~2009-05-12 8:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1242080138.git.mst@redhat.com>
2009-05-11 22:19 ` [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations Michael S. Tsirkin
2009-05-12 8:55 ` Christian Borntraeger [this message]
2009-05-12 14:30 ` Rusty Russell
2009-05-12 15:33 ` Michael S. Tsirkin
2009-05-13 1:17 ` Rusty Russell
2009-05-13 7:18 ` Michael S. Tsirkin
2009-05-13 7:26 ` Avi Kivity
2009-05-13 11:33 ` Rusty Russell
2009-05-11 22:19 ` [PATCH 2/3] virtio_pci: split up vp_interrupt Michael S. Tsirkin
2009-05-11 22:19 ` [PATCH 3/3] virtio_pci: optional MSI-X support Michael S. Tsirkin
[not found] <cover.1241700929.git.mst@redhat.com>
2009-05-07 14:10 ` [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations Michael S. Tsirkin
2009-05-08 7:07 ` Rusty Russell
2009-05-08 12:48 ` Michael S. Tsirkin
2009-05-10 4:07 ` Rusty Russell
2009-05-10 7:25 ` Michael S. Tsirkin
2009-05-12 13:03 ` Rusty Russell
2009-05-10 18:51 ` Christian Borntraeger
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=200905121055.58304.borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=cotte@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--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