public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: penberg@kernel.org, john@jfloren.net, kvm@vger.kernel.org,
	asias.hejun@gmail.com, gorcunov@gmail.com,
	prasadjoshi124@gmail.com
Subject: Re: [PATCH v2 3/4] kvm tools: Use ioeventfd in virtio-net
Date: Sun, 29 May 2011 14:51:48 +0200	[thread overview]
Message-ID: <20110529125148.GA28836@elte.hu> (raw)
In-Reply-To: <1306513120-28794-3-git-send-email-levinsasha928@gmail.com>


* Sasha Levin <levinsasha928@gmail.com> wrote:

> Use ioeventfds to receive notifications of IO events in virtio-net.
> Doing so prevents an exit every time we receive/send a packet.
> 
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> ---
>  tools/kvm/virtio/net.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)

This needs the fix below to build on 32-bit.

Thanks,

	Ingo

Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c
index 5c39c43..6916af6 100644
--- a/tools/kvm/virtio/net.c
+++ b/tools/kvm/virtio/net.c
@@ -283,7 +283,7 @@ static bool virtio_net_pci_io_out(struct ioport *ioport, struct kvm *kvm, u16 po
 
 static void ioevent_callback(struct kvm *kvm, void *param)
 {
-	virtio_net_handle_callback(kvm, (u64)param);
+	virtio_net_handle_callback(kvm, (u64)(long)param);
 }
 
 static struct ioport_operations virtio_net_io_ops = {
@@ -416,7 +416,7 @@ void virtio_net__init(const struct virtio_net_parameters *params)
 				.io_len			= sizeof(u16),
 				.fn			= ioevent_callback,
 				.datamatch		= i,
-				.fn_ptr			= (void *)i,
+				.fn_ptr			= (void *)(long)i,
 				.fn_kvm			= params->kvm,
 				.fd			= eventfd(0, 0),
 			};


  reply	other threads:[~2011-05-29 12:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 16:18 [PATCH v2 1/4] kvm tools: Add ioeventfd support Sasha Levin
2011-05-27 16:18 ` [PATCH v2 2/4] kvm tools: Use ioeventfd in virtio-blk Sasha Levin
2011-05-27 16:18 ` [PATCH v2 3/4] kvm tools: Use ioeventfd in virtio-net Sasha Levin
2011-05-29 12:51   ` Ingo Molnar [this message]
2011-05-30 23:53   ` Asias He
2011-05-31  7:18     ` Pekka Enberg
2011-05-31 16:32       ` Sasha Levin
2011-06-01  1:41         ` Asias He
2011-06-01  6:35           ` Sasha Levin
2011-06-01 11:11             ` Asias He
2011-05-27 16:18 ` [PATCH v2 4/4] kvm tools: Use ioeventfd in virtio-rng Sasha Levin
2011-05-27 16:52 ` [PATCH v2 1/4] kvm tools: Add ioeventfd support Ingo Molnar
2011-05-29 11:55   ` Pekka Enberg

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=20110529125148.GA28836@elte.hu \
    --to=mingo@elte.hu \
    --cc=asias.hejun@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=john@jfloren.net \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=penberg@kernel.org \
    --cc=prasadjoshi124@gmail.com \
    /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