aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2012-01-04 04:25:20 -0500
committerAvi Kivity <avi@redhat.com>2012-03-05 07:52:18 -0500
commite08b96371625aaa84cb03f51acc4c8e0be27403a (patch)
treed0b140e8558c6145e1a3183809c7797be443bd68 /include/linux
parenta138fe7535c0ec778465c7b54b1aaaf4cfd885b7 (diff)
KVM: s390: add parameter for KVM_CREATE_VM
This patch introduces a new config option for user controlled kernel virtual machines. It introduces a parameter to KVM_CREATE_VM that allows to set bits that alter the capabilities of the newly created virtual machine. The parameter is passed to kvm_arch_init_vm for all architectures. The only valid modifier bit for now is KVM_VM_S390_UCONTROL. This requires CAP_SYS_ADMIN privileges and creates a user controlled virtual machine on s390 architectures. 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')
-rw-r--r--include/linux/kvm.h3
-rw-r--r--include/linux/kvm_host.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 68e67e50d028..bba393a6760f 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -431,6 +431,9 @@ struct kvm_ppc_pvinfo {
431 431
432#define KVMIO 0xAE 432#define KVMIO 0xAE
433 433
434/* machine type bits, to be used as argument to KVM_CREATE_VM */
435#define KVM_VM_S390_UCONTROL 1
436
434/* 437/*
435 * ioctls for /dev/kvm fds: 438 * ioctls for /dev/kvm fds:
436 */ 439 */
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 900c76337e8f..82375e145e64 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -520,7 +520,7 @@ static inline void kvm_arch_free_vm(struct kvm *kvm)
520} 520}
521#endif 521#endif
522 522
523int kvm_arch_init_vm(struct kvm *kvm); 523int kvm_arch_init_vm(struct kvm *kvm, unsigned long type);
524void kvm_arch_destroy_vm(struct kvm *kvm); 524void kvm_arch_destroy_vm(struct kvm *kvm);
525void kvm_free_all_assigned_devices(struct kvm *kvm); 525void kvm_free_all_assigned_devices(struct kvm *kvm);
526void kvm_arch_sync_events(struct kvm *kvm); 526void kvm_arch_sync_events(struct kvm *kvm);