[tip:tools/kvm] kvm tools: Fix virtio net build breakage on 32-bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  6dfc8581f14d355a89e7edaf4394ee8c69177f1f
Gitweb:     http://git.kernel.org/tip/6dfc8581f14d355a89e7edaf4394ee8c69177f1f
Author:     Ingo Molnar <mingo@xxxxxxx>
AuthorDate: Sun, 29 May 2011 14:51:48 +0200
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Sun, 29 May 2011 16:06:27 +0300

kvm tools: Fix virtio net build breakage on 32-bit

* Sasha Levin <levinsasha928@xxxxxxxxx> 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@xxxxxxxxx>
> ---
>  tools/kvm/virtio/net.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)

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

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/virtio/net.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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),
 			};
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux