Re: [PATCH v2 08/13] KVM: implement multiple address spaces

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

 





On 05/28/2015 01:05 AM, Paolo Bonzini wrote:

  	/*
@@ -772,6 +776,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
  	struct kvm_memory_slot *slot;
  	struct kvm_memory_slot old, new;
  	struct kvm_memslots *slots = NULL, *old_memslots;
+	int as_id, id;
  	enum kvm_mr_change change;

  	r = check_memory_region_flags(mem);
@@ -779,24 +784,27 @@ int __kvm_set_memory_region(struct kvm *kvm,
  		goto out;

  	r = -EINVAL;
+	as_id = mem->slot >> 16;
+	id = mem->slot & 65535;
+

A minor comment, Could you put these decoding into a separate function?

Nice idea indeed.

Reviewed-by: Xiao Guangrong <guangrong.xiao@xxxxxxxxxxxxxxx>
--
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