blob: b280c20444d1546434e1381a52c723098d564f6c [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 Levin2b3c246a2011-07-20 20:59:00 +030015#include <linux/list.h>
Laurent Vivier5f94c172008-05-30 16:05:54 +020016
17struct kvm_coalesced_mmio_dev {
Sasha Levin2b3c246a2011-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 Levin2b3c246a2011-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,
27 struct kvm_coalesced_mmio_zone *zone);
28int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm,
29 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