qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Xin Li <xin3.li@intel.com>, qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org, richard.henderson@linaro.org,
	eduardo@habkost.net, seanjc@google.com, chao.gao@intel.com,
	hpa@zytor.com, xiaoyao.li@intel.com, weijiang.yang@intel.com
Subject: Re: [PATCH v3 4/6] target/i386: add support for VMX FRED controls
Date: Thu, 6 Jun 2024 11:00:59 +0200	[thread overview]
Message-ID: <bc9560e2-39e6-4391-9fb8-b972f3605c80@redhat.com> (raw)
In-Reply-To: <20231109072012.8078-5-xin3.li@intel.com>

On 11/9/23 08:20, Xin Li wrote:
> Add VMX FRED controls used to enable save/load of FRED MSRs.
> 
> Tested-by: Shan Kang <shan.kang@intel.com>
> Signed-off-by: Xin Li <xin3.li@intel.com>
> ---
>   scripts/kvm/vmxcap | 3 +++
>   target/i386/cpu.c  | 2 +-
>   2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap
> index 7da1e00ca8..44898d73c2 100755
> --- a/scripts/kvm/vmxcap
> +++ b/scripts/kvm/vmxcap
> @@ -229,6 +229,8 @@ controls = [
>       Allowed1Control(
>           name = 'secondary VM-Exit controls',
>           bits = {
> +            0: 'Save IA32 FRED MSRs',
> +            1: 'Load IA32 FRED MSRs',
>               },
>           cap_msr = MSR_IA32_VMX_EXIT_CTLS2,
>           ),
> @@ -246,6 +248,7 @@ controls = [
>               16: 'Load IA32_BNDCFGS',
>               17: 'Conceal VM entries from PT',
>               18: 'Load IA32_RTIT_CTL',
> +            23: 'Load IA32 FRED MSRs',
>               },
>           cap_msr = MSR_IA32_VMX_ENTRY_CTLS,
>           true_cap_msr = MSR_IA32_VMX_TRUE_ENTRY_CTLS,
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 227ee1c759..dcf914a7ec 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -1285,7 +1285,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
>               NULL, "vmx-entry-ia32e-mode", NULL, NULL,
>               NULL, "vmx-entry-load-perf-global-ctrl", "vmx-entry-load-pat", "vmx-entry-load-efer",
>               "vmx-entry-load-bndcfgs", NULL, "vmx-entry-load-rtit-ctl", NULL,
> -            NULL, NULL, "vmx-entry-load-pkrs", NULL,
> +            NULL, NULL, "vmx-entry-load-pkrs", "vmx-entry-load-fred",
>               NULL, NULL, NULL, NULL,
>               NULL, NULL, NULL, NULL,
>           },

The bits in the secondary vmexit controls are not supported, and in 
general the same is true for the secondary vmexit case.  I think it's 
better to not include the vmx-entry-load-fred bit either, and only do 
the vmxcap changes.

Also, in patch 1 there should be a dependency from LM to FRED.

I applied these changes and queued the series, thanks.

Paolo



  reply	other threads:[~2024-06-06  9:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09  7:20 [PATCH v3 0/6] target/i386: add support for FRED Xin Li
2023-11-09  7:20 ` [PATCH v3 1/6] target/i386: add support for FRED in CPUID enumeration Xin Li
2023-12-14  8:15   ` Wu, Dan1
2023-12-21  8:27     ` Li, Xin3
2023-12-22  3:03       ` [PATCH v3A " Xin Li
2023-12-22  7:34         ` Zhao Liu
2023-12-22  8:15           ` Zhao Liu
2023-12-22  8:24             ` Li, Xin3
2023-12-22  8:47               ` Liu, Zhao1
2023-11-09  7:20 ` [PATCH v3 2/6] target/i386: mark CR4.FRED not reserved Xin Li
2023-12-22  9:26   ` Zhao Liu
2023-11-09  7:20 ` [PATCH v3 3/6] target/i386: add the secondary VM exit controls MSR Xin Li
2023-11-09  7:20 ` [PATCH v3 4/6] target/i386: add support for VMX FRED controls Xin Li
2024-06-06  9:00   ` Paolo Bonzini [this message]
2024-06-07 14:13     ` Li, Xin3
2023-11-09  7:20 ` [PATCH v3 5/6] target/i386: enumerate VMX nested-exception support Xin Li
2023-11-09  7:20 ` [PATCH v3 6/6] target/i386: Add get/set/migrate support for FRED MSRs Xin Li
  -- strict thread matches above, loose matches on Subject: below --
2024-07-06 15:57 [PATCH v3 4/6] target/i386: add support for VMX FRED controls Li, Xin3
2024-07-06 16:23 ` Paolo Bonzini
2024-07-06 16:38   ` Li, Xin3

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=bc9560e2-39e6-4391-9fb8-b972f3605c80@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=chao.gao@intel.com \
    --cc=eduardo@habkost.net \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=seanjc@google.com \
    --cc=weijiang.yang@intel.com \
    --cc=xiaoyao.li@intel.com \
    --cc=xin3.li@intel.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;
as well as URLs for NNTP newsgroup(s).