Avi Kivity | 3f0852e | 2009-12-20 14:42:19 +0200 | [diff] [blame] | 1 | #ifndef __KVM_COALESCED_MMIO_H__ |
| 2 | #define __KVM_COALESCED_MMIO_H__ |
| 3 | |
Laurent Vivier | 5f94c17 | 2008-05-30 16:05:54 +0200 | [diff] [blame] | 4 | /* |
| 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 Kivity | 980da6c | 2009-12-20 15:13:43 +0200 | [diff] [blame] | 13 | #ifdef CONFIG_KVM_MMIO |
| 14 | |
Sasha Levin | 2b3c246 | 2011-07-20 20:59:00 +0300 | [diff] [blame] | 15 | #include <linux/list.h> |
Laurent Vivier | 5f94c17 | 2008-05-30 16:05:54 +0200 | [diff] [blame] | 16 | |
| 17 | struct kvm_coalesced_mmio_dev { |
Sasha Levin | 2b3c246 | 2011-07-20 20:59:00 +0300 | [diff] [blame] | 18 | struct list_head list; |
Laurent Vivier | 5f94c17 | 2008-05-30 16:05:54 +0200 | [diff] [blame] | 19 | struct kvm_io_device dev; |
| 20 | struct kvm *kvm; |
Sasha Levin | 2b3c246 | 2011-07-20 20:59:00 +0300 | [diff] [blame] | 21 | struct kvm_coalesced_mmio_zone zone; |
Laurent Vivier | 5f94c17 | 2008-05-30 16:05:54 +0200 | [diff] [blame] | 22 | }; |
| 23 | |
| 24 | int kvm_coalesced_mmio_init(struct kvm *kvm); |
Avi Kivity | 980da6c | 2009-12-20 15:13:43 +0200 | [diff] [blame] | 25 | void kvm_coalesced_mmio_free(struct kvm *kvm); |
Laurent Vivier | 5f94c17 | 2008-05-30 16:05:54 +0200 | [diff] [blame] | 26 | int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm, |
Wei Yang | 81523aa | 2015-09-11 14:12:53 +0800 | [diff] [blame] | 27 | struct kvm_coalesced_mmio_zone *zone); |
Laurent Vivier | 5f94c17 | 2008-05-30 16:05:54 +0200 | [diff] [blame] | 28 | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, |
Wei Yang | 81523aa | 2015-09-11 14:12:53 +0800 | [diff] [blame] | 29 | struct kvm_coalesced_mmio_zone *zone); |
Avi Kivity | 3f0852e | 2009-12-20 14:42:19 +0200 | [diff] [blame] | 30 | |
Avi Kivity | 980da6c | 2009-12-20 15:13:43 +0200 | [diff] [blame] | 31 | #else |
| 32 | |
| 33 | static inline int kvm_coalesced_mmio_init(struct kvm *kvm) { return 0; } |
| 34 | static inline void kvm_coalesced_mmio_free(struct kvm *kvm) { } |
| 35 | |
| 36 | #endif |
| 37 | |
Avi Kivity | 3f0852e | 2009-12-20 14:42:19 +0200 | [diff] [blame] | 38 | #endif |