From: Mark McLoughlin <markmc@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm@vger.kernel.org, Anthony Liguori <aliguori@us.ibm.com>
Subject: [PATCH] kvm: qemu: virtio: enable VIRTIO_ZERO_COPY
Date: Thu, 11 Dec 2008 09:36:59 +0000 [thread overview]
Message-ID: <1228988219.7968.5.camel@blaa> (raw)
In-Reply-To: <1228325221-18106-7-git-send-email-aliguori@us.ibm.com>
On Wed, 2008-12-03 at 11:27 -0600, Anthony Liguori wrote:
> In the absence of a zero-copy API, we cannot touch physical memory directly.
> This patch introduces a #define to control whether we touch buffers directly,
> or bounce the buffers through cpu_physical_memory_rw.
>
> The #define is needed for merging virtio into upstream QEMU since zero-copy will
> not be accepted as-is. As a bonus, I also added physical memory dirtying
> support to the zero-copy case so now live migration should work when using
> virtio.
>
> With this patch, virtio is mergable into upstream QEMU (except for virtio-net,
> that's a different series though).
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c
> index 1a58940..9396580 100644
> --- a/qemu/hw/virtio.c
> +++ b/qemu/hw/virtio.c
> @@ -17,6 +17,8 @@
> #include "virtio.h"
> #include "sysemu.h"
>
> +//#define VIRTIO_ZERO_COPY
> +
From: Mark McLoughlin <markmc@redhat.com>
Subject: [PATCH] kvm: qemu: virtio: enable VIRTIO_ZERO_COPY
Anthony intended to enable VIRTIO_ZERO_COPY before submitting,
so do that now.
Fixes an oops in the bounce buffer malloc in virtqueue_pop()
I have seen twice so far. We still need to track this down,
but it's very hard to reproduce.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
qemu/hw/virtio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c
index 16356e8..1d06fcc 100644
--- a/qemu/hw/virtio.c
+++ b/qemu/hw/virtio.c
@@ -16,7 +16,7 @@
#include "virtio.h"
#include "sysemu.h"
-//#define VIRTIO_ZERO_COPY
+#define VIRTIO_ZERO_COPY
/* from Linux's linux/virtio_pci.h */
--
1.5.4.3
next prev parent reply other threads:[~2008-12-11 9:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-03 17:26 [PATCH 1/7] Fix whitespace in virtio Anthony Liguori
2008-12-03 17:26 ` [PATCH 2/7] Create virtio-blk.h header Anthony Liguori
2008-12-03 17:26 ` [PATCH 3/7] Create virtio-net.h header Anthony Liguori
2008-12-03 17:26 ` [PATCH 4/7] Move virtio_balloon_init to virtio-balloon.h Anthony Liguori
2008-12-03 17:26 ` [PATCH 5/7] Do not access virtio-rings directly Anthony Liguori
2008-12-03 17:27 ` [PATCH 6/7] Do not modify VirtQueueElement Anthony Liguori
2008-12-03 17:27 ` [PATCH 7/7] Optionally bounce the virtio buffers Anthony Liguori
2008-12-11 9:36 ` Mark McLoughlin [this message]
2008-12-14 8:39 ` [PATCH] kvm: qemu: virtio: enable VIRTIO_ZERO_COPY Avi Kivity
2008-12-04 12:06 ` [PATCH 6/7] Do not modify VirtQueueElement Mark McLoughlin
2008-12-05 17:38 ` [PATCH 1/7] Fix whitespace in virtio Avi Kivity
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=1228988219.7968.5.camel@blaa \
--to=markmc@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.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).