Re: [PATCH 3/5] KVM: nVMX: Update VMX controls MSR according to guest CPUID after setting VMX MSRs

2020-09-11 Thread Paolo Bonzini
On 02/09/20 20:32, Jim Mattson wrote: > > /* If not VM_EXIT_CLEAR_BNDCFGS, the L2 value propagates to L1. */ > if (vmcs12->vm_exit_controls & VM_EXIT_CLEAR_BNDCFGS) > vmcs_write64(GUEST_BNDCFGS, 0); > > BTW, where does the L2 value propagate to L1 if not VM_EXIT_CLEAR_BNDCFGS? Hmm,

Re: [PATCH 3/5] KVM: nVMX: Update VMX controls MSR according to guest CPUID after setting VMX MSRs

2020-09-02 Thread Jim Mattson
On Wed, Sep 2, 2020 at 11:16 AM Sean Christopherson wrote: > > On Fri, Aug 28, 2020 at 01:39:39PM -0700, Jim Mattson wrote: > > On Fri, Aug 28, 2020 at 1:54 AM Chenyi Qiang wrote: > > > > > > Update the fields (i.e. VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS and > > > VM_{ENTRY,

Re: [PATCH 3/5] KVM: nVMX: Update VMX controls MSR according to guest CPUID after setting VMX MSRs

2020-09-02 Thread Sean Christopherson
On Fri, Aug 28, 2020 at 01:39:39PM -0700, Jim Mattson wrote: > On Fri, Aug 28, 2020 at 1:54 AM Chenyi Qiang wrote: > > > > Update the fields (i.e. VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS and > > VM_{ENTRY, EXIT}_LOAD_IA32_PERF_GLOBAL_CTRL) in > > nested MSR_IA32_VMX_TRUE_{ENTRY, EXIT}_CTLS according

Re: [PATCH 3/5] KVM: nVMX: Update VMX controls MSR according to guest CPUID after setting VMX MSRs

2020-08-28 Thread Jim Mattson
On Fri, Aug 28, 2020 at 1:54 AM Chenyi Qiang wrote: > > Update the fields (i.e. VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS and > VM_{ENTRY, EXIT}_LOAD_IA32_PERF_GLOBAL_CTRL) in > nested MSR_IA32_VMX_TRUE_{ENTRY, EXIT}_CTLS according to guest CPUID > when user space initializes the features MSRs.

[PATCH 3/5] KVM: nVMX: Update VMX controls MSR according to guest CPUID after setting VMX MSRs

2020-08-28 Thread Chenyi Qiang
Update the fields (i.e. VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS and VM_{ENTRY, EXIT}_LOAD_IA32_PERF_GLOBAL_CTRL) in nested MSR_IA32_VMX_TRUE_{ENTRY, EXIT}_CTLS according to guest CPUID when user space initializes the features MSRs. Regardless of the order of SET_CPUID and SET_MSRS from the user space,