i386: Propagate SGX CPUID sub-leafs to KVM
commitb9edbadefb9ecbb1b1754c86ba7d1d7ce3e876aa
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 19 Jul 2021 11:21:17 +0000 (19 19:21 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Sep 2021 12:50:20 +0000 (30 14:50 +0200)
tree22397e42f04874a23eab314c23fd0c7d3afdb555
parentc22f5467856d7e7fa5ee4a1f0ee9edc3bb80bf5c
i386: Propagate SGX CPUID sub-leafs to KVM

The SGX sub-leafs are enumerated at CPUID 0x12.  Indices 0 and 1 are
always present when SGX is supported, and enumerate SGX features and
capabilities.  Indices >=2 are directly correlated with the platform's
EPC sections.  Because the number of EPC sections is dynamic and user
defined, the number of SGX sub-leafs is "NULL" terminated.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20210719112136.57018-15-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/kvm/kvm.c