coalesced_mmio.h 969 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __KVM_COALESCED_MMIO_H__
  2. #define __KVM_COALESCED_MMIO_H__
  3. /*
  4. * KVM coalesced MMIO
  5. *
  6. * Copyright (c) 2008 Bull S.A.S.
  7. *
  8. * Author: Laurent Vivier <Laurent.Vivier@bull.net>
  9. *
  10. */
  11. #ifdef CONFIG_KVM_MMIO
  12. #define KVM_COALESCED_MMIO_ZONE_MAX 100
  13. struct kvm_coalesced_mmio_dev {
  14. struct kvm_io_device dev;
  15. struct kvm *kvm;
  16. spinlock_t lock;
  17. int nb_zones;
  18. struct kvm_coalesced_mmio_zone zone[KVM_COALESCED_MMIO_ZONE_MAX];
  19. };
  20. int kvm_coalesced_mmio_init(struct kvm *kvm);
  21. void kvm_coalesced_mmio_free(struct kvm *kvm);
  22. int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm,
  23. struct kvm_coalesced_mmio_zone *zone);
  24. int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm,
  25. struct kvm_coalesced_mmio_zone *zone);
  26. #else
  27. static inline int kvm_coalesced_mmio_init(struct kvm *kvm) { return 0; }
  28. static inline void kvm_coalesced_mmio_free(struct kvm *kvm) { }
  29. #endif
  30. #endif