blob: 5cbf190d238cd083e128ae9ec78da52b745d6338 [file] [log] [blame]
Avi Kivity3f0852e2009-12-20 14:42:19 +02001#ifndef __KVM_COALESCED_MMIO_H__
2#define __KVM_COALESCED_MMIO_H__
3
Laurent Vivier5f94c172008-05-30 16:05:54 +02004/*
5 * KVM coalesced MMIO
6 *
7 * Copyright (c) 2008 Bull S.A.S.
8 *
9 * Author: Laurent Vivier <Laurent.Vivier@bull.net>
10 *
11 */
12
Avi Kivity980da6c2009-12-20 15:13:43 +020013#ifdef CONFIG_KVM_MMIO
14
Sasha Levin2b3c2462011-07-20 20:59:00 +030015#include <linux/list.h>
Laurent Vivier5f94c172008-05-30 16:05:54 +020016
17struct kvm_coalesced_mmio_dev {
Sasha Levin2b3c2462011-07-20 20:59:00 +030018 struct list_head list;
Laurent Vivier5f94c172008-05-30 16:05:54 +020019 struct kvm_io_device dev;
20 struct kvm *kvm;
Sasha Levin2b3c2462011-07-20 20:59:00 +030021 struct kvm_coalesced_mmio_zone zone;
Laurent Vivier5f94c172008-05-30 16:05:54 +020022};
23
24int kvm_coalesced_mmio_init(struct kvm *kvm);
Avi Kivity980da6c2009-12-20 15:13:43 +020025void kvm_coalesced_mmio_free(struct kvm *kvm);
Laurent Vivier5f94c172008-05-30 16:05:54 +020026int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm,
Kevin Mulvey0b8ba4a2015-06-16 07:34:00 -040027 struct kvm_coalesced_mmio_zone *zone);
Laurent Vivier5f94c172008-05-30 16:05:54 +020028int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm,
Kevin Mulvey0b8ba4a2015-06-16 07:34:00 -040029 struct kvm_coalesced_mmio_zone *zone);
Avi Kivity3f0852e2009-12-20 14:42:19 +020030
Avi Kivity980da6c2009-12-20 15:13:43 +020031#else
32
33static inline int kvm_coalesced_mmio_init(struct kvm *kvm) { return 0; }
34static inline void kvm_coalesced_mmio_free(struct kvm *kvm) { }
35
36#endif
37
Avi Kivity3f0852e2009-12-20 14:42:19 +020038#endif