qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: John Levon <john.levon@nutanix.com>,
	Manish <manish.mishra@nutanix.com>,
	qemu-devel@nongnu.org, berrange@redhat.com, pbonzini@redhat.com,
	bob.ball@nutanix.com, prerna.saxena@nutanix.com
Subject: Re: [PATCH v1] target/i386: Always set leaf 0x1f
Date: Mon, 29 Jul 2024 14:18:39 +0200	[thread overview]
Message-ID: <20240729141839.44203b6c@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <ZqEW/TIZAqLN3CKI@intel.com>

On Wed, 24 Jul 2024 23:00:13 +0800
Zhao Liu <zhao1.liu@intel.com> wrote:

> Hi Igor,
> 
> On Wed, Jul 24, 2024 at 02:54:32PM +0200, Igor Mammedov wrote:
> > Date: Wed, 24 Jul 2024 14:54:32 +0200
> > From: Igor Mammedov <imammedo@redhat.com>
> > Subject: Re: [PATCH v1] target/i386: Always set leaf 0x1f
> > X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-redhat-linux-gnu)
> > 
> > On Wed, 24 Jul 2024 12:13:28 +0100
> > John Levon <john.levon@nutanix.com> wrote:
> >   
> > > On Wed, Jul 24, 2024 at 03:59:29PM +0530, Manish wrote:
> > >   
> > > > > > Leaf 0x1f is superset of 0xb, so it makes sense to set 0x1f equivalent
> > > > > > to 0xb by default and workaround windows issue.>
> > > > > > This change adds a
> > > > > > new property 'cpuid-0x1f-enforce' to set leaf 0x1f equivalent to 0xb in
> > > > > > case extended CPU topology is not configured and behave as before otherwise.    
> > > > > repeating question
> > > > > why we need to use extra property instead of just adding 0x1f leaf for CPU models
> > > > > that supposed to have it?    
> > > > 
> > > > As i mentioned in earlier response. "Windows expects it only when we have
> > > > set max cpuid level greater than or equal to 0x1f. I mean if it is exposed
> > > > it should not be all zeros. SapphireRapids CPU definition raised cpuid level
> > > > to 0x20, so we starting seeing it with SapphireRapids."
> > > > 
> > > > Windows does not expect 0x1f to be present for any CPU model. But if it is
> > > > exposed to the guest, it expects non-zero values.    
> > > 
> > > I think Igor is suggesting:
> > > 
> > >  - leave x86_cpu_expand_features() alone completely  
> > yep, drop that if possible
> > 
> >    
> > >  - change the 0x1f handling to always report topology i.e. never report all
> > >    zeroes  
> > 
> > Do this but only for CPU models that have this leaf per spec,
> > to avoid live migration issues create a new version of CPU model,
> > so it would apply only for new version. This way older versions
> > and migration won't be affected.   
> 
> So that in the future every new Intel CPU model will need to always
> enable 0x1f. Sounds like an endless game. So my question is: at what
> point is it ok to consider defaulting to always enable 0x1f and just
> disable it for the old CPU model?

I have suggested to enable 0x1f leaf excluding:
   * existing cpu models (versions)
   * cpu models that do not have this leaf in real world should
     not have it in QEMU either.

If cpu model already exists, you'd need a new version of cpu model to
enable new leaf by default.

For completely new cpu model, it could be enabled from the start.
i.e. workflow for enabling that should be the same as with CPU features
(or as you said 'endless game' of copying base model and making it look like
should be according to spec,
but that's the process we currently use for describing CPU models).
 
> Thanks,
> Zhao
> 



  parent reply	other threads:[~2024-07-29 12:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24  7:52 [PATCH v1] target/i386: Always set leaf 0x1f manish.mishra
2024-07-24  9:00 ` Igor Mammedov
2024-07-24 10:29   ` Manish
2024-07-24 11:13     ` John Levon
2024-07-24 12:38       ` Manish
2024-07-24 12:54       ` Igor Mammedov
2024-07-24 13:50         ` Manish
2024-07-24 15:00         ` Zhao Liu
2024-07-29  6:49           ` Manish
2024-07-29 12:18           ` Igor Mammedov [this message]
2024-07-29 12:42             ` Manish
2024-07-30 11:39               ` Igor Mammedov
2024-07-31 14:00                 ` Manish
2024-08-02  2:33                   ` Zhao Liu
2024-07-31  7:02     ` Xiaoyao Li
2024-07-31  8:49       ` John Levon
2024-07-31 15:31         ` Xiaoyao Li
2024-08-01 10:06           ` Manish
2024-08-01 10:25             ` Igor Mammedov
2024-08-01 15:11               ` Xiaoyao Li
2024-08-01 16:46                 ` Manish
2024-08-02  7:35                   ` Xiaoyao Li

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=20240729141839.44203b6c@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=berrange@redhat.com \
    --cc=bob.ball@nutanix.com \
    --cc=john.levon@nutanix.com \
    --cc=manish.mishra@nutanix.com \
    --cc=pbonzini@redhat.com \
    --cc=prerna.saxena@nutanix.com \
    --cc=qemu-devel@nongnu.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 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).