diff for duplicates of <20200207203909.GE720553@xz-x1> diff --git a/a/1.txt b/N1/1.txt index eb2d53b..7677220 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -15,7 +15,7 @@ On Fri, Feb 07, 2020 at 10:33:25AM -0800, Sean Christopherson wrote: > > Is this intended? > > Yes. It's possible to allow VA=0 for userspace mappings. It's extremely -> uncommon, but possible. Therefore "hva = 0" shouldn't be used to +> uncommon, but possible. Therefore "hva == 0" shouldn't be used to > indicate an invalid slot. Note that this is the deletion path in __x86_set_memory_region() not @@ -50,7 +50,7 @@ path so it shouldn't really matter. Or am I misunderstood somewhere? > > > + 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--; @@ -90,7 +90,7 @@ path so it shouldn't really matter. Or am I misunderstood somewhere? > difficult to understand that its *only* for the CREATE case, and I hate > having multi-line comments in if-else statements without brackets. > -> if (change = KVM_MR_CREATE) +> if (change == KVM_MR_CREATE) > i = slots->used_slots++ > else > i = kvm_memslot_move_backward(slots, memslot); @@ -121,7 +121,7 @@ Please feel free to keep the original code as you wish. > > Move forward towards the front, and backward towards the back. In the > languages I am familiar with, e.g. C++ STL, JavaScript, Python, and Golang, -> front=container[0] and back=container[len() - 1]. +> front==container[0] and back==container[len() - 1]. OK. @@ -130,7 +130,7 @@ OK. > > > + 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; > > > + @@ -143,7 +143,7 @@ OK. > > > + 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. @@ -196,3 +196,8 @@ Thanks, -- 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 c5d305d..cec36a3 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -4,29 +4,25 @@ "ref\020200207183325.GI2401@linux.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\0Fri, 07 Feb 2020 20:39:09 +0000\0" + "Date\0Fri, 7 Feb 2020 15:39:09 -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" @@ -47,7 +43,7 @@ "> > Is this intended?\n" "> \n" "> Yes. It's possible to allow VA=0 for userspace mappings. It's extremely\n" - "> uncommon, but possible. Therefore \"hva = 0\" shouldn't be used to\n" + "> uncommon, but possible. Therefore \"hva == 0\" shouldn't be used to\n" "> indicate an invalid slot.\n" "\n" "Note that this is the deletion path in __x86_set_memory_region() not\n" @@ -82,7 +78,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" @@ -122,7 +118,7 @@ "> difficult to understand that its *only* for the CREATE case, and I hate\n" "> having multi-line comments in if-else statements without brackets.\n" "> \n" - "> if (change = KVM_MR_CREATE)\n" + "> if (change == KVM_MR_CREATE)\n" "> i = slots->used_slots++\n" "> else\n" "> i = kvm_memslot_move_backward(slots, memslot);\n" @@ -153,7 +149,7 @@ "> \n" "> Move forward towards the front, and backward towards the back. In the\n" "> languages I am familiar with, e.g. C++ STL, JavaScript, Python, and Golang,\n" - "> front=container[0] and back=container[len() - 1].\n" + "> front==container[0] and back==container[len() - 1].\n" "\n" "OK.\n" "\n" @@ -162,7 +158,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" @@ -175,7 +171,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" @@ -227,6 +223,11 @@ "Thanks,\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 -64070a60cd9adb655b848294b9acf08bb13afe00d82b2fbad5e86d2d4f3586c2 +b632dd004a5fbc72ee8a1291e3e401f7febf2c222702a01fb1b3580cbbed95d0
diff --git a/a/1.txt b/N2/1.txt index eb2d53b..0d6979d 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -15,7 +15,7 @@ On Fri, Feb 07, 2020 at 10:33:25AM -0800, Sean Christopherson wrote: > > Is this intended? > > Yes. It's possible to allow VA=0 for userspace mappings. It's extremely -> uncommon, but possible. Therefore "hva = 0" shouldn't be used to +> uncommon, but possible. Therefore "hva == 0" shouldn't be used to > indicate an invalid slot. Note that this is the deletion path in __x86_set_memory_region() not @@ -50,7 +50,7 @@ path so it shouldn't really matter. Or am I misunderstood somewhere? > > > + 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--; @@ -90,7 +90,7 @@ path so it shouldn't really matter. Or am I misunderstood somewhere? > difficult to understand that its *only* for the CREATE case, and I hate > having multi-line comments in if-else statements without brackets. > -> if (change = KVM_MR_CREATE) +> if (change == KVM_MR_CREATE) > i = slots->used_slots++ > else > i = kvm_memslot_move_backward(slots, memslot); @@ -121,7 +121,7 @@ Please feel free to keep the original code as you wish. > > Move forward towards the front, and backward towards the back. In the > languages I am familiar with, e.g. C++ STL, JavaScript, Python, and Golang, -> front=container[0] and back=container[len() - 1]. +> front==container[0] and back==container[len() - 1]. OK. @@ -130,7 +130,7 @@ OK. > > > + 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; > > > + @@ -143,7 +143,7 @@ OK. > > > + 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. diff --git a/a/content_digest b/N2/content_digest index c5d305d..89bd5d6 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -4,7 +4,7 @@ "ref\020200207183325.GI2401@linux.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\0Fri, 07 Feb 2020 20:39:09 +0000\0" + "Date\0Fri, 7 Feb 2020 15:39:09 -0500\0" "To\0Sean Christopherson <sean.j.christopherson@intel.com>\0" "Cc\0Paolo Bonzini <pbonzini@redhat.com>" Paul Mackerras <paulus@ozlabs.org> @@ -47,7 +47,7 @@ "> > Is this intended?\n" "> \n" "> Yes. It's possible to allow VA=0 for userspace mappings. It's extremely\n" - "> uncommon, but possible. Therefore \"hva = 0\" shouldn't be used to\n" + "> uncommon, but possible. Therefore \"hva == 0\" shouldn't be used to\n" "> indicate an invalid slot.\n" "\n" "Note that this is the deletion path in __x86_set_memory_region() not\n" @@ -82,7 +82,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" @@ -122,7 +122,7 @@ "> difficult to understand that its *only* for the CREATE case, and I hate\n" "> having multi-line comments in if-else statements without brackets.\n" "> \n" - "> if (change = KVM_MR_CREATE)\n" + "> if (change == KVM_MR_CREATE)\n" "> i = slots->used_slots++\n" "> else\n" "> i = kvm_memslot_move_backward(slots, memslot);\n" @@ -153,7 +153,7 @@ "> \n" "> Move forward towards the front, and backward towards the back. In the\n" "> languages I am familiar with, e.g. C++ STL, JavaScript, Python, and Golang,\n" - "> front=container[0] and back=container[len() - 1].\n" + "> front==container[0] and back==container[len() - 1].\n" "\n" "OK.\n" "\n" @@ -162,7 +162,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" @@ -175,7 +175,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" @@ -229,4 +229,4 @@ "-- \n" Peter Xu -64070a60cd9adb655b848294b9acf08bb13afe00d82b2fbad5e86d2d4f3586c2 +ded43a4959bbc3450bbf6e2bb22f64fa647c71c5fb099ae5e4adb443b58e9d29
diff --git a/a/1.txt b/N3/1.txt index eb2d53b..f94873e 100644 --- a/a/1.txt +++ b/N3/1.txt @@ -15,7 +15,7 @@ On Fri, Feb 07, 2020 at 10:33:25AM -0800, Sean Christopherson wrote: > > Is this intended? > > Yes. It's possible to allow VA=0 for userspace mappings. It's extremely -> uncommon, but possible. Therefore "hva = 0" shouldn't be used to +> uncommon, but possible. Therefore "hva == 0" shouldn't be used to > indicate an invalid slot. Note that this is the deletion path in __x86_set_memory_region() not @@ -50,7 +50,7 @@ path so it shouldn't really matter. Or am I misunderstood somewhere? > > > + 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--; @@ -90,7 +90,7 @@ path so it shouldn't really matter. Or am I misunderstood somewhere? > difficult to understand that its *only* for the CREATE case, and I hate > having multi-line comments in if-else statements without brackets. > -> if (change = KVM_MR_CREATE) +> if (change == KVM_MR_CREATE) > i = slots->used_slots++ > else > i = kvm_memslot_move_backward(slots, memslot); @@ -121,7 +121,7 @@ Please feel free to keep the original code as you wish. > > Move forward towards the front, and backward towards the back. In the > languages I am familiar with, e.g. C++ STL, JavaScript, Python, and Golang, -> front=container[0] and back=container[len() - 1]. +> front==container[0] and back==container[len() - 1]. OK. @@ -130,7 +130,7 @@ OK. > > > + 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; > > > + @@ -143,7 +143,7 @@ OK. > > > + 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. @@ -196,3 +196,9 @@ Thanks, -- 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 c5d305d..5999503 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -4,29 +4,29 @@ "ref\020200207183325.GI2401@linux.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\0Fri, 07 Feb 2020 20:39:09 +0000\0" + "Date\0Fri, 7 Feb 2020 15:39:09 -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" @@ -47,7 +47,7 @@ "> > Is this intended?\n" "> \n" "> Yes. It's possible to allow VA=0 for userspace mappings. It's extremely\n" - "> uncommon, but possible. Therefore \"hva = 0\" shouldn't be used to\n" + "> uncommon, but possible. Therefore \"hva == 0\" shouldn't be used to\n" "> indicate an invalid slot.\n" "\n" "Note that this is the deletion path in __x86_set_memory_region() not\n" @@ -82,7 +82,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" @@ -122,7 +122,7 @@ "> difficult to understand that its *only* for the CREATE case, and I hate\n" "> having multi-line comments in if-else statements without brackets.\n" "> \n" - "> if (change = KVM_MR_CREATE)\n" + "> if (change == KVM_MR_CREATE)\n" "> i = slots->used_slots++\n" "> else\n" "> i = kvm_memslot_move_backward(slots, memslot);\n" @@ -153,7 +153,7 @@ "> \n" "> Move forward towards the front, and backward towards the back. In the\n" "> languages I am familiar with, e.g. C++ STL, JavaScript, Python, and Golang,\n" - "> front=container[0] and back=container[len() - 1].\n" + "> front==container[0] and back==container[len() - 1].\n" "\n" "OK.\n" "\n" @@ -162,7 +162,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" @@ -175,7 +175,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" @@ -227,6 +227,12 @@ "Thanks,\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 -64070a60cd9adb655b848294b9acf08bb13afe00d82b2fbad5e86d2d4f3586c2 +fa29e1183486f8ee8f08ce84c33df8c88ef52759431b42cc8c3b0363f33959b8
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.