aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2012-01-04 04:25:21 -0500
committerAvi Kivity <avi@redhat.com>2012-03-05 07:52:18 -0500
commit27e0393f15fc8bc855c6a888387ff5ffd2181089 (patch)
tree7dd5f6f49f6e11ee5cfbbc4d00fb39f649caa61b /include/linux/kvm.h
parente08b96371625aaa84cb03f51acc4c8e0be27403a (diff)
KVM: s390: ucontrol: per vcpu address spaces
This patch introduces two ioctls for virtual cpus, that are only valid for kernel virtual machines that are controlled by userspace. Each virtual cpu has its individual address space in this mode of operation, and each address space is backed by the gmap implementation just like the address space for regular KVM guests. KVM_S390_UCAS_MAP allows to map a part of the user's virtual address space to the vcpu. Starting offset and length in both the user and the vcpu address space need to be aligned to 1M. KVM_S390_UCAS_UNMAP can be used to unmap a range of memory from a virtual cpu in a similar way. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index bba393a6760f..0a66c1072691 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -658,6 +658,16 @@ struct kvm_clock_data {
658 struct kvm_userspace_memory_region) 658 struct kvm_userspace_memory_region)
659#define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) 659#define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47)
660#define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) 660#define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64)
661
662/* enable ucontrol for s390 */
663struct kvm_s390_ucas_mapping {
664 __u64 user_addr;
665 __u64 vcpu_addr;
666 __u64 length;
667};
668#define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)
669#define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)
670
661/* Device model IOC */ 671/* Device model IOC */
662#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60) 672#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)
663#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level) 673#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level)