* 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>
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 = {
.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),
};