From: Kai Huang <kai.huang@intel.com>
To: kernel test robot <lkp@intel.com>,
kvm@vger.kernel.org, linux-sgx@vger.kernel.org
Cc: kbuild-all@lists.01.org, seanjc@google.com, pbonzini@redhat.com,
bp@alien8.de, jarkko@kernel.org, dave.hansen@intel.com,
luto@kernel.org, rick.p.edgecombe@intel.com,
haitao.huang@intel.com
Subject: Re: [PATCH v5 10/11] KVM: VMX: Enable SGX virtualization for SGX1, SGX2 and LC
Date: Mon, 12 Apr 2021 22:47:17 +1200 [thread overview]
Message-ID: <f17eb751515edbf339e01b3766ce83638d7e1e3d.camel@intel.com> (raw)
In-Reply-To: <202104121739.4ZZ6zHV4-lkp@intel.com>
Hi Paolo,
Obviously this series requires x86 part patches (which is on tip/x86/sgx) to work. Please
let me know how do you want to proceed?
On Mon, 2021-04-12 at 17:51 +0800, kernel test robot wrote:
> Hi Kai,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on kvm/queue]
> [also build test ERROR on next-20210409]
> [cannot apply to vhost/linux-next v5.12-rc7]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Kai-Huang/KVM-SGX-virtualization-support-KVM-part/20210412-122425
> base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
> config: x86_64-rhel-8.3-kselftests (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
> # https://github.com/0day-ci/linux/commit/66e235131b59a03ed48f6f6343de43ba9786e32d
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Kai-Huang/KVM-SGX-virtualization-support-KVM-part/20210412-122425
> git checkout 66e235131b59a03ed48f6f6343de43ba9786e32d
> # save the attached .config to linux build tree
> make W=1 ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/x86/kvm/cpuid.c:22:
> arch/x86/kvm/cpuid.h: In function '__feature_translate':
> arch/x86/kvm/cpuid.h:128:21: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
> 128 | if (x86_feature == X86_FEATURE_SGX1)
> | ^~~~~~~~~~~~~~~~
> | X86_FEATURE_SGX
> arch/x86/kvm/cpuid.h:128:21: note: each undeclared identifier is reported only once for each function it appears in
> arch/x86/kvm/cpuid.h:130:26: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
> 130 | else if (x86_feature == X86_FEATURE_SGX2)
> | ^~~~~~~~~~~~~~~~
> | X86_FEATURE_SGX
> In file included from arch/x86/include/asm/thread_info.h:53,
> from include/linux/thread_info.h:58,
> from arch/x86/include/asm/preempt.h:7,
> from include/linux/preempt.h:78,
> from include/linux/percpu.h:6,
> from include/linux/context_tracking_state.h:5,
> from include/linux/hardirq.h:5,
> from include/linux/kvm_host.h:7,
> from arch/x86/kvm/cpuid.c:12:
> arch/x86/kvm/cpuid.c: In function 'kvm_set_cpu_caps':
> > > arch/x86/kvm/cpuid.c:57:32: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
> 57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
> | ^~~~~~~~~~~~
> arch/x86/include/asm/cpufeature.h:121:24: note: in definition of macro 'cpu_has'
> 121 | (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
> | ^~~
> arch/x86/kvm/cpuid.c:57:19: note: in expansion of macro 'boot_cpu_has'
> 57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
> | ^~~~~~~~~~~~
> arch/x86/kvm/cpuid.c:500:3: note: in expansion of macro 'SF'
> 500 | SF(SGX1) | SF(SGX2)
> | ^~
> > > arch/x86/kvm/cpuid.c:57:32: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
> 57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
> | ^~~~~~~~~~~~
> arch/x86/include/asm/cpufeature.h:121:24: note: in definition of macro 'cpu_has'
> 121 | (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
> | ^~~
> arch/x86/kvm/cpuid.c:57:19: note: in expansion of macro 'boot_cpu_has'
> 57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
> | ^~~~~~~~~~~~
> arch/x86/kvm/cpuid.c:500:14: note: in expansion of macro 'SF'
> 500 | SF(SGX1) | SF(SGX2)
> | ^~
> arch/x86/kvm/cpuid.c: In function '__do_cpuid_func':
> > > arch/x86/kvm/cpuid.c:838:17: error: 'SGX_MISC_EXINFO' undeclared (first use in this function)
> 838 | entry->ebx &= SGX_MISC_EXINFO;
> | ^~~~~~~~~~~~~~~
> > > arch/x86/kvm/cpuid.c:851:17: error: 'SGX_ATTR_DEBUG' undeclared (first use in this function)
> 851 | entry->eax &= SGX_ATTR_DEBUG | SGX_ATTR_MODE64BIT |
> | ^~~~~~~~~~~~~~
> > > arch/x86/kvm/cpuid.c:851:34: error: 'SGX_ATTR_MODE64BIT' undeclared (first use in this function)
> 851 | entry->eax &= SGX_ATTR_DEBUG | SGX_ATTR_MODE64BIT |
> | ^~~~~~~~~~~~~~~~~~
> > > arch/x86/kvm/cpuid.c:852:31: error: 'SGX_ATTR_EINITTOKENKEY' undeclared (first use in this function)
> 852 | /* PROVISIONKEY | */ SGX_ATTR_EINITTOKENKEY |
> | ^~~~~~~~~~~~~~~~~~~~~~
> > > arch/x86/kvm/cpuid.c:853:10: error: 'SGX_ATTR_KSS' undeclared (first use in this function)
> 853 | SGX_ATTR_KSS;
> | ^~~~~~~~~~~~
> --
> In file included from arch/x86/kvm/vmx/vmx.c:51:
> arch/x86/kvm/cpuid.h: In function '__feature_translate':
> arch/x86/kvm/cpuid.h:128:21: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
> 128 | if (x86_feature == X86_FEATURE_SGX1)
> | ^~~~~~~~~~~~~~~~
> | X86_FEATURE_SGX
> arch/x86/kvm/cpuid.h:128:21: note: each undeclared identifier is reported only once for each function it appears in
> arch/x86/kvm/cpuid.h:130:26: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
> 130 | else if (x86_feature == X86_FEATURE_SGX2)
> | ^~~~~~~~~~~~~~~~
> | X86_FEATURE_SGX
> arch/x86/kvm/vmx/vmx.c: In function 'vmx_set_cpu_caps':
> > > arch/x86/kvm/vmx/vmx.c:7375:21: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
> 7375 | kvm_cpu_cap_clear(X86_FEATURE_SGX1);
> | ^~~~~~~~~~~~~~~~
> | X86_FEATURE_SGX
> > > arch/x86/kvm/vmx/vmx.c:7376:21: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
> 7376 | kvm_cpu_cap_clear(X86_FEATURE_SGX2);
> | ^~~~~~~~~~~~~~~~
> | X86_FEATURE_SGX
>
>
> vim +57 arch/x86/kvm/cpuid.c
>
> 4344ee981e2199 Paolo Bonzini 2013-10-02 55
> 87382003e35559 Sean Christopherson 2019-12-17 56 #define F feature_bit
> cb4de96e0cca64 Sean Christopherson 2021-04-12 @57 #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
> 5c404cabd1b5c1 Paolo Bonzini 2014-12-03 58
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2021-04-12 10:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 4:21 [PATCH v5 00/11] KVM SGX virtualization support (KVM part) Kai Huang
2021-04-12 4:21 ` [PATCH v5 01/11] KVM: x86: Export kvm_mmu_gva_to_gpa_{read,write}() for SGX (VMX) Kai Huang
2021-04-12 4:21 ` [PATCH v5 02/11] KVM: x86: Define new #PF SGX error code bit Kai Huang
2021-04-12 4:21 ` [PATCH v5 03/11] KVM: x86: Add support for reverse CPUID lookup of scattered features Kai Huang
2021-04-17 13:39 ` Paolo Bonzini
2021-04-12 4:21 ` [PATCH v5 04/11] KVM: x86: Add reverse-CPUID lookup support for scattered SGX features Kai Huang
2021-04-17 13:39 ` Paolo Bonzini
2021-04-12 4:21 ` [PATCH v5 05/11] KVM: VMX: Add basic handling of VM-Exit from SGX enclave Kai Huang
2021-04-12 4:21 ` [PATCH v5 06/11] KVM: VMX: Frame in ENCLS handler for SGX virtualization Kai Huang
2021-04-12 4:21 ` [PATCH v5 07/11] KVM: VMX: Add SGX ENCLS[ECREATE] handler to enforce CPUID restrictions Kai Huang
2021-04-12 4:21 ` [PATCH v5 08/11] KVM: VMX: Add emulation of SGX Launch Control LE hash MSRs Kai Huang
2021-04-17 13:55 ` Paolo Bonzini
2021-04-12 4:21 ` [PATCH v5 09/11] KVM: VMX: Add ENCLS[EINIT] handler to support SGX Launch Control (LC) Kai Huang
2021-04-12 4:21 ` [PATCH v5 10/11] KVM: VMX: Enable SGX virtualization for SGX1, SGX2 and LC Kai Huang
2021-04-12 9:51 ` kernel test robot
2021-04-12 10:47 ` Kai Huang [this message]
2021-04-17 14:11 ` Paolo Bonzini
2021-04-19 11:44 ` Kai Huang
2021-04-19 15:16 ` Sean Christopherson
2021-04-19 17:14 ` Paolo Bonzini
2021-04-12 4:21 ` [PATCH v5 11/11] KVM: x86: Add capability to grant VM access to privileged SGX attribute Kai Huang
2021-04-12 11:28 ` kernel test robot
2021-04-13 14:51 ` [PATCH v5 00/11] KVM SGX virtualization support (KVM part) Paolo Bonzini
2021-04-13 15:01 ` Borislav Petkov
2021-04-13 21:47 ` Kai Huang
2021-04-17 14:15 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f17eb751515edbf339e01b3766ce83638d7e1e3d.camel@intel.com \
--to=kai.huang@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=haitao.huang@intel.com \
--cc=jarkko@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=kvm@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=lkp@intel.com \
--cc=luto@kernel.org \
--cc=pbonzini@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).