Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1738961

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

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature
Date 2017-09-25 14:00 +0200
Message-ID <utAdk-5RX-21@gated-at.bofh.it> (permalink)
References <uttER-1un-3@gated-at.bofh.it> <uttER-1un-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 be
> +	 * included in the VMExit and VMEntry MSR auto switch list.
> +	 */
> +	rdmsrl(MSR_IA32_VMX_MISC, vmx_msr);
> +	n = ((vmx_msr & 0xe000000) >> 25) + 1;
> +	msr_autoload_count_max = n * KVM_VMX_DEFAULT_MSR_AUTO_LOAD_COUNT;
> +}
> +


Any reasons to do this if it's unlikely that we'll ever update more than
512 MSRs?

Paolo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature Wei Wang <wei.w.wang@intel.com> - 2017-09-25 07:00 +0200
  Re: [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature Paolo Bonzini <pbonzini@redhat.com> - 2017-09-25 14:00 +0200
    Re: [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature Wei Wang <wei.w.wang@intel.com> - 2017-09-25 15:00 +0200
      Re: [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature Paolo Bonzini <pbonzini@redhat.com> - 2017-09-25 16:30 +0200

csiph-web