Re: [patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/10/2011 02:35 PM, Carsten Otte wrote:
> This patch introduces a new config option for user controlled kernel
> virtual machines. It introduces an optional parameter to
> KVM_CREATE_VM in order to create a user controlled virtual machine.
> The parameter is passed to kvm_arch_init_vm for all architectures.
> Valid values for the new parameter are KVM_VM_REGULAR (defined to 0
> for backward compatibility to old KVM_CREATE_VM) and
> KVM_VM_UCONTROL for s390 only.
> Note that the user controlled virtual machines require CAP_SYS_ADMIN
> privileges.
>
> @@ -103,6 +103,11 @@ will access the virtual machine's physic
>  corresponds to guest physical address zero.  Use of mmap() on a VM fd
>  is discouraged if userspace memory allocation (KVM_CAP_USER_MEMORY) is
>  available.
> +You most certainly want to use KVM_VM_REGULAR as machine type.
> +
> +In order to create user controlled virtual machines on S390, check
> +KVM_CAP_UCONTROL and use KVM_VM_UCONTROL as machine type as
> +privileged user (CAP_SYS_ADMIN).

Old kernels don't expose KVM_VM_REGULAR, so if people follow the
recommendations, their userspace won't build.  Normal guests must be 0.

We can pretend we planned this all along by making the argument a flags
mask, and claiming bit 0 for UCONTROL.

>  
>  
> +config KVM_UCONTROL
> +	bool "Userspace controlled virtual machines"
> +	depends on KVM
> +	---help---
> +	  Allow CAP_SYS_ADMIN users to create KVM virtual machines that are
> +	  controlled by userspace.
> +

SYS_ADMIN is not really a good match for this, but no better idea.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux