All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Kulke <magnuskulke@linux.microsoft.com>
To: "Doru Blânzeanu" <dblanzeanu@linux.microsoft.com>
Cc: qemu-devel@nongnu.org,
	"Doru Blânzeanu" <dblanzeanu@microsoft.com>,
	"Magnus Kulke" <magnuskulke@microsoft.com>,
	"Wei Liu" <wei.liu@kernel.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Wei Liu" <liuwe@microsoft.com>, "Zhao Liu" <zhao1.liu@intel.com>
Subject: Re: [PATCH v3 2/2] target/i386/mshv: Initialize the extended CPUID limit for host/max CPUs
Date: Mon, 30 Nov 2026 16:47:02 +0100	[thread overview]
Message-ID: <aw2adpHf2P3eE7Cg@example.com> (raw)
In-Reply-To: <20261124155348.165875-3-dblanzeanu@linux.microsoft.com>

On Tue, Nov 24, 2026 at 05:53:48PM +0200, Doru Blânzeanu wrote:
> Initialize cpuid_min_level from the host visible extended CPUID maximum
> for host/max CPUd, following kvm's initialization pattern.
> 
> Let feature expansion determine xlevel while preserving explicit CLI
> limits and named CPU models defaults.
> 
> Signed-off-by: Doru Blânzeanu <dblanzeanu@linux.microsoft.com>
> ---
>  target/i386/mshv/mshv-cpu.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/target/i386/mshv/mshv-cpu.c b/target/i386/mshv/mshv-cpu.c
> index 79fe357c13..5b13c0915e 100644
> --- a/target/i386/mshv/mshv-cpu.c
> +++ b/target/i386/mshv/mshv-cpu.c
> @@ -2564,8 +2564,15 @@ int mshv_get_vp_state(int cpu_fd, struct mshv_get_set_vp_state *state)
>  static void mshv_cpu_instance_init(CPUState *cs)
>  {
>      X86CPU *cpu = X86_CPU(cs);
> +    X86CPUClass *xcc = X86_CPU_GET_CLASS(cpu);
>  
>      host_cpu_instance_init(cpu);
> +
> +    if (xcc->max_features) {
> +        cpu->env.cpuid_min_xlevel =
> +            mshv_get_supported_cpuid(0x80000000, 0, R_EAX);
> +    }
> +
>      mshv_cpu_xsave_init();
>  }
>  
> -- 
> 2.48.1.vfs.0.0

Reviewed-by: Magnus Kulke <magnuskulke@linux.microsoft.com>


      reply	other threads:[~2026-11-30 15:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 15:53 [PATCH v3 0/2] Add CPU topology extension support for mshv guests Doru Blânzeanu
2026-11-24 15:53 ` [PATCH v3 1/2] mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleaves Doru Blânzeanu
2026-11-30 15:59   ` Magnus Kulke
2026-11-24 15:53 ` [PATCH v3 2/2] target/i386/mshv: Initialize the extended CPUID limit for host/max CPUs Doru Blânzeanu
2026-11-30 15:47   ` Magnus Kulke [this message]

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=aw2adpHf2P3eE7Cg@example.com \
    --to=magnuskulke@linux.microsoft.com \
    --cc=dblanzeanu@linux.microsoft.com \
    --cc=dblanzeanu@microsoft.com \
    --cc=liuwe@microsoft.com \
    --cc=magnuskulke@microsoft.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wei.liu@kernel.org \
    --cc=zhao1.liu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.