13f0852e0SAvi Kivity #ifndef __KVM_COALESCED_MMIO_H__ 23f0852e0SAvi Kivity #define __KVM_COALESCED_MMIO_H__ 33f0852e0SAvi Kivity 45f94c174SLaurent Vivier /* 55f94c174SLaurent Vivier * KVM coalesced MMIO 65f94c174SLaurent Vivier * 75f94c174SLaurent Vivier * Copyright (c) 2008 Bull S.A.S. 85f94c174SLaurent Vivier * 95f94c174SLaurent Vivier * Author: Laurent Vivier <Laurent.Vivier@bull.net> 105f94c174SLaurent Vivier * 115f94c174SLaurent Vivier */ 125f94c174SLaurent Vivier 13980da6ceSAvi Kivity #ifdef CONFIG_KVM_MMIO 14980da6ceSAvi Kivity 155f94c174SLaurent Vivier #define KVM_COALESCED_MMIO_ZONE_MAX 100 165f94c174SLaurent Vivier 175f94c174SLaurent Vivier struct kvm_coalesced_mmio_dev { 185f94c174SLaurent Vivier struct kvm_io_device dev; 195f94c174SLaurent Vivier struct kvm *kvm; 2064a2268dSMarcelo Tosatti spinlock_t lock; 215f94c174SLaurent Vivier int nb_zones; 225f94c174SLaurent Vivier struct kvm_coalesced_mmio_zone zone[KVM_COALESCED_MMIO_ZONE_MAX]; 235f94c174SLaurent Vivier }; 245f94c174SLaurent Vivier 255f94c174SLaurent Vivier int kvm_coalesced_mmio_init(struct kvm *kvm); 26980da6ceSAvi Kivity void kvm_coalesced_mmio_free(struct kvm *kvm); 275f94c174SLaurent Vivier int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm, 285f94c174SLaurent Vivier struct kvm_coalesced_mmio_zone *zone); 295f94c174SLaurent Vivier int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, 305f94c174SLaurent Vivier struct kvm_coalesced_mmio_zone *zone); 313f0852e0SAvi Kivity 32980da6ceSAvi Kivity #else 33980da6ceSAvi Kivity 34980da6ceSAvi Kivity static inline int kvm_coalesced_mmio_init(struct kvm *kvm) { return 0; } 35980da6ceSAvi Kivity static inline void kvm_coalesced_mmio_free(struct kvm *kvm) { } 36980da6ceSAvi Kivity 37980da6ceSAvi Kivity #endif 38980da6ceSAvi Kivity 393f0852e0SAvi Kivity #endif 40