Unverified Commit bacc5400 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11006 kvm: s390: Reject memory region operations for ucontrol VMs

parents f9a0d104 81917f4d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1331,6 +1331,11 @@ It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl.
The KVM_SET_MEMORY_REGION does not allow fine grained control over memory
allocation and is deprecated.

S390:
^^^^^

Returns -EINVAL if the VM has the KVM_VM_S390_UCONTROL flag set.
Returns -EINVAL if called on a protected VM.

4.36 KVM_SET_TSS_ADDR
---------------------
+3 −0
Original line number Diff line number Diff line
@@ -4992,6 +4992,9 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
				   const struct kvm_userspace_memory_region *mem,
				   enum kvm_mr_change change)
{
	if (kvm_is_ucontrol(kvm))
		return -EINVAL;

	/* A few sanity checks. We can have memory slots which have to be
	   located/ended at a segment boundary (1MB). The memory in userland is
	   ok to be fragmented into various different vmas. It is okay to mmap()