diff for duplicates of <20200206210944.GD700495@xz-x1> diff --git a/a/1.txt b/N1/1.txt index 7bf1335..6d5f3f2 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,7 +1,7 @@ On Tue, Jan 21, 2020 at 02:31:55PM -0800, Sean Christopherson wrote: > Refactor memslot handling to treat the number of used slots as the de > facto size of the memslot array, e.g. return NULL from id_to_memslot() -> when an invalid index is provided instead of relying on npages=0 to +> when an invalid index is provided instead of relying on npages==0 to > detect an invalid memslot. Rework the sorting and walking of memslots > in advance of dynamically sizing memslots to aid bisection and debug, > e.g. with luck, a bug in the refactoring will bisect here and/or hit a @@ -198,7 +198,7 @@ Is this intended? > + struct kvm_memory_slot *mslots = slots->memslots; > + int i; > + -> + if (WARN_ON(slots->id_to_index[memslot->id] = -1)) +> + if (WARN_ON(slots->id_to_index[memslot->id] == -1)) > + return; > + > + slots->used_slots--; @@ -244,7 +244,7 @@ I'm not sure whether I'm the only one, though... > + struct kvm_memory_slot *mslots = slots->memslots; > + int i; > + -> + if (WARN_ON_ONCE(slots->id_to_index[memslot->id] = -1) || +> + if (WARN_ON_ONCE(slots->id_to_index[memslot->id] == -1) || > + WARN_ON_ONCE(!slots->used_slots)) > + return -1; > + @@ -257,7 +257,7 @@ I'm not sure whether I'm the only one, though... > + if (memslot->base_gfn > mslots[i + 1].base_gfn) > + break; > + -> + WARN_ON_ONCE(memslot->base_gfn = mslots[i + 1].base_gfn); +> + WARN_ON_ONCE(memslot->base_gfn == mslots[i + 1].base_gfn); Will this trigger? Note that in __kvm_set_memory_region() we have already checked overlap of memslots. @@ -295,7 +295,7 @@ Same question on the naming. after the refactoring it should not matter any more) > + -> + WARN_ON_ONCE(memslot->base_gfn = mslots[i - 1].base_gfn); +> + WARN_ON_ONCE(memslot->base_gfn == mslots[i - 1].base_gfn); Same here. @@ -371,10 +371,10 @@ Same here. > - default: > - break; > - } -> + if (change = KVM_MR_DELETE) { +> + if (change == KVM_MR_DELETE) { > + kvm_memslot_delete(slots, memslot); > + } else { -> + if (change = KVM_MR_CREATE) +> + if (change == KVM_MR_CREATE) > + i = kvm_memslot_insert_back(slots); > + else > + i = kvm_memslot_move_backward(slots, memslot); @@ -396,8 +396,8 @@ Same here. > } > - > - /* -> - * The ">=" is needed when creating a slot with base_gfn = 0, -> - * so that it moves before all those with base_gfn = npages = 0. +> - * The ">=" is needed when creating a slot with base_gfn == 0, +> - * so that it moves before all those with base_gfn == npages == 0. > - * > - * On the other hand, if new->npages is zero, the above loop has > - * already left i pointing to the beginning of the empty part of @@ -482,3 +482,8 @@ I was confused in that patch, then... -- Peter Xu + +_______________________________________________ +kvmarm mailing list +kvmarm@lists.cs.columbia.edu +https://lists.cs.columbia.edu/mailman/listinfo/kvmarm diff --git a/a/content_digest b/N1/content_digest index c67a958..b1ce743 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,36 +2,32 @@ "ref\020200121223157.15263-18-sean.j.christopherson@intel.com\0" "From\0Peter Xu <peterx@redhat.com>\0" "Subject\0Re: [PATCH v5 17/19] KVM: Terminate memslot walks via used_slots\0" - "Date\0Thu, 06 Feb 2020 21:09:44 +0000\0" + "Date\0Thu, 6 Feb 2020 16:09:44 -0500\0" "To\0Sean Christopherson <sean.j.christopherson@intel.com>\0" - "Cc\0Paolo Bonzini <pbonzini@redhat.com>" + "Cc\0Wanpeng Li <wanpengli@tencent.com>" + kvm@vger.kernel.org + David Hildenbrand <david@redhat.com> + linux-mips@vger.kernel.org Paul Mackerras <paulus@ozlabs.org> - Christian Borntraeger <borntraeger@de.ibm.com> + kvmarm@lists.cs.columbia.edu Janosch Frank <frankja@linux.ibm.com> - David Hildenbrand <david@redhat.com> - Cornelia Huck <cohuck@redhat.com> - Vitaly Kuznetsov <vkuznets@redhat.com> - Wanpeng Li <wanpengli@tencent.com> - Jim Mattson <jmattson@google.com> - Joerg Roedel <joro@8bytes.org> Marc Zyngier <maz@kernel.org> - James Morse <james.morse@arm.com> - Julien Thierry <julien.thierry.kdev@gmail.com> - Suzuki K Poulose <suzuki.poulose@arm.com> - linux-mips@vger.kernel.org - kvm@vger.kernel.org + Joerg Roedel <joro@8bytes.org> + Christian Borntraeger <borntraeger@de.ibm.com> kvm-ppc@vger.kernel.org linux-arm-kernel@lists.infradead.org - kvmarm@lists.cs.columbia.edu + Jim Mattson <jmattson@google.com> + Cornelia Huck <cohuck@redhat.com> linux-kernel@vger.kernel.org - Christoffer Dall <christoffer.dall@arm.com> + Paolo Bonzini <pbonzini@redhat.com> + Vitaly Kuznetsov <vkuznets@redhat.com> " Philippe Mathieu-Daud\303\251 <f4bug@amsat.org>\0" "\00:1\0" "b\0" "On Tue, Jan 21, 2020 at 02:31:55PM -0800, Sean Christopherson wrote:\n" "> Refactor memslot handling to treat the number of used slots as the de\n" "> facto size of the memslot array, e.g. return NULL from id_to_memslot()\n" - "> when an invalid index is provided instead of relying on npages=0 to\n" + "> when an invalid index is provided instead of relying on npages==0 to\n" "> detect an invalid memslot. Rework the sorting and walking of memslots\n" "> in advance of dynamically sizing memslots to aid bisection and debug,\n" "> e.g. with luck, a bug in the refactoring will bisect here and/or hit a\n" @@ -228,7 +224,7 @@ "> +\tstruct kvm_memory_slot *mslots = slots->memslots;\n" "> +\tint i;\n" "> +\n" - "> +\tif (WARN_ON(slots->id_to_index[memslot->id] = -1))\n" + "> +\tif (WARN_ON(slots->id_to_index[memslot->id] == -1))\n" "> +\t\treturn;\n" "> +\n" "> +\tslots->used_slots--;\n" @@ -274,7 +270,7 @@ "> +\tstruct kvm_memory_slot *mslots = slots->memslots;\n" "> +\tint i;\n" "> +\n" - "> +\tif (WARN_ON_ONCE(slots->id_to_index[memslot->id] = -1) ||\n" + "> +\tif (WARN_ON_ONCE(slots->id_to_index[memslot->id] == -1) ||\n" "> +\t WARN_ON_ONCE(!slots->used_slots))\n" "> +\t\treturn -1;\n" "> +\n" @@ -287,7 +283,7 @@ "> +\t\tif (memslot->base_gfn > mslots[i + 1].base_gfn)\n" "> +\t\t\tbreak;\n" "> +\n" - "> +\t\tWARN_ON_ONCE(memslot->base_gfn = mslots[i + 1].base_gfn);\n" + "> +\t\tWARN_ON_ONCE(memslot->base_gfn == mslots[i + 1].base_gfn);\n" "\n" "Will this trigger? Note that in __kvm_set_memory_region() we have\n" "already checked overlap of memslots.\n" @@ -325,7 +321,7 @@ " after the refactoring it should not matter any more)\n" "\n" "> +\n" - "> +\t\tWARN_ON_ONCE(memslot->base_gfn = mslots[i - 1].base_gfn);\n" + "> +\t\tWARN_ON_ONCE(memslot->base_gfn == mslots[i - 1].base_gfn);\n" "\n" "Same here.\n" "\n" @@ -401,10 +397,10 @@ "> -\tdefault:\n" "> -\t\tbreak;\n" "> -\t}\n" - "> +\tif (change = KVM_MR_DELETE) {\n" + "> +\tif (change == KVM_MR_DELETE) {\n" "> +\t\tkvm_memslot_delete(slots, memslot);\n" "> +\t} else {\n" - "> +\t\tif (change = KVM_MR_CREATE)\n" + "> +\t\tif (change == KVM_MR_CREATE)\n" "> +\t\t\ti = kvm_memslot_insert_back(slots);\n" "> +\t\telse\n" "> +\t\t\ti = kvm_memslot_move_backward(slots, memslot);\n" @@ -426,8 +422,8 @@ "> \t}\n" "> -\n" "> -\t/*\n" - "> -\t * The \">=\" is needed when creating a slot with base_gfn = 0,\n" - "> -\t * so that it moves before all those with base_gfn = npages = 0.\n" + "> -\t * The \">=\" is needed when creating a slot with base_gfn == 0,\n" + "> -\t * so that it moves before all those with base_gfn == npages == 0.\n" "> -\t *\n" "> -\t * On the other hand, if new->npages is zero, the above loop has\n" "> -\t * already left i pointing to the beginning of the empty part of\n" @@ -511,6 +507,11 @@ "> \n" "\n" "-- \n" - Peter Xu + "Peter Xu\n" + "\n" + "_______________________________________________\n" + "kvmarm mailing list\n" + "kvmarm@lists.cs.columbia.edu\n" + https://lists.cs.columbia.edu/mailman/listinfo/kvmarm -85451164ba1e3f3990c4b18c0088cd62c7da900cb64396d69d753e3cd6518d3c +87bcb2c4deb38641cffffa835b24635ff1a51f7aa0d22ce4aea086540dfa2627
diff --git a/a/1.txt b/N2/1.txt index 7bf1335..4819c1c 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,7 +1,7 @@ On Tue, Jan 21, 2020 at 02:31:55PM -0800, Sean Christopherson wrote: > Refactor memslot handling to treat the number of used slots as the de > facto size of the memslot array, e.g. return NULL from id_to_memslot() -> when an invalid index is provided instead of relying on npages=0 to +> when an invalid index is provided instead of relying on npages==0 to > detect an invalid memslot. Rework the sorting and walking of memslots > in advance of dynamically sizing memslots to aid bisection and debug, > e.g. with luck, a bug in the refactoring will bisect here and/or hit a @@ -198,7 +198,7 @@ Is this intended? > + struct kvm_memory_slot *mslots = slots->memslots; > + int i; > + -> + if (WARN_ON(slots->id_to_index[memslot->id] = -1)) +> + if (WARN_ON(slots->id_to_index[memslot->id] == -1)) > + return; > + > + slots->used_slots--; @@ -244,7 +244,7 @@ I'm not sure whether I'm the only one, though... > + struct kvm_memory_slot *mslots = slots->memslots; > + int i; > + -> + if (WARN_ON_ONCE(slots->id_to_index[memslot->id] = -1) || +> + if (WARN_ON_ONCE(slots->id_to_index[memslot->id] == -1) || > + WARN_ON_ONCE(!slots->used_slots)) > + return -1; > + @@ -257,7 +257,7 @@ I'm not sure whether I'm the only one, though... > + if (memslot->base_gfn > mslots[i + 1].base_gfn) > + break; > + -> + WARN_ON_ONCE(memslot->base_gfn = mslots[i + 1].base_gfn); +> + WARN_ON_ONCE(memslot->base_gfn == mslots[i + 1].base_gfn); Will this trigger? Note that in __kvm_set_memory_region() we have already checked overlap of memslots. @@ -295,7 +295,7 @@ Same question on the naming. after the refactoring it should not matter any more) > + -> + WARN_ON_ONCE(memslot->base_gfn = mslots[i - 1].base_gfn); +> + WARN_ON_ONCE(memslot->base_gfn == mslots[i - 1].base_gfn); Same here. @@ -371,10 +371,10 @@ Same here. > - default: > - break; > - } -> + if (change = KVM_MR_DELETE) { +> + if (change == KVM_MR_DELETE) { > + kvm_memslot_delete(slots, memslot); > + } else { -> + if (change = KVM_MR_CREATE) +> + if (change == KVM_MR_CREATE) > + i = kvm_memslot_insert_back(slots); > + else > + i = kvm_memslot_move_backward(slots, memslot); @@ -396,8 +396,8 @@ Same here. > } > - > - /* -> - * The ">=" is needed when creating a slot with base_gfn = 0, -> - * so that it moves before all those with base_gfn = npages = 0. +> - * The ">=" is needed when creating a slot with base_gfn == 0, +> - * so that it moves before all those with base_gfn == npages == 0. > - * > - * On the other hand, if new->npages is zero, the above loop has > - * already left i pointing to the beginning of the empty part of diff --git a/a/content_digest b/N2/content_digest index c67a958..c597d6f 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -2,7 +2,7 @@ "ref\020200121223157.15263-18-sean.j.christopherson@intel.com\0" "From\0Peter Xu <peterx@redhat.com>\0" "Subject\0Re: [PATCH v5 17/19] KVM: Terminate memslot walks via used_slots\0" - "Date\0Thu, 06 Feb 2020 21:09:44 +0000\0" + "Date\0Thu, 6 Feb 2020 16:09:44 -0500\0" "To\0Sean Christopherson <sean.j.christopherson@intel.com>\0" "Cc\0Paolo Bonzini <pbonzini@redhat.com>" Paul Mackerras <paulus@ozlabs.org> @@ -31,7 +31,7 @@ "On Tue, Jan 21, 2020 at 02:31:55PM -0800, Sean Christopherson wrote:\n" "> Refactor memslot handling to treat the number of used slots as the de\n" "> facto size of the memslot array, e.g. return NULL from id_to_memslot()\n" - "> when an invalid index is provided instead of relying on npages=0 to\n" + "> when an invalid index is provided instead of relying on npages==0 to\n" "> detect an invalid memslot. Rework the sorting and walking of memslots\n" "> in advance of dynamically sizing memslots to aid bisection and debug,\n" "> e.g. with luck, a bug in the refactoring will bisect here and/or hit a\n" @@ -228,7 +228,7 @@ "> +\tstruct kvm_memory_slot *mslots = slots->memslots;\n" "> +\tint i;\n" "> +\n" - "> +\tif (WARN_ON(slots->id_to_index[memslot->id] = -1))\n" + "> +\tif (WARN_ON(slots->id_to_index[memslot->id] == -1))\n" "> +\t\treturn;\n" "> +\n" "> +\tslots->used_slots--;\n" @@ -274,7 +274,7 @@ "> +\tstruct kvm_memory_slot *mslots = slots->memslots;\n" "> +\tint i;\n" "> +\n" - "> +\tif (WARN_ON_ONCE(slots->id_to_index[memslot->id] = -1) ||\n" + "> +\tif (WARN_ON_ONCE(slots->id_to_index[memslot->id] == -1) ||\n" "> +\t WARN_ON_ONCE(!slots->used_slots))\n" "> +\t\treturn -1;\n" "> +\n" @@ -287,7 +287,7 @@ "> +\t\tif (memslot->base_gfn > mslots[i + 1].base_gfn)\n" "> +\t\t\tbreak;\n" "> +\n" - "> +\t\tWARN_ON_ONCE(memslot->base_gfn = mslots[i + 1].base_gfn);\n" + "> +\t\tWARN_ON_ONCE(memslot->base_gfn == mslots[i + 1].base_gfn);\n" "\n" "Will this trigger? Note that in __kvm_set_memory_region() we have\n" "already checked overlap of memslots.\n" @@ -325,7 +325,7 @@ " after the refactoring it should not matter any more)\n" "\n" "> +\n" - "> +\t\tWARN_ON_ONCE(memslot->base_gfn = mslots[i - 1].base_gfn);\n" + "> +\t\tWARN_ON_ONCE(memslot->base_gfn == mslots[i - 1].base_gfn);\n" "\n" "Same here.\n" "\n" @@ -401,10 +401,10 @@ "> -\tdefault:\n" "> -\t\tbreak;\n" "> -\t}\n" - "> +\tif (change = KVM_MR_DELETE) {\n" + "> +\tif (change == KVM_MR_DELETE) {\n" "> +\t\tkvm_memslot_delete(slots, memslot);\n" "> +\t} else {\n" - "> +\t\tif (change = KVM_MR_CREATE)\n" + "> +\t\tif (change == KVM_MR_CREATE)\n" "> +\t\t\ti = kvm_memslot_insert_back(slots);\n" "> +\t\telse\n" "> +\t\t\ti = kvm_memslot_move_backward(slots, memslot);\n" @@ -426,8 +426,8 @@ "> \t}\n" "> -\n" "> -\t/*\n" - "> -\t * The \">=\" is needed when creating a slot with base_gfn = 0,\n" - "> -\t * so that it moves before all those with base_gfn = npages = 0.\n" + "> -\t * The \">=\" is needed when creating a slot with base_gfn == 0,\n" + "> -\t * so that it moves before all those with base_gfn == npages == 0.\n" "> -\t *\n" "> -\t * On the other hand, if new->npages is zero, the above loop has\n" "> -\t * already left i pointing to the beginning of the empty part of\n" @@ -513,4 +513,4 @@ "-- \n" Peter Xu -85451164ba1e3f3990c4b18c0088cd62c7da900cb64396d69d753e3cd6518d3c +2f3a0f1fbf973077df4829fc663761e5855b53aaed89758cb987b1e879902b01
diff --git a/a/1.txt b/N3/1.txt index 7bf1335..40c3f05 100644 --- a/a/1.txt +++ b/N3/1.txt @@ -1,7 +1,7 @@ On Tue, Jan 21, 2020 at 02:31:55PM -0800, Sean Christopherson wrote: > Refactor memslot handling to treat the number of used slots as the de > facto size of the memslot array, e.g. return NULL from id_to_memslot() -> when an invalid index is provided instead of relying on npages=0 to +> when an invalid index is provided instead of relying on npages==0 to > detect an invalid memslot. Rework the sorting and walking of memslots > in advance of dynamically sizing memslots to aid bisection and debug, > e.g. with luck, a bug in the refactoring will bisect here and/or hit a @@ -198,7 +198,7 @@ Is this intended? > + struct kvm_memory_slot *mslots = slots->memslots; > + int i; > + -> + if (WARN_ON(slots->id_to_index[memslot->id] = -1)) +> + if (WARN_ON(slots->id_to_index[memslot->id] == -1)) > + return; > + > + slots->used_slots--; @@ -244,7 +244,7 @@ I'm not sure whether I'm the only one, though... > + struct kvm_memory_slot *mslots = slots->memslots; > + int i; > + -> + if (WARN_ON_ONCE(slots->id_to_index[memslot->id] = -1) || +> + if (WARN_ON_ONCE(slots->id_to_index[memslot->id] == -1) || > + WARN_ON_ONCE(!slots->used_slots)) > + return -1; > + @@ -257,7 +257,7 @@ I'm not sure whether I'm the only one, though... > + if (memslot->base_gfn > mslots[i + 1].base_gfn) > + break; > + -> + WARN_ON_ONCE(memslot->base_gfn = mslots[i + 1].base_gfn); +> + WARN_ON_ONCE(memslot->base_gfn == mslots[i + 1].base_gfn); Will this trigger? Note that in __kvm_set_memory_region() we have already checked overlap of memslots. @@ -295,7 +295,7 @@ Same question on the naming. after the refactoring it should not matter any more) > + -> + WARN_ON_ONCE(memslot->base_gfn = mslots[i - 1].base_gfn); +> + WARN_ON_ONCE(memslot->base_gfn == mslots[i - 1].base_gfn); Same here. @@ -371,10 +371,10 @@ Same here. > - default: > - break; > - } -> + if (change = KVM_MR_DELETE) { +> + if (change == KVM_MR_DELETE) { > + kvm_memslot_delete(slots, memslot); > + } else { -> + if (change = KVM_MR_CREATE) +> + if (change == KVM_MR_CREATE) > + i = kvm_memslot_insert_back(slots); > + else > + i = kvm_memslot_move_backward(slots, memslot); @@ -396,8 +396,8 @@ Same here. > } > - > - /* -> - * The ">=" is needed when creating a slot with base_gfn = 0, -> - * so that it moves before all those with base_gfn = npages = 0. +> - * The ">=" is needed when creating a slot with base_gfn == 0, +> - * so that it moves before all those with base_gfn == npages == 0. > - * > - * On the other hand, if new->npages is zero, the above loop has > - * already left i pointing to the beginning of the empty part of @@ -482,3 +482,9 @@ I was confused in that patch, then... -- Peter Xu + + +_______________________________________________ +linux-arm-kernel mailing list +linux-arm-kernel@lists.infradead.org +http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/a/content_digest b/N3/content_digest index c67a958..3374565 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -2,36 +2,36 @@ "ref\020200121223157.15263-18-sean.j.christopherson@intel.com\0" "From\0Peter Xu <peterx@redhat.com>\0" "Subject\0Re: [PATCH v5 17/19] KVM: Terminate memslot walks via used_slots\0" - "Date\0Thu, 06 Feb 2020 21:09:44 +0000\0" + "Date\0Thu, 6 Feb 2020 16:09:44 -0500\0" "To\0Sean Christopherson <sean.j.christopherson@intel.com>\0" - "Cc\0Paolo Bonzini <pbonzini@redhat.com>" + "Cc\0Wanpeng Li <wanpengli@tencent.com>" + kvm@vger.kernel.org + David Hildenbrand <david@redhat.com> + linux-mips@vger.kernel.org Paul Mackerras <paulus@ozlabs.org> - Christian Borntraeger <borntraeger@de.ibm.com> + kvmarm@lists.cs.columbia.edu Janosch Frank <frankja@linux.ibm.com> - David Hildenbrand <david@redhat.com> - Cornelia Huck <cohuck@redhat.com> - Vitaly Kuznetsov <vkuznets@redhat.com> - Wanpeng Li <wanpengli@tencent.com> - Jim Mattson <jmattson@google.com> - Joerg Roedel <joro@8bytes.org> Marc Zyngier <maz@kernel.org> - James Morse <james.morse@arm.com> + Joerg Roedel <joro@8bytes.org> + Christian Borntraeger <borntraeger@de.ibm.com> Julien Thierry <julien.thierry.kdev@gmail.com> Suzuki K Poulose <suzuki.poulose@arm.com> - linux-mips@vger.kernel.org - kvm@vger.kernel.org kvm-ppc@vger.kernel.org linux-arm-kernel@lists.infradead.org - kvmarm@lists.cs.columbia.edu - linux-kernel@vger.kernel.org + Jim Mattson <jmattson@google.com> + Cornelia Huck <cohuck@redhat.com> Christoffer Dall <christoffer.dall@arm.com> + linux-kernel@vger.kernel.org + James Morse <james.morse@arm.com> + Paolo Bonzini <pbonzini@redhat.com> + Vitaly Kuznetsov <vkuznets@redhat.com> " Philippe Mathieu-Daud\303\251 <f4bug@amsat.org>\0" "\00:1\0" "b\0" "On Tue, Jan 21, 2020 at 02:31:55PM -0800, Sean Christopherson wrote:\n" "> Refactor memslot handling to treat the number of used slots as the de\n" "> facto size of the memslot array, e.g. return NULL from id_to_memslot()\n" - "> when an invalid index is provided instead of relying on npages=0 to\n" + "> when an invalid index is provided instead of relying on npages==0 to\n" "> detect an invalid memslot. Rework the sorting and walking of memslots\n" "> in advance of dynamically sizing memslots to aid bisection and debug,\n" "> e.g. with luck, a bug in the refactoring will bisect here and/or hit a\n" @@ -228,7 +228,7 @@ "> +\tstruct kvm_memory_slot *mslots = slots->memslots;\n" "> +\tint i;\n" "> +\n" - "> +\tif (WARN_ON(slots->id_to_index[memslot->id] = -1))\n" + "> +\tif (WARN_ON(slots->id_to_index[memslot->id] == -1))\n" "> +\t\treturn;\n" "> +\n" "> +\tslots->used_slots--;\n" @@ -274,7 +274,7 @@ "> +\tstruct kvm_memory_slot *mslots = slots->memslots;\n" "> +\tint i;\n" "> +\n" - "> +\tif (WARN_ON_ONCE(slots->id_to_index[memslot->id] = -1) ||\n" + "> +\tif (WARN_ON_ONCE(slots->id_to_index[memslot->id] == -1) ||\n" "> +\t WARN_ON_ONCE(!slots->used_slots))\n" "> +\t\treturn -1;\n" "> +\n" @@ -287,7 +287,7 @@ "> +\t\tif (memslot->base_gfn > mslots[i + 1].base_gfn)\n" "> +\t\t\tbreak;\n" "> +\n" - "> +\t\tWARN_ON_ONCE(memslot->base_gfn = mslots[i + 1].base_gfn);\n" + "> +\t\tWARN_ON_ONCE(memslot->base_gfn == mslots[i + 1].base_gfn);\n" "\n" "Will this trigger? Note that in __kvm_set_memory_region() we have\n" "already checked overlap of memslots.\n" @@ -325,7 +325,7 @@ " after the refactoring it should not matter any more)\n" "\n" "> +\n" - "> +\t\tWARN_ON_ONCE(memslot->base_gfn = mslots[i - 1].base_gfn);\n" + "> +\t\tWARN_ON_ONCE(memslot->base_gfn == mslots[i - 1].base_gfn);\n" "\n" "Same here.\n" "\n" @@ -401,10 +401,10 @@ "> -\tdefault:\n" "> -\t\tbreak;\n" "> -\t}\n" - "> +\tif (change = KVM_MR_DELETE) {\n" + "> +\tif (change == KVM_MR_DELETE) {\n" "> +\t\tkvm_memslot_delete(slots, memslot);\n" "> +\t} else {\n" - "> +\t\tif (change = KVM_MR_CREATE)\n" + "> +\t\tif (change == KVM_MR_CREATE)\n" "> +\t\t\ti = kvm_memslot_insert_back(slots);\n" "> +\t\telse\n" "> +\t\t\ti = kvm_memslot_move_backward(slots, memslot);\n" @@ -426,8 +426,8 @@ "> \t}\n" "> -\n" "> -\t/*\n" - "> -\t * The \">=\" is needed when creating a slot with base_gfn = 0,\n" - "> -\t * so that it moves before all those with base_gfn = npages = 0.\n" + "> -\t * The \">=\" is needed when creating a slot with base_gfn == 0,\n" + "> -\t * so that it moves before all those with base_gfn == npages == 0.\n" "> -\t *\n" "> -\t * On the other hand, if new->npages is zero, the above loop has\n" "> -\t * already left i pointing to the beginning of the empty part of\n" @@ -511,6 +511,12 @@ "> \n" "\n" "-- \n" - Peter Xu + "Peter Xu\n" + "\n" + "\n" + "_______________________________________________\n" + "linux-arm-kernel mailing list\n" + "linux-arm-kernel@lists.infradead.org\n" + http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -85451164ba1e3f3990c4b18c0088cd62c7da900cb64396d69d753e3cd6518d3c +bf22f835a59b4346fcf377e23ccc85fc8f5e66acb010259e2bcdfab7a28ddfe8
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.