diff options
author | Robert Mustacchi <rm@joyent.com> | 2011-06-03 10:20:39 -0700 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2011-06-03 10:20:39 -0700 |
commit | ef66b35f39f879549a875da93d9827343afbaa2e (patch) | |
tree | ffeac2a20a0c16dffd89fcbd7eb58a1ca9e4e4d7 /kvm_coalesced_mmio.h | |
parent | 2fe433c87f10c04d9e7448f81ef3d1cbcba53ab7 (diff) | |
download | illumos-kvm-ef66b35f39f879549a875da93d9827343afbaa2e.tar.gz |
HVM-275 coalesced mmio code should be in separate file
HVM-274 kvm_i8259 should be in make check
Diffstat (limited to 'kvm_coalesced_mmio.h')
-rw-r--r-- | kvm_coalesced_mmio.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/kvm_coalesced_mmio.h b/kvm_coalesced_mmio.h new file mode 100644 index 0000000..58d7a31 --- /dev/null +++ b/kvm_coalesced_mmio.h @@ -0,0 +1,53 @@ +#ifndef __KVM_COALESCED_MMIO_H__ +#define __KVM_COALESCED_MMIO_H__ + +/* + * KVM coalesced MMIO + * + * Copyright (c) 2008 Bull S.A.S. + * + * Author: Laurent Vivier <Laurent.Vivier@bull.net> + * + */ + +/* XXX Linux doesn't define these structures here so why do we? */ + +typedef struct kvm_coalesced_mmio_zone { + uint64_t addr; + uint32_t size; + uint32_t pad; +} kvm_coalesced_mmio_zone_t; + +typedef struct kvm_coalesced_mmio_zone_ioc { + struct kvm_coalesced_mmio_zone zone; + int kvmid; +} kvm_coalesced_mmio_zone_ioc_t; + +#ifdef CONFIG_KVM_MMIO + +#define KVM_COALESCED_MMIO_ZONE_MAX 100 + +/* for KVM_REGISTER_COALESCED_MMIO / KVM_UNREGISTER_COALESCED_MMIO */ + +typedef struct kvm_coalesced_mmio_dev { + struct kvm_io_device dev; + struct kvm *kvm; + kmutex_t lock; + int nb_zones; + struct kvm_coalesced_mmio_zone zone[KVM_COALESCED_MMIO_ZONE_MAX]; +} kvm_coalesced_mmio_dev_t; + +extern int kvm_coalesced_mmio_init(struct kvm *); +extern void kvm_coalesced_mmio_free(struct kvm *); +extern int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *, + struct kvm_coalesced_mmio_zone *); +extern int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *, + struct kvm_coalesced_mmio_zone *); + +#else + +#error "CONFIG_KVM_MMIO must be suupported" + +#endif /* CONFIG_KVM_MMIO */ + +#endif /* __KVM_COALESCED_MMIO_H__ */ |