You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
KVM: introduce KVM_MEM_SLOTS_NUM macro
Introduce KVM_MEM_SLOTS_NUM macro to instead of KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
committed by
Avi Kivity
parent
ff227392cd
commit
93a5cef07d
+1
-1
@@ -663,7 +663,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
|
||||
(void __user *)(unsigned long)mem->userspace_addr,
|
||||
mem->memory_size)))
|
||||
goto out;
|
||||
if (mem->slot >= KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS)
|
||||
if (mem->slot >= KVM_MEM_SLOTS_NUM)
|
||||
goto out;
|
||||
if (mem->guest_phys_addr + mem->memory_size < mem->guest_phys_addr)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user