* Re: [PATCH v14 04/19] x86/cpufeatures: Add SGX feature bits [not found] ` <20180926111139.GA12037@linux.intel.com> @ 2018-09-26 11:36 ` Borislav Petkov 2018-09-27 13:16 ` Jarkko Sakkinen 0 siblings, 1 reply; 4+ messages in thread From: Borislav Petkov @ 2018-09-26 11:36 UTC (permalink / raw) To: Jarkko Sakkinen Cc: x86, platform-driver-x86, dave.hansen, sean.j.christopherson, nhorman, npmccallum, serge.ayoun, shay.katz-zamir, linux-sgx, andriy.shevchenko, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Konrad Rzeszutek Wilk, David Woodhouse, David Wang, Kirill A. Shutemov, Levin, Alexander (Sasha Levin), Jia Zhang, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT), He Chen, Lu On Wed, Sep 26, 2018 at 02:11:39PM +0300, Jarkko Sakkinen wrote: > Thank you. I guess I understand what you want me to do i.e. > > + { X86_FEATURE_SGX1, CPUID_EAX, 0, 0x00000012, 0 }, > + { X86_FEATURE_SGX2, CPUID_EAX, 1, 0x00000012, 0 }, > + { X86_FEATURE_ENCLV, CPUID_EAX, 5, 0x00000012, 0 }, > + { X86_FEATURE_ENCLS_C, CPUID_EAX, 6, 0x00000012, 0 }, Yap. > What puzzles me is that I cannot find any call site for > get_scattered_cpuid_leaf(): > > $ git grep get_scattered > arch/x86/kernel/cpu/cpu.h:extern u32 get_scattered_cpuid_leaf(unsigned int level, > arch/x86/kernel/cpu/scattered.c:u32 get_scattered_cpuid_leaf(unsigned int level, unsigned int sub_leaf, > arch/x86/kernel/cpu/scattered.c:EXPORT_SYMBOL_GPL(get_scattered_cpuid_leaf); That used to be used in kvm last, see b7b27aa011a1df42728d1768fc181d9ce69e6911, which removed it. And it got added by 47bdf3378d62 ("x86/cpuid: Provide get_scattered_cpuid_leaf()") Lemme add those people to CC. If no one wants it, feel free to decomission it. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v14 04/19] x86/cpufeatures: Add SGX feature bits 2018-09-26 11:36 ` [PATCH v14 04/19] x86/cpufeatures: Add SGX feature bits Borislav Petkov @ 2018-09-27 13:16 ` Jarkko Sakkinen 2018-09-27 13:51 ` Borislav Petkov 0 siblings, 1 reply; 4+ messages in thread From: Jarkko Sakkinen @ 2018-09-27 13:16 UTC (permalink / raw) To: Borislav Petkov Cc: x86, platform-driver-x86, dave.hansen, sean.j.christopherson, nhorman, npmccallum, serge.ayoun, shay.katz-zamir, linux-sgx, andriy.shevchenko, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Konrad Rzeszutek Wilk, David Woodhouse, David Wang, Kirill A. Shutemov, Levin, Alexander (Sasha Levin), Jia Zhang, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT), He Chen, Lu On Wed, Sep 26, 2018 at 01:36:17PM +0200, Borislav Petkov wrote: > On Wed, Sep 26, 2018 at 02:11:39PM +0300, Jarkko Sakkinen wrote: > > Thank you. I guess I understand what you want me to do i.e. > > > > + { X86_FEATURE_SGX1, CPUID_EAX, 0, 0x00000012, 0 }, > > + { X86_FEATURE_SGX2, CPUID_EAX, 1, 0x00000012, 0 }, > > + { X86_FEATURE_ENCLV, CPUID_EAX, 5, 0x00000012, 0 }, > > + { X86_FEATURE_ENCLS_C, CPUID_EAX, 6, 0x00000012, 0 }, > > Yap. > > > What puzzles me is that I cannot find any call site for > > get_scattered_cpuid_leaf(): > > > > $ git grep get_scattered > > arch/x86/kernel/cpu/cpu.h:extern u32 get_scattered_cpuid_leaf(unsigned int level, > > arch/x86/kernel/cpu/scattered.c:u32 get_scattered_cpuid_leaf(unsigned int level, unsigned int sub_leaf, > > arch/x86/kernel/cpu/scattered.c:EXPORT_SYMBOL_GPL(get_scattered_cpuid_leaf); > > That used to be used in kvm last, see b7b27aa011a1df42728d1768fc181d9ce69e6911, > which removed it. > > And it got added by > > 47bdf3378d62 ("x86/cpuid: Provide get_scattered_cpuid_leaf()") > > Lemme add those people to CC. > > If no one wants it, feel free to decomission it. Still kind of leaves me puzzled about the situation :-) Why this wasn't used for example to replace detect_vmx_virtcap()? /Jarkko ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v14 04/19] x86/cpufeatures: Add SGX feature bits 2018-09-27 13:16 ` Jarkko Sakkinen @ 2018-09-27 13:51 ` Borislav Petkov 2018-09-27 14:52 ` Jarkko Sakkinen 0 siblings, 1 reply; 4+ messages in thread From: Borislav Petkov @ 2018-09-27 13:51 UTC (permalink / raw) To: Jarkko Sakkinen Cc: x86, platform-driver-x86, dave.hansen, sean.j.christopherson, nhorman, npmccallum, serge.ayoun, shay.katz-zamir, linux-sgx, andriy.shevchenko, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Konrad Rzeszutek Wilk, David Woodhouse, David Wang, Kirill A. Shutemov, Levin, Alexander (Sasha Levin), Jia Zhang, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT), He Chen, Lu On Thu, Sep 27, 2018 at 04:16:42PM +0300, Jarkko Sakkinen wrote: > Still kind of leaves me puzzled about the situation :-) Why this wasn't > used for example to replace detect_vmx_virtcap()? I don't understand - detect_vmx_virtcap() is setting X86_FEATURE bits based on MSR settings. get_scattered_cpuid_leaf() is regenerating a CPUID leaf from the scattered bits. Looks like apples and oranges to me... -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v14 04/19] x86/cpufeatures: Add SGX feature bits 2018-09-27 13:51 ` Borislav Petkov @ 2018-09-27 14:52 ` Jarkko Sakkinen 0 siblings, 0 replies; 4+ messages in thread From: Jarkko Sakkinen @ 2018-09-27 14:52 UTC (permalink / raw) To: Borislav Petkov Cc: x86, platform-driver-x86, dave.hansen, sean.j.christopherson, nhorman, npmccallum, serge.ayoun, shay.katz-zamir, linux-sgx, andriy.shevchenko, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Konrad Rzeszutek Wilk, David Woodhouse, David Wang, Kirill A. Shutemov, Levin, Alexander (Sasha Levin), Jia Zhang, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT), He Chen, Lu On Thu, Sep 27, 2018 at 03:51:39PM +0200, Borislav Petkov wrote: > On Thu, Sep 27, 2018 at 04:16:42PM +0300, Jarkko Sakkinen wrote: > > Still kind of leaves me puzzled about the situation :-) Why this wasn't > > used for example to replace detect_vmx_virtcap()? > > I don't understand - detect_vmx_virtcap() is setting X86_FEATURE bits > based on MSR settings. get_scattered_cpuid_leaf() is regenerating a > CPUID leaf from the scattered bits. > > Looks like apples and oranges to me... > > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply. Ugh, sorry, I was not thinking clearly :-) /Jarkko ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-27 14:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180925130845.9962-1-jarkko.sakkinen@linux.intel.com>
[not found] ` <20180925130845.9962-5-jarkko.sakkinen@linux.intel.com>
[not found] ` <20180925164854.GF23986@zn.tnic>
[not found] ` <20180926111139.GA12037@linux.intel.com>
2018-09-26 11:36 ` [PATCH v14 04/19] x86/cpufeatures: Add SGX feature bits Borislav Petkov
2018-09-27 13:16 ` Jarkko Sakkinen
2018-09-27 13:51 ` Borislav Petkov
2018-09-27 14:52 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox