]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Fix virtio net build breakage on 32-bit
authorIngo Molnar <mingo@elte.hu>
Sun, 29 May 2011 12:51:48 +0000 (14:51 +0200)
committerPekka Enberg <penberg@kernel.org>
Sun, 29 May 2011 13:06:27 +0000 (16:06 +0300)
* 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.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/virtio/net.c

index 5c39c437086c9534cab969adec6f9dd2ae7e3324..6916af60dc4ddc5777dd6cf77c66a95dab517c6f 100644 (file)
@@ -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),
                        };