Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-03-08 Thread Paolo Bonzini
On 08/03/19 16:50, Sean Christopherson wrote: > On Fri, Mar 08, 2019 at 10:15:15AM +0100, Paolo Bonzini wrote: >> On 04/03/19 19:56, Sean Christopherson wrote: >>> On Tue, Jan 29, 2019 at 04:19:34PM +0100, Paolo Bonzini wrote: On 28/01/19 11:33, Yang Weijiang wrote: >> There is no code in

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-03-08 Thread Sean Christopherson
On Fri, Mar 08, 2019 at 10:15:15AM +0100, Paolo Bonzini wrote: > On 04/03/19 19:56, Sean Christopherson wrote: > > On Tue, Jan 29, 2019 at 04:19:34PM +0100, Paolo Bonzini wrote: > >> On 28/01/19 11:33, Yang Weijiang wrote: > There is no code in this series to pass these fields to and from >

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-03-08 Thread Paolo Bonzini
On 04/03/19 19:56, Sean Christopherson wrote: > On Tue, Jan 29, 2019 at 04:19:34PM +0100, Paolo Bonzini wrote: >> On 28/01/19 11:33, Yang Weijiang wrote: There is no code in this series to pass these fields to and from userspace, and also to save/restore U_CET, INT_SSP_TAB, PL0_SSP and

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-03-04 Thread Sean Christopherson
On Tue, Jan 29, 2019 at 04:19:34PM +0100, Paolo Bonzini wrote: > On 28/01/19 11:33, Yang Weijiang wrote: > >> There is no code in this series to pass these fields to and from > >> userspace, and also to save/restore U_CET, INT_SSP_TAB, PL0_SSP and > >> PL3_SSP across context switches. > >> > > The

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-30 Thread Paolo Bonzini
On 29/01/19 09:29, Yang Weijiang wrote: > On Tue, Jan 29, 2019 at 04:19:34PM +0100, Paolo Bonzini wrote: >> On 28/01/19 11:33, Yang Weijiang wrote: There is no code in this series to pass these fields to and from userspace, and also to save/restore U_CET, INT_SSP_TAB, PL0_SSP and

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-29 Thread Yang Weijiang
On Tue, Jan 29, 2019 at 10:27:50AM -0800, Sean Christopherson wrote: > On Tue, Jan 29, 2019 at 10:01:15AM -0800, Jim Mattson wrote: > > On Tue, Jan 29, 2019 at 9:47 AM Jim Mattson wrote: > > > > > > On Wed, Jan 23, 2019 at 6:06 AM Yang Weijiang > > > wrote: > > > > Note: Although these VMCS

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-29 Thread Yang Weijiang
On Tue, Jan 29, 2019 at 04:19:34PM +0100, Paolo Bonzini wrote: > On 28/01/19 11:33, Yang Weijiang wrote: > >> There is no code in this series to pass these fields to and from > >> userspace, and also to save/restore U_CET, INT_SSP_TAB, PL0_SSP and > >> PL3_SSP across context switches. > >> > > The

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-29 Thread Jim Mattson
On Tue, Jan 29, 2019 at 9:47 AM Jim Mattson wrote: > > On Wed, Jan 23, 2019 at 6:06 AM Yang Weijiang wrote: > > Note: Although these VMCS fields are 64-bit, they don't have high fields. > > This statement directly contradicts the SDM, volume 3, appendix B.2: > > "A value of 1 in bits 14:13 of an

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-29 Thread Jim Mattson
On Wed, Jan 23, 2019 at 6:06 AM Yang Weijiang wrote: > Note: Although these VMCS fields are 64-bit, they don't have high fields. This statement directly contradicts the SDM, volume 3, appendix B.2: "A value of 1 in bits 14:13 of an encoding indicates a 64-bit field. There are 64-bit fields only

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-29 Thread Paolo Bonzini
On 28/01/19 11:33, Yang Weijiang wrote: >> There is no code in this series to pass these fields to and from >> userspace, and also to save/restore U_CET, INT_SSP_TAB, PL0_SSP and >> PL3_SSP across context switches. >> > The kernel consumes these MSRs, please see kernel CET patch: >

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-28 Thread Yang Weijiang
On Fri, Jan 25, 2019 at 07:02:37PM +0100, Paolo Bonzini wrote: > On 22/01/19 21:59, Yang Weijiang wrote: > > On processors that support CET, VMX saves/restores > > the states of IA32_S_CET, SSP and IA32_INTERRUPT_SSP_TABLE_ADDR MSR > > to the VMCS area for Guest/Host unconditionally. > > > > If

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-25 Thread Sean Christopherson
On Wed, Jan 23, 2019 at 04:59:03AM +0800, Yang Weijiang wrote: > On processors that support CET, VMX saves/restores > the states of IA32_S_CET, SSP and IA32_INTERRUPT_SSP_TABLE_ADDR MSR It'd be helpful to spell out CET and SSP on their initial usage here, especially since this is the first patch

Re: [PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-25 Thread Paolo Bonzini
On 22/01/19 21:59, Yang Weijiang wrote: > On processors that support CET, VMX saves/restores > the states of IA32_S_CET, SSP and IA32_INTERRUPT_SSP_TABLE_ADDR MSR > to the VMCS area for Guest/Host unconditionally. > > If VM_EXIT_LOAD_HOST_CET_STATE = 1, the host CET MSRs are > restored from VMCS

[PATCH v2 1/7] KVM:VMX: Define CET VMCS fields and bits

2019-01-23 Thread Yang Weijiang
On processors that support CET, VMX saves/restores the states of IA32_S_CET, SSP and IA32_INTERRUPT_SSP_TABLE_ADDR MSR to the VMCS area for Guest/Host unconditionally. If VM_EXIT_LOAD_HOST_CET_STATE = 1, the host CET MSRs are restored from VMCS host-state area at VM exit as follows: -