]>
Commit | Line | Data |
---|---|---|
3f0852e0 AK |
1 | #ifndef __KVM_COALESCED_MMIO_H__ |
2 | #define __KVM_COALESCED_MMIO_H__ | |
3 | ||
5f94c174 LV |
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 | ||
980da6ce AK |
13 | #ifdef CONFIG_KVM_MMIO |
14 | ||
5f94c174 LV |
15 | #define KVM_COALESCED_MMIO_ZONE_MAX 100 |
16 | ||
17 | struct kvm_coalesced_mmio_dev { | |
18 | struct kvm_io_device dev; | |
19 | struct kvm *kvm; | |
64a2268d | 20 | spinlock_t lock; |
5f94c174 LV |
21 | int nb_zones; |
22 | struct kvm_coalesced_mmio_zone zone[KVM_COALESCED_MMIO_ZONE_MAX]; | |
23 | }; | |
24 | ||
25 | int kvm_coalesced_mmio_init(struct kvm *kvm); | |
980da6ce | 26 | void kvm_coalesced_mmio_free(struct kvm *kvm); |
5f94c174 LV |
27 | int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm, |
28 | struct kvm_coalesced_mmio_zone *zone); | |
29 | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, | |
30 | struct kvm_coalesced_mmio_zone *zone); | |
3f0852e0 | 31 | |
980da6ce AK |
32 | #else |
33 | ||
34 | static inline int kvm_coalesced_mmio_init(struct kvm *kvm) { return 0; } | |
35 | static inline void kvm_coalesced_mmio_free(struct kvm *kvm) { } | |
36 | ||
37 | #endif | |
38 | ||
3f0852e0 | 39 | #endif |