Re: [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature

2017-09-25 Thread Paolo Bonzini
On 25/09/2017 15:02, Wei Wang wrote: > On 09/25/2017 07:54 PM, Paolo Bonzini wrote: >> On 25/09/2017 06:44, Wei Wang wrote: >>>   +static void update_msr_autoload_count_max(void) >>> +{ >>> +    u64 vmx_msr; >>> +    int n; >>> + >>> +    /* >>> + * According to the Intel SDM, if Bits 27:25 of

Re: [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature

2017-09-25 Thread Wei Wang
On 09/25/2017 07:54 PM, Paolo Bonzini wrote: On 25/09/2017 06:44, Wei Wang wrote: +static void update_msr_autoload_count_max(void) +{ + u64 vmx_msr; + int n; + + /* +* According to the Intel SDM, if Bits 27:25 of MSR_IA32_VMX_MISC is +* n, then (n + 1) * 512

Re: [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature

2017-09-25 Thread Paolo Bonzini
On 25/09/2017 06:44, Wei Wang wrote: > > +static void update_msr_autoload_count_max(void) > +{ > + u64 vmx_msr; > + int n; > + > + /* > + * According to the Intel SDM, if Bits 27:25 of MSR_IA32_VMX_MISC is > + * n, then (n + 1) * 512 is the recommended max number of MSRs to