From: "Yang, Weijiang" <weijiang.yang@intel.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>, "Christopherson,,
Sean" <seanjc@google.com>,
"john.allen@amd.com" <john.allen@amd.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH v2 21/21] KVM:x86: Support CET supervisor shadow stack MSR access
Date: Thu, 4 May 2023 09:20:41 +0800 [thread overview]
Message-ID: <c9747bd0-2a1e-a7ef-4775-b5ca7c00b24e@intel.com> (raw)
In-Reply-To: <175c826d59f1ac77fa588908d3768ffc2e79268e.camel@intel.com>
On 5/4/2023 1:07 AM, Edgecombe, Rick P wrote:
> On Fri, 2023-04-21 at 09:46 -0400, Yang Weijiang wrote:
>> +
>> + incpt = !is_cet_state_supported(vcpu,
>> XFEATURE_MASK_CET_KERNEL);
>> + incpt |= !guest_cpuid_has(vcpu, X86_FEATURE_SHSTK);
>> +
>> + vmx_set_intercept_for_msr(vcpu, MSR_IA32_INT_SSP_TAB,
>> MSR_TYPE_RW, incpt);
>> + vmx_set_intercept_for_msr(vcpu, MSR_IA32_PL0_SSP,
>> MSR_TYPE_RW, incpt);
>> + vmx_set_intercept_for_msr(vcpu, MSR_IA32_PL1_SSP,
>> MSR_TYPE_RW, incpt);
>> + vmx_set_intercept_for_msr(vcpu, MSR_IA32_PL2_SSP,
>> MSR_TYPE_RW, incpt);
>> }
> Why is this tied to XFEATURE_MASK_CET_KERNEL? I don't know how the SVM
> side works, but the host kernel doesn't use this xfeature. Just not
> clear on what the intention is. Why not use
> kvm_cet_kernel_shstk_supported() again?
I don't know how SVM supports supervisor SHSTK either, here just follows
the spec.
to add the dependency check. Maybe you're right, I need to use
kvm_cet_kernel_shstk_supported()
in my patch set and leave the work to SVM enabling patches. I'll change
it, thanks!
next prev parent reply other threads:[~2023-05-04 1:21 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 13:45 [PATCH v2 00/21] Enable CET Virtualization Yang Weijiang
2023-04-21 13:45 ` [PATCH v2 01/21] x86/shstk: Add Kconfig option for shadow stack Yang Weijiang
2023-04-21 13:45 ` [PATCH v2 02/21] x86/cpufeatures: Add CPU feature flags for shadow stacks Yang Weijiang
2023-04-21 13:45 ` [PATCH v2 03/21] x86/cpufeatures: Enable CET CR4 bit for shadow stack Yang Weijiang
2023-04-21 13:45 ` [PATCH v2 04/21] x86/fpu/xstate: Introduce CET MSR and XSAVES supervisor states Yang Weijiang
2023-04-21 13:45 ` [PATCH v2 05/21] x86/fpu: Add helper for modifying xstate Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 06/21] KVM:x86: Report XSS as to-be-saved if there are supported features Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 07/21] KVM:x86: Refresh CPUID on write to guest MSR_IA32_XSS Yang Weijiang
2023-04-24 1:38 ` Binbin Wu
2023-04-24 6:15 ` Yang, Weijiang
2023-04-21 13:46 ` [PATCH v2 08/21] KVM:x86: Init kvm_caps.supported_xss with supported feature bits Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 09/21] KVM:x86: Load guest FPU state when accessing xsaves-managed MSRs Yang Weijiang
2023-04-27 3:46 ` Binbin Wu
2023-04-27 15:57 ` Yang, Weijiang
2023-04-21 13:46 ` [PATCH v2 10/21] KVM:x86: Add #CP support in guest exception classification Yang Weijiang
2023-04-28 6:09 ` Binbin Wu
2023-05-04 3:41 ` Yang, Weijiang
2023-05-04 5:36 ` Binbin Wu
2023-05-04 6:59 ` Yang, Weijiang
2023-04-21 13:46 ` [PATCH v2 11/21] KVM:VMX: Introduce CET VMCS fields and control bits Yang Weijiang
2023-05-05 2:18 ` Binbin Wu
2023-05-05 2:22 ` Binbin Wu
2023-05-05 7:07 ` Yang, Weijiang
2023-04-21 13:46 ` [PATCH v2 12/21] KVM:x86: Add fault checks for guest CR4.CET setting Yang Weijiang
2023-05-05 5:01 ` Binbin Wu
2023-05-05 7:24 ` Yang, Weijiang
2023-04-21 13:46 ` [PATCH v2 13/21] KVM:VMX: Emulate reads and writes to CET MSRs Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 14/21] KVM:VMX: Add a synthetic MSR to allow userspace VMM to access GUEST_SSP Yang Weijiang
2023-05-03 17:08 ` Edgecombe, Rick P
2023-05-04 1:30 ` Yang, Weijiang
2023-04-21 13:46 ` [PATCH v2 15/21] KVM:x86: Report CET MSRs as to-be-saved if CET is supported Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 16/21] KVM:x86: Save/Restore GUEST_SSP to/from SMM state save area Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 17/21] KVM:VMX: Pass through user CET MSRs to the guest Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 18/21] KVM:x86: Enable CET virtualization for VMX and advertise to userspace Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 19/21] KVM:nVMX: Enable user CET support for nested VMX Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 20/21] KVM:x86: Enable supervisor IBT support for guest Yang Weijiang
2023-04-21 13:46 ` [PATCH v2 21/21] KVM:x86: Support CET supervisor shadow stack MSR access Yang Weijiang
2023-05-03 17:06 ` Edgecombe, Rick P
2023-05-04 1:11 ` Yang, Weijiang
2023-05-03 17:07 ` Edgecombe, Rick P
2023-05-04 1:20 ` Yang, Weijiang [this message]
2023-05-04 4:17 ` Edgecombe, Rick P
2023-05-04 6:51 ` Yang, Weijiang
2023-04-21 21:54 ` [PATCH v2 00/21] Enable CET Virtualization Mike Rapoport
2023-04-23 5:37 ` Yang, Weijiang
2023-04-24 18:22 ` John Allen
2023-04-22 13:02 ` Peter Zijlstra
2023-04-23 6:12 ` Yang, Weijiang
2023-04-23 8:30 ` Binbin Wu
2023-04-24 6:12 ` Yang, Weijiang
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=c9747bd0-2a1e-a7ef-4775-b5ca7c00b24e@intel.com \
--to=weijiang.yang@intel.com \
--cc=john.allen@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--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
Powered by JetHome