diff for duplicates of <Y3RDPOerOIf6SwI0@google.com> diff --git a/a/1.txt b/N1/1.txt index 9fa2422..543ea15 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -8,7 +8,7 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + } > > + > > + if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > + ??? !boot_cpu_has(X86_FEATURE_VMX)) { +> > + !boot_cpu_has(X86_FEATURE_VMX)) { > > + pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n"); > > + return false; > > + } @@ -16,21 +16,25 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + return true; > > +} > > + -> > ?static int __init vmx_check_processor_compat(void) -> > ?{ -> > ? struct vmcs_config vmcs_conf; -> > ? struct vmx_capability vmx_cap; -> > ? +> > static int __init vmx_check_processor_compat(void) +> > { +> > struct vmcs_config vmcs_conf; +> > struct vmx_capability vmx_cap; +> > > > - if (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > - ??? !this_cpu_has(X86_FEATURE_VMX)) { +> > - !this_cpu_has(X86_FEATURE_VMX)) { > > - pr_err("VMX is disabled on CPU %d\n", smp_processor_id()); > > + if (!kvm_is_vmx_supported()) -> > ? return -EIO; +> > return -EIO; > > - } -> > ? +> > > > Looks there's a functional change here -- the old code checks local cpu's > feature bits but the new code always checks bsp's feature bits. Should have no > problem I think, though. Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch! +_______________________________________________ +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 370e7e7..475a702 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,9 +2,44 @@ "ref\020221102231911.3107438-34-seanjc@google.com\0" "ref\095c3cce88560024566f3b4b0061ca7e62a8a4286.camel@intel.com\0" "From\0Sean Christopherson <seanjc@google.com>\0" - "Subject\0[PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" + "Subject\0Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" "Date\0Wed, 16 Nov 2022 01:56:12 +0000\0" - "To\0kvm-riscv@lists.infradead.org\0" + "To\0Huang" + " Kai <kai.huang@intel.com>\0" + "Cc\0mjrosato@linux.ibm.com <mjrosato@linux.ibm.com>" + david@redhat.com <david@redhat.com> + Yao + Yuan <yuan.yao@intel.com> + linux-mips@vger.kernel.org <linux-mips@vger.kernel.org> + linux-riscv@lists.infradead.org <linux-riscv@lists.infradead.org> + imbrenda@linux.ibm.com <imbrenda@linux.ibm.com> + kvmarm@lists.cs.columbia.edu <kvmarm@lists.cs.columbia.edu> + linux-s390@vger.kernel.org <linux-s390@vger.kernel.org> + frankja@linux.ibm.com <frankja@linux.ibm.com> + mpe@ellerman.id.au <mpe@ellerman.id.au> + chenhuacai@kernel.org <chenhuacai@kernel.org> + aleksandar.qemu.devel@gmail.com <aleksandar.qemu.devel@gmail.com> + borntraeger@linux.ibm.com <borntraeger@linux.ibm.com> + Gao + Chao <chao.gao@intel.com> + farman@linux.ibm.com <farman@linux.ibm.com> + aou@eecs.berkeley.edu <aou@eecs.berkeley.edu> + kvm@vger.kernel.org <kvm@vger.kernel.org> + paul.walmsley@sifive.com <paul.walmsley@sifive.com> + kvmarm@lists.linux.dev <kvmarm@lists.linux.dev> + tglx@linutronix.de <tglx@linutronix.de> + linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> + Yamahata + Isaku <isaku.yamahata@intel.com> + atishp@atishpatra.org <atishp@atishpatra.org> + farosas@linux.ibm.com <farosas@linux.ibm.com> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + palmer@dabbelt.com <palmer@dabbelt.com> + kvm-riscv@lists.infradead.org <kvm-riscv@lists.infradead.org> + maz@kernel.org <maz@kernel.org> + pbonzini@redhat.com <pbonzini@redhat.com> + vkuznets@redhat.com <vkuznets@redhat.com> + " linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org>\0" "\00:1\0" "b\0" "On Tue, Nov 15, 2022, Huang, Kai wrote:\n" @@ -17,7 +52,7 @@ "> > +\t}\n" "> > +\n" "> > +\tif (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > +\t??? !boot_cpu_has(X86_FEATURE_VMX)) {\n" + "> > +\t\302\240\302\240\302\240 !boot_cpu_has(X86_FEATURE_VMX)) {\n" "> > +\t\tpr_err(\"VMX not enabled in MSR_IA32_FEAT_CTL\\n\");\n" "> > +\t\treturn false;\n" "> > +\t}\n" @@ -25,23 +60,27 @@ "> > +\treturn true;\n" "> > +}\n" "> > +\n" - "> > ?static int __init vmx_check_processor_compat(void)\n" - "> > ?{\n" - "> > ?\tstruct vmcs_config vmcs_conf;\n" - "> > ?\tstruct vmx_capability vmx_cap;\n" - "> > ?\n" + "> > \302\240static int __init vmx_check_processor_compat(void)\n" + "> > \302\240{\n" + "> > \302\240\tstruct vmcs_config vmcs_conf;\n" + "> > \302\240\tstruct vmx_capability vmx_cap;\n" + "> > \302\240\n" "> > -\tif (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > -\t??? !this_cpu_has(X86_FEATURE_VMX)) {\n" + "> > -\t\302\240\302\240\302\240 !this_cpu_has(X86_FEATURE_VMX)) {\n" "> > -\t\tpr_err(\"VMX is disabled on CPU %d\\n\", smp_processor_id());\n" "> > +\tif (!kvm_is_vmx_supported())\n" - "> > ?\t\treturn -EIO;\n" + "> > \302\240\t\treturn -EIO;\n" "> > -\t}\n" - "> > ?\n" + "> > \302\240\n" "> \n" "> Looks there's a functional change here -- the old code checks local cpu's\n" "> feature bits but the new code always checks bsp's feature bits. Should have no\n" "> problem I think, though.\n" "\n" - Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch! + "Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch!\n" + "_______________________________________________\n" + "kvmarm mailing list\n" + "kvmarm@lists.cs.columbia.edu\n" + https://lists.cs.columbia.edu/mailman/listinfo/kvmarm -65fdf2a7b49ddd3876f5de7ed503856fc0e5db33684a71b07b4db72cb4a83315 +9488b4b9d704c9a94cb7dcacd68c98ce2145de23aeb17705774161c1932d6a95
diff --git a/a/1.txt b/N2/1.txt index 9fa2422..7e22f89 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -8,7 +8,7 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + } > > + > > + if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > + ??? !boot_cpu_has(X86_FEATURE_VMX)) { +> > + !boot_cpu_has(X86_FEATURE_VMX)) { > > + pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n"); > > + return false; > > + } @@ -16,18 +16,18 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + return true; > > +} > > + -> > ?static int __init vmx_check_processor_compat(void) -> > ?{ -> > ? struct vmcs_config vmcs_conf; -> > ? struct vmx_capability vmx_cap; -> > ? +> > static int __init vmx_check_processor_compat(void) +> > { +> > struct vmcs_config vmcs_conf; +> > struct vmx_capability vmx_cap; +> > > > - if (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > - ??? !this_cpu_has(X86_FEATURE_VMX)) { +> > - !this_cpu_has(X86_FEATURE_VMX)) { > > - pr_err("VMX is disabled on CPU %d\n", smp_processor_id()); > > + if (!kvm_is_vmx_supported()) -> > ? return -EIO; +> > return -EIO; > > - } -> > ? +> > > > Looks there's a functional change here -- the old code checks local cpu's > feature bits but the new code always checks bsp's feature bits. Should have no diff --git a/a/content_digest b/N2/content_digest index 370e7e7..507367a 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -2,9 +2,49 @@ "ref\020221102231911.3107438-34-seanjc@google.com\0" "ref\095c3cce88560024566f3b4b0061ca7e62a8a4286.camel@intel.com\0" "From\0Sean Christopherson <seanjc@google.com>\0" - "Subject\0[PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" + "Subject\0Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" "Date\0Wed, 16 Nov 2022 01:56:12 +0000\0" - "To\0kvm-riscv@lists.infradead.org\0" + "To\0Huang" + " Kai <kai.huang@intel.com>\0" + "Cc\0imbrenda@linux.ibm.com <imbrenda@linux.ibm.com>" + aou@eecs.berkeley.edu <aou@eecs.berkeley.edu> + mjrosato@linux.ibm.com <mjrosato@linux.ibm.com> + vkuznets@redhat.com <vkuznets@redhat.com> + farman@linux.ibm.com <farman@linux.ibm.com> + chenhuacai@kernel.org <chenhuacai@kernel.org> + paul.walmsley@sifive.com <paul.walmsley@sifive.com> + palmer@dabbelt.com <palmer@dabbelt.com> + maz@kernel.org <maz@kernel.org> + anup@brainfault.org <anup@brainfault.org> + pbonzini@redhat.com <pbonzini@redhat.com> + borntraeger@linux.ibm.com <borntraeger@linux.ibm.com> + aleksandar.qemu.devel@gmail.com <aleksandar.qemu.devel@gmail.com> + frankja@linux.ibm.com <frankja@linux.ibm.com> + oliver.upton@linux.dev <oliver.upton@linux.dev> + kvm@vger.kernel.org <kvm@vger.kernel.org> + Yao + Yuan <yuan.yao@intel.com> + farosas@linux.ibm.com <farosas@linux.ibm.com> + david@redhat.com <david@redhat.com> + james.morse@arm.com <james.morse@arm.com> + mpe@ellerman.id.au <mpe@ellerman.id.au> + alexandru.elisei@arm.com <alexandru.elisei@arm.com> + linux-s390@vger.kernel.org <linux-s390@vger.kernel.org> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + tglx@linutronix.de <tglx@linutronix.de> + Yamahata + Isaku <isaku.yamahata@intel.com> + kvmarm@lists.linux.dev <kvmarm@lists.linux.dev> + suzuki.poulose@arm.com <suzuki.poulose@arm.com> + kvm-riscv@lists.infradead.org <kvm-riscv@lists.infradead.org> + linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org> + linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> + linux-mips@vger.kernel.org <linux-mips@vger.kernel.org> + kvmarm@lists.cs.columbia.edu <kvmarm@lists.cs.columbia.edu> + Gao + Chao <chao.gao@intel.com> + atishp@atishpatra.org <atishp@atishpatra.org> + " linux-riscv@lists.infradead.org <linux-riscv@lists.infradead.org>\0" "\00:1\0" "b\0" "On Tue, Nov 15, 2022, Huang, Kai wrote:\n" @@ -17,7 +57,7 @@ "> > +\t}\n" "> > +\n" "> > +\tif (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > +\t??? !boot_cpu_has(X86_FEATURE_VMX)) {\n" + "> > +\t\302\240\302\240\302\240 !boot_cpu_has(X86_FEATURE_VMX)) {\n" "> > +\t\tpr_err(\"VMX not enabled in MSR_IA32_FEAT_CTL\\n\");\n" "> > +\t\treturn false;\n" "> > +\t}\n" @@ -25,18 +65,18 @@ "> > +\treturn true;\n" "> > +}\n" "> > +\n" - "> > ?static int __init vmx_check_processor_compat(void)\n" - "> > ?{\n" - "> > ?\tstruct vmcs_config vmcs_conf;\n" - "> > ?\tstruct vmx_capability vmx_cap;\n" - "> > ?\n" + "> > \302\240static int __init vmx_check_processor_compat(void)\n" + "> > \302\240{\n" + "> > \302\240\tstruct vmcs_config vmcs_conf;\n" + "> > \302\240\tstruct vmx_capability vmx_cap;\n" + "> > \302\240\n" "> > -\tif (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > -\t??? !this_cpu_has(X86_FEATURE_VMX)) {\n" + "> > -\t\302\240\302\240\302\240 !this_cpu_has(X86_FEATURE_VMX)) {\n" "> > -\t\tpr_err(\"VMX is disabled on CPU %d\\n\", smp_processor_id());\n" "> > +\tif (!kvm_is_vmx_supported())\n" - "> > ?\t\treturn -EIO;\n" + "> > \302\240\t\treturn -EIO;\n" "> > -\t}\n" - "> > ?\n" + "> > \302\240\n" "> \n" "> Looks there's a functional change here -- the old code checks local cpu's\n" "> feature bits but the new code always checks bsp's feature bits. Should have no\n" @@ -44,4 +84,4 @@ "\n" Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch! -65fdf2a7b49ddd3876f5de7ed503856fc0e5db33684a71b07b4db72cb4a83315 +ea370a69f949f14e1fea317b39f3714f00d372ffc976a756578fc52e86faca80
diff --git a/a/1.txt b/N3/1.txt index 9fa2422..a7319fc 100644 --- a/a/1.txt +++ b/N3/1.txt @@ -8,7 +8,7 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + } > > + > > + if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > + ??? !boot_cpu_has(X86_FEATURE_VMX)) { +> > + !boot_cpu_has(X86_FEATURE_VMX)) { > > + pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n"); > > + return false; > > + } @@ -16,21 +16,26 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + return true; > > +} > > + -> > ?static int __init vmx_check_processor_compat(void) -> > ?{ -> > ? struct vmcs_config vmcs_conf; -> > ? struct vmx_capability vmx_cap; -> > ? +> > static int __init vmx_check_processor_compat(void) +> > { +> > struct vmcs_config vmcs_conf; +> > struct vmx_capability vmx_cap; +> > > > - if (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > - ??? !this_cpu_has(X86_FEATURE_VMX)) { +> > - !this_cpu_has(X86_FEATURE_VMX)) { > > - pr_err("VMX is disabled on CPU %d\n", smp_processor_id()); > > + if (!kvm_is_vmx_supported()) -> > ? return -EIO; +> > return -EIO; > > - } -> > ? +> > > > Looks there's a functional change here -- the old code checks local cpu's > feature bits but the new code always checks bsp's feature bits. Should have no > problem I think, though. Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch! + +_______________________________________________ +linux-riscv mailing list +linux-riscv@lists.infradead.org +http://lists.infradead.org/mailman/listinfo/linux-riscv diff --git a/a/content_digest b/N3/content_digest index 370e7e7..dcce75d 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -2,9 +2,49 @@ "ref\020221102231911.3107438-34-seanjc@google.com\0" "ref\095c3cce88560024566f3b4b0061ca7e62a8a4286.camel@intel.com\0" "From\0Sean Christopherson <seanjc@google.com>\0" - "Subject\0[PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" + "Subject\0Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" "Date\0Wed, 16 Nov 2022 01:56:12 +0000\0" - "To\0kvm-riscv@lists.infradead.org\0" + "To\0Huang" + " Kai <kai.huang@intel.com>\0" + "Cc\0imbrenda@linux.ibm.com <imbrenda@linux.ibm.com>" + aou@eecs.berkeley.edu <aou@eecs.berkeley.edu> + mjrosato@linux.ibm.com <mjrosato@linux.ibm.com> + vkuznets@redhat.com <vkuznets@redhat.com> + farman@linux.ibm.com <farman@linux.ibm.com> + chenhuacai@kernel.org <chenhuacai@kernel.org> + paul.walmsley@sifive.com <paul.walmsley@sifive.com> + palmer@dabbelt.com <palmer@dabbelt.com> + maz@kernel.org <maz@kernel.org> + anup@brainfault.org <anup@brainfault.org> + pbonzini@redhat.com <pbonzini@redhat.com> + borntraeger@linux.ibm.com <borntraeger@linux.ibm.com> + aleksandar.qemu.devel@gmail.com <aleksandar.qemu.devel@gmail.com> + frankja@linux.ibm.com <frankja@linux.ibm.com> + oliver.upton@linux.dev <oliver.upton@linux.dev> + kvm@vger.kernel.org <kvm@vger.kernel.org> + Yao + Yuan <yuan.yao@intel.com> + farosas@linux.ibm.com <farosas@linux.ibm.com> + david@redhat.com <david@redhat.com> + james.morse@arm.com <james.morse@arm.com> + mpe@ellerman.id.au <mpe@ellerman.id.au> + alexandru.elisei@arm.com <alexandru.elisei@arm.com> + linux-s390@vger.kernel.org <linux-s390@vger.kernel.org> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + tglx@linutronix.de <tglx@linutronix.de> + Yamahata + Isaku <isaku.yamahata@intel.com> + kvmarm@lists.linux.dev <kvmarm@lists.linux.dev> + suzuki.poulose@arm.com <suzuki.poulose@arm.com> + kvm-riscv@lists.infradead.org <kvm-riscv@lists.infradead.org> + linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org> + linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> + linux-mips@vger.kernel.org <linux-mips@vger.kernel.org> + kvmarm@lists.cs.columbia.edu <kvmarm@lists.cs.columbia.edu> + Gao + Chao <chao.gao@intel.com> + atishp@atishpatra.org <atishp@atishpatra.org> + " linux-riscv@lists.infradead.org <linux-riscv@lists.infradead.org>\0" "\00:1\0" "b\0" "On Tue, Nov 15, 2022, Huang, Kai wrote:\n" @@ -17,7 +57,7 @@ "> > +\t}\n" "> > +\n" "> > +\tif (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > +\t??? !boot_cpu_has(X86_FEATURE_VMX)) {\n" + "> > +\t\302\240\302\240\302\240 !boot_cpu_has(X86_FEATURE_VMX)) {\n" "> > +\t\tpr_err(\"VMX not enabled in MSR_IA32_FEAT_CTL\\n\");\n" "> > +\t\treturn false;\n" "> > +\t}\n" @@ -25,23 +65,28 @@ "> > +\treturn true;\n" "> > +}\n" "> > +\n" - "> > ?static int __init vmx_check_processor_compat(void)\n" - "> > ?{\n" - "> > ?\tstruct vmcs_config vmcs_conf;\n" - "> > ?\tstruct vmx_capability vmx_cap;\n" - "> > ?\n" + "> > \302\240static int __init vmx_check_processor_compat(void)\n" + "> > \302\240{\n" + "> > \302\240\tstruct vmcs_config vmcs_conf;\n" + "> > \302\240\tstruct vmx_capability vmx_cap;\n" + "> > \302\240\n" "> > -\tif (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > -\t??? !this_cpu_has(X86_FEATURE_VMX)) {\n" + "> > -\t\302\240\302\240\302\240 !this_cpu_has(X86_FEATURE_VMX)) {\n" "> > -\t\tpr_err(\"VMX is disabled on CPU %d\\n\", smp_processor_id());\n" "> > +\tif (!kvm_is_vmx_supported())\n" - "> > ?\t\treturn -EIO;\n" + "> > \302\240\t\treturn -EIO;\n" "> > -\t}\n" - "> > ?\n" + "> > \302\240\n" "> \n" "> Looks there's a functional change here -- the old code checks local cpu's\n" "> feature bits but the new code always checks bsp's feature bits. Should have no\n" "> problem I think, though.\n" "\n" - Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch! + "Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch!\n" + "\n" + "_______________________________________________\n" + "linux-riscv mailing list\n" + "linux-riscv@lists.infradead.org\n" + http://lists.infradead.org/mailman/listinfo/linux-riscv -65fdf2a7b49ddd3876f5de7ed503856fc0e5db33684a71b07b4db72cb4a83315 +68254cec9c882cd8744d086701b81ddc0da90f8802535c2ff1b5704e2d7e5f17
diff --git a/a/1.txt b/N4/1.txt index 9fa2422..7e22f89 100644 --- a/a/1.txt +++ b/N4/1.txt @@ -8,7 +8,7 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + } > > + > > + if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > + ??? !boot_cpu_has(X86_FEATURE_VMX)) { +> > + !boot_cpu_has(X86_FEATURE_VMX)) { > > + pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n"); > > + return false; > > + } @@ -16,18 +16,18 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + return true; > > +} > > + -> > ?static int __init vmx_check_processor_compat(void) -> > ?{ -> > ? struct vmcs_config vmcs_conf; -> > ? struct vmx_capability vmx_cap; -> > ? +> > static int __init vmx_check_processor_compat(void) +> > { +> > struct vmcs_config vmcs_conf; +> > struct vmx_capability vmx_cap; +> > > > - if (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > - ??? !this_cpu_has(X86_FEATURE_VMX)) { +> > - !this_cpu_has(X86_FEATURE_VMX)) { > > - pr_err("VMX is disabled on CPU %d\n", smp_processor_id()); > > + if (!kvm_is_vmx_supported()) -> > ? return -EIO; +> > return -EIO; > > - } -> > ? +> > > > Looks there's a functional change here -- the old code checks local cpu's > feature bits but the new code always checks bsp's feature bits. Should have no diff --git a/a/content_digest b/N4/content_digest index 370e7e7..35b195f 100644 --- a/a/content_digest +++ b/N4/content_digest @@ -2,9 +2,48 @@ "ref\020221102231911.3107438-34-seanjc@google.com\0" "ref\095c3cce88560024566f3b4b0061ca7e62a8a4286.camel@intel.com\0" "From\0Sean Christopherson <seanjc@google.com>\0" - "Subject\0[PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" + "Subject\0Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" "Date\0Wed, 16 Nov 2022 01:56:12 +0000\0" - "To\0kvm-riscv@lists.infradead.org\0" + "To\0Huang" + " Kai <kai.huang@intel.com>\0" + "Cc\0mjrosato@linux.ibm.com <mjrosato@linux.ibm.com>" + david@redhat.com <david@redhat.com> + Yao + Yuan <yuan.yao@intel.com> + linux-mips@vger.kernel.org <linux-mips@vger.kernel.org> + linux-riscv@lists.infradead.org <linux-riscv@lists.infradead.org> + imbrenda@linux.ibm.com <imbrenda@linux.ibm.com> + kvmarm@lists.cs.columbia.edu <kvmarm@lists.cs.columbia.edu> + linux-s390@vger.kernel.org <linux-s390@vger.kernel.org> + frankja@linux.ibm.com <frankja@linux.ibm.com> + chenhuacai@kernel.org <chenhuacai@kernel.org> + aleksandar.qemu.devel@gmail.com <aleksandar.qemu.devel@gmail.com> + james.morse@arm.com <james.morse@arm.com> + borntraeger@linux.ibm.com <borntraeger@linux.ibm.com> + Gao + Chao <chao.gao@intel.com> + farman@linux.ibm.com <farman@linux.ibm.com> + aou@eecs.berkeley.edu <aou@eecs.berkeley.edu> + suzuki.poulose@arm.com <suzuki.poulose@arm.com> + kvm@vger.kernel.org <kvm@vger.kernel.org> + paul.walmsley@sifive.com <paul.walmsley@sifive.com> + kvmarm@lists.linux .dev <kvmarm@lists.linux.dev> + tglx@linutronix.de <tglx@linutronix.de> + alexandru.elisei@arm.com <alexandru.elisei@arm.com> + linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> + Yamahata + Isaku <isaku.yamahata@intel.com> + atishp@atishpatra.org <atishp@atishpatra.org> + farosas@linux.ibm.com <farosas@linux.ibm.com> + anup@brainfault.org <anup@brainfault.org> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + oliver.upton@linux.dev <oliver.upton@linux.dev> + palmer@dabbelt.com <palmer@dabbelt.com> + kvm-riscv@lists.infradead.org <kvm-riscv@lists.infradead.org> + maz@kernel.org <maz@kernel.org> + pbonzini@redhat.com <pbonzini@redhat.com> + vkuznets@redhat.com <vkuznets@redhat.com> + " linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org>\0" "\00:1\0" "b\0" "On Tue, Nov 15, 2022, Huang, Kai wrote:\n" @@ -17,7 +56,7 @@ "> > +\t}\n" "> > +\n" "> > +\tif (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > +\t??? !boot_cpu_has(X86_FEATURE_VMX)) {\n" + "> > +\t\302\240\302\240\302\240 !boot_cpu_has(X86_FEATURE_VMX)) {\n" "> > +\t\tpr_err(\"VMX not enabled in MSR_IA32_FEAT_CTL\\n\");\n" "> > +\t\treturn false;\n" "> > +\t}\n" @@ -25,18 +64,18 @@ "> > +\treturn true;\n" "> > +}\n" "> > +\n" - "> > ?static int __init vmx_check_processor_compat(void)\n" - "> > ?{\n" - "> > ?\tstruct vmcs_config vmcs_conf;\n" - "> > ?\tstruct vmx_capability vmx_cap;\n" - "> > ?\n" + "> > \302\240static int __init vmx_check_processor_compat(void)\n" + "> > \302\240{\n" + "> > \302\240\tstruct vmcs_config vmcs_conf;\n" + "> > \302\240\tstruct vmx_capability vmx_cap;\n" + "> > \302\240\n" "> > -\tif (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > -\t??? !this_cpu_has(X86_FEATURE_VMX)) {\n" + "> > -\t\302\240\302\240\302\240 !this_cpu_has(X86_FEATURE_VMX)) {\n" "> > -\t\tpr_err(\"VMX is disabled on CPU %d\\n\", smp_processor_id());\n" "> > +\tif (!kvm_is_vmx_supported())\n" - "> > ?\t\treturn -EIO;\n" + "> > \302\240\t\treturn -EIO;\n" "> > -\t}\n" - "> > ?\n" + "> > \302\240\n" "> \n" "> Looks there's a functional change here -- the old code checks local cpu's\n" "> feature bits but the new code always checks bsp's feature bits. Should have no\n" @@ -44,4 +83,4 @@ "\n" Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch! -65fdf2a7b49ddd3876f5de7ed503856fc0e5db33684a71b07b4db72cb4a83315 +9cff6dede26638912161f3779abdb27a73d5479ef559f5988c2d3a54037dd66a
diff --git a/a/1.txt b/N5/1.txt index 9fa2422..770e747 100644 --- a/a/1.txt +++ b/N5/1.txt @@ -8,7 +8,7 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + } > > + > > + if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > + ??? !boot_cpu_has(X86_FEATURE_VMX)) { +> > + !boot_cpu_has(X86_FEATURE_VMX)) { > > + pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n"); > > + return false; > > + } @@ -16,21 +16,26 @@ On Tue, Nov 15, 2022, Huang, Kai wrote: > > + return true; > > +} > > + -> > ?static int __init vmx_check_processor_compat(void) -> > ?{ -> > ? struct vmcs_config vmcs_conf; -> > ? struct vmx_capability vmx_cap; -> > ? +> > static int __init vmx_check_processor_compat(void) +> > { +> > struct vmcs_config vmcs_conf; +> > struct vmx_capability vmx_cap; +> > > > - if (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || -> > - ??? !this_cpu_has(X86_FEATURE_VMX)) { +> > - !this_cpu_has(X86_FEATURE_VMX)) { > > - pr_err("VMX is disabled on CPU %d\n", smp_processor_id()); > > + if (!kvm_is_vmx_supported()) -> > ? return -EIO; +> > return -EIO; > > - } -> > ? +> > > > Looks there's a functional change here -- the old code checks local cpu's > feature bits but the new code always checks bsp's feature bits. Should have no > problem I think, though. Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch! + +_______________________________________________ +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/N5/content_digest index 370e7e7..c418dc1 100644 --- a/a/content_digest +++ b/N5/content_digest @@ -2,9 +2,49 @@ "ref\020221102231911.3107438-34-seanjc@google.com\0" "ref\095c3cce88560024566f3b4b0061ca7e62a8a4286.camel@intel.com\0" "From\0Sean Christopherson <seanjc@google.com>\0" - "Subject\0[PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" + "Subject\0Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code\0" "Date\0Wed, 16 Nov 2022 01:56:12 +0000\0" - "To\0kvm-riscv@lists.infradead.org\0" + "To\0Huang" + " Kai <kai.huang@intel.com>\0" + "Cc\0imbrenda@linux.ibm.com <imbrenda@linux.ibm.com>" + aou@eecs.berkeley.edu <aou@eecs.berkeley.edu> + mjrosato@linux.ibm.com <mjrosato@linux.ibm.com> + vkuznets@redhat.com <vkuznets@redhat.com> + farman@linux.ibm.com <farman@linux.ibm.com> + chenhuacai@kernel.org <chenhuacai@kernel.org> + paul.walmsley@sifive.com <paul.walmsley@sifive.com> + palmer@dabbelt.com <palmer@dabbelt.com> + maz@kernel.org <maz@kernel.org> + anup@brainfault.org <anup@brainfault.org> + pbonzini@redhat.com <pbonzini@redhat.com> + borntraeger@linux.ibm.com <borntraeger@linux.ibm.com> + aleksandar.qemu.devel@gmail.com <aleksandar.qemu.devel@gmail.com> + frankja@linux.ibm.com <frankja@linux.ibm.com> + oliver.upton@linux.dev <oliver.upton@linux.dev> + kvm@vger.kernel.org <kvm@vger.kernel.org> + Yao + Yuan <yuan.yao@intel.com> + farosas@linux.ibm.com <farosas@linux.ibm.com> + david@redhat.com <david@redhat.com> + james.morse@arm.com <james.morse@arm.com> + mpe@ellerman.id.au <mpe@ellerman.id.au> + alexandru.elisei@arm.com <alexandru.elisei@arm.com> + linux-s390@vger.kernel.org <linux-s390@vger.kernel.org> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + tglx@linutronix.de <tglx@linutronix.de> + Yamahata + Isaku <isaku.yamahata@intel.com> + kvmarm@lists.linux.dev <kvmarm@lists.linux.dev> + suzuki.poulose@arm.com <suzuki.poulose@arm.com> + kvm-riscv@lists.infradead.org <kvm-riscv@lists.infradead.org> + linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org> + linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> + linux-mips@vger.kernel.org <linux-mips@vger.kernel.org> + kvmarm@lists.cs.columbia.edu <kvmarm@lists.cs.columbia.edu> + Gao + Chao <chao.gao@intel.com> + atishp@atishpatra.org <atishp@atishpatra.org> + " linux-riscv@lists.infradead.org <linux-riscv@lists.infradead.org>\0" "\00:1\0" "b\0" "On Tue, Nov 15, 2022, Huang, Kai wrote:\n" @@ -17,7 +57,7 @@ "> > +\t}\n" "> > +\n" "> > +\tif (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > +\t??? !boot_cpu_has(X86_FEATURE_VMX)) {\n" + "> > +\t\302\240\302\240\302\240 !boot_cpu_has(X86_FEATURE_VMX)) {\n" "> > +\t\tpr_err(\"VMX not enabled in MSR_IA32_FEAT_CTL\\n\");\n" "> > +\t\treturn false;\n" "> > +\t}\n" @@ -25,23 +65,28 @@ "> > +\treturn true;\n" "> > +}\n" "> > +\n" - "> > ?static int __init vmx_check_processor_compat(void)\n" - "> > ?{\n" - "> > ?\tstruct vmcs_config vmcs_conf;\n" - "> > ?\tstruct vmx_capability vmx_cap;\n" - "> > ?\n" + "> > \302\240static int __init vmx_check_processor_compat(void)\n" + "> > \302\240{\n" + "> > \302\240\tstruct vmcs_config vmcs_conf;\n" + "> > \302\240\tstruct vmx_capability vmx_cap;\n" + "> > \302\240\n" "> > -\tif (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||\n" - "> > -\t??? !this_cpu_has(X86_FEATURE_VMX)) {\n" + "> > -\t\302\240\302\240\302\240 !this_cpu_has(X86_FEATURE_VMX)) {\n" "> > -\t\tpr_err(\"VMX is disabled on CPU %d\\n\", smp_processor_id());\n" "> > +\tif (!kvm_is_vmx_supported())\n" - "> > ?\t\treturn -EIO;\n" + "> > \302\240\t\treturn -EIO;\n" "> > -\t}\n" - "> > ?\n" + "> > \302\240\n" "> \n" "> Looks there's a functional change here -- the old code checks local cpu's\n" "> feature bits but the new code always checks bsp's feature bits. Should have no\n" "> problem I think, though.\n" "\n" - Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch! + "Ouch. The bad check will defeat the purpose of doing compat checks. Nice catch!\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 -65fdf2a7b49ddd3876f5de7ed503856fc0e5db33684a71b07b4db72cb4a83315 +33deb4032b8f6b7cd6b8d4cda689b2e11602a839068dd81e817d7daa74c80e98
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.