diff for duplicates of <20200207183325.GI2401@linux.intel.com> diff --git a/a/1.txt b/N1/1.txt index 90a7d34..20fc167 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -14,7 +14,7 @@ On Thu, Feb 06, 2020 at 04:09:44PM -0500, Peter Xu 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. > > + old_npages = slot->npages; @@ -44,7 +44,7 @@ indicate an invalid slot. > > + 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--; @@ -84,7 +84,7 @@ comment gets messy because putting it above the entire if-else makes it 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); @@ -109,13 +109,13 @@ having multi-line comments in if-else statements without brackets. 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]. > > +{ > > + 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; > > + @@ -128,7 +128,7 @@ front=container[0] and back=container[len() - 1]. > > + 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. @@ -215,4 +215,8 @@ iterator below. > > -- > 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 2d0f42f..58687e4 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,29 +3,25 @@ "ref\020200206210944.GD700495@xz-x1\0" "From\0Sean Christopherson <sean.j.christopherson@intel.com>\0" "Subject\0Re: [PATCH v5 17/19] KVM: Terminate memslot walks via used_slots\0" - "Date\0Fri, 07 Feb 2020 18:33:25 +0000\0" + "Date\0Fri, 7 Feb 2020 10:33:25 -0800\0" "To\0Peter Xu <peterx@redhat.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" @@ -45,7 +41,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" "> > +\t\told_npages = slot->npages;\n" @@ -75,7 +71,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" @@ -115,7 +111,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" @@ -140,13 +136,13 @@ "\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" "> > +{\n" "> > +\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" @@ -159,7 +155,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" @@ -246,6 +242,10 @@ "> \n" "> -- \n" "> Peter Xu\n" - > + "> \n" + "_______________________________________________\n" + "kvmarm mailing list\n" + "kvmarm@lists.cs.columbia.edu\n" + https://lists.cs.columbia.edu/mailman/listinfo/kvmarm -e9b1da13a213436f71be25f9ea068adde2ed3b466b21b368646ab9bfdef7a6c9 +996c1e07a6a93869196e167e44654b6d723da8bfc65436de8912b27369dff91c
diff --git a/a/1.txt b/N2/1.txt index 90a7d34..adc53dc 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -14,7 +14,7 @@ On Thu, Feb 06, 2020 at 04:09:44PM -0500, Peter Xu 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. > > + old_npages = slot->npages; @@ -44,7 +44,7 @@ indicate an invalid slot. > > + 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--; @@ -84,7 +84,7 @@ comment gets messy because putting it above the entire if-else makes it 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); @@ -109,13 +109,13 @@ having multi-line comments in if-else statements without brackets. 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]. > > +{ > > + 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; > > + @@ -128,7 +128,7 @@ front=container[0] and back=container[len() - 1]. > > + 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 2d0f42f..3fc883f 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -3,7 +3,7 @@ "ref\020200206210944.GD700495@xz-x1\0" "From\0Sean Christopherson <sean.j.christopherson@intel.com>\0" "Subject\0Re: [PATCH v5 17/19] KVM: Terminate memslot walks via used_slots\0" - "Date\0Fri, 07 Feb 2020 18:33:25 +0000\0" + "Date\0Fri, 7 Feb 2020 10:33:25 -0800\0" "To\0Peter Xu <peterx@redhat.com>\0" "Cc\0Paolo Bonzini <pbonzini@redhat.com>" Paul Mackerras <paulus@ozlabs.org> @@ -45,7 +45,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" "> > +\t\told_npages = slot->npages;\n" @@ -75,7 +75,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" @@ -115,7 +115,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" @@ -140,13 +140,13 @@ "\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" "> > +{\n" "> > +\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" @@ -159,7 +159,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" @@ -248,4 +248,4 @@ "> Peter Xu\n" > -e9b1da13a213436f71be25f9ea068adde2ed3b466b21b368646ab9bfdef7a6c9 +caea8970b4649821413e3d1411caa56c730aa321dd661ee72eee869a98f43ff4
diff --git a/a/1.txt b/N3/1.txt index 90a7d34..bb786ac 100644 --- a/a/1.txt +++ b/N3/1.txt @@ -14,7 +14,7 @@ On Thu, Feb 06, 2020 at 04:09:44PM -0500, Peter Xu 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. > > + old_npages = slot->npages; @@ -44,7 +44,7 @@ indicate an invalid slot. > > + 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--; @@ -84,7 +84,7 @@ comment gets messy because putting it above the entire if-else makes it 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); @@ -109,13 +109,13 @@ having multi-line comments in if-else statements without brackets. 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]. > > +{ > > + 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; > > + @@ -128,7 +128,7 @@ front=container[0] and back=container[len() - 1]. > > + 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. @@ -215,4 +215,9 @@ iterator below. > > -- > 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 2d0f42f..344d9ab 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -3,29 +3,29 @@ "ref\020200206210944.GD700495@xz-x1\0" "From\0Sean Christopherson <sean.j.christopherson@intel.com>\0" "Subject\0Re: [PATCH v5 17/19] KVM: Terminate memslot walks via used_slots\0" - "Date\0Fri, 07 Feb 2020 18:33:25 +0000\0" + "Date\0Fri, 7 Feb 2020 10:33:25 -0800\0" "To\0Peter Xu <peterx@redhat.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" @@ -45,7 +45,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" "> > +\t\told_npages = slot->npages;\n" @@ -75,7 +75,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" @@ -115,7 +115,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" @@ -140,13 +140,13 @@ "\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" "> > +{\n" "> > +\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" @@ -159,7 +159,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" @@ -246,6 +246,11 @@ "> \n" "> -- \n" "> 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 -e9b1da13a213436f71be25f9ea068adde2ed3b466b21b368646ab9bfdef7a6c9 +7ce84be1e819ffefc66ecd8e8d66ce7431db19134dec11d639498bcf9f71dca6
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.