Re: [PATCH v2] KVM: set_memory_region: Identify the requested change explicitly

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

 



On Mon, 28 Jan 2013 18:19:45 +0900
Takuya Yoshikawa <yoshikawa_takuya_b1@xxxxxxxxxxxxx> wrote:

> @@ -876,7 +900,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
>  	 * slots (size changes, userspace addr changes) is disallowed above,
>  	 * so any other attribute changes getting here can be skipped.
>  	 */
> -	if (npages) {
> +	if (!(change == KVM_MR_DELETE)) {
>  		if (old_iommu_mapped &&
>  		    ((new.flags ^ old.flags) & KVM_MEM_READONLY)) {
>  			kvm_iommu_unmap_pages(kvm, &old);

I somehow wrote strange code.
This should have been if (A != B) instead of !(A == B).

Will update later.

	Takuya
--
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