qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Xiaoyao Li <xiaoyao.li@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org, zhao1.liu@intel.com,
	John Levon <john.levon@nutanix.com>,
	Manish <manish.mishra@nutanix.com>
Subject: Re: [PATCH v2] i386/cpu: Introduce enable_cpuid_0x1f to force exposing CPUID 0x1f
Date: Mon, 19 Aug 2024 17:32:10 +0200	[thread overview]
Message-ID: <20240819173210.7db4ca33@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <985da2cc-5281-4986-b1bb-0334179ece6d@intel.com>

On Wed, 14 Aug 2024 00:39:57 +0800
Xiaoyao Li <xiaoyao.li@intel.com> wrote:

> On 8/13/2024 10:51 PM, Xiaoyao Li wrote:
> > On 8/13/2024 5:27 PM, Igor Mammedov wrote:  
> >> On Mon, 12 Aug 2024 23:31:45 -0400
> >> Xiaoyao Li <xiaoyao.li@intel.com> wrote:
> >>  
> >>> Currently, QEMU exposes CPUID 0x1f to guest only when necessary, i.e.,
> >>> when topology level that cannot be enumerated by leaf 0xB, e.g., die or
> >>> module level, are configured for the guest, e.g., -smp xx,dies=2.
> >>>
> >>> However, 1) TDX architecture forces to require CPUID 0x1f to 
> >>> configure CPU
> >>> topology. and 2) There is a bug in Windows that Windows 10/11 expects 
> >>> valid
> >>> 0x1f leafs when the maximum basic leaf > 0x1f[1].  
> >>   1. will it boot if you use older cpu model?  
> > 
> > It can boot with any cpu model that has .level < 0x1f.  
> 
> I realize just now that we don't need to introduce "x-cpuid-1f" as the 
> workaround for buggy windows. We can always workaround it by limiting 
> the maximum basic CPUID leaf to less than 0x1f, i.e., -cpu xxx,level=0x1e

I'd suggest to add this to change log into 'known issues' section.
(I mean Windows bug symptoms and suggested workaround)  

> 
> I think we can ignore this patch for now. I will re-submit it with TDX 
> enabling series, and with "x-cpuid-1f" interface removed.
> 
> >>   2. how user would know that this option would be needed?  
> > 
> > Honestly, I don't have an answer for it.
> > 
> > I'm not sure if it is the duty of QEMU to identify this case and print 
> > some hint to user. It's the bug of Windows, maybe Mircosoft should put 
> > something in their known bugs list for users?
I guess you've answered your own question alredy we have a workaround
and there is not need for yet another option that user won't know how to use.

As for configuring workaround, it's upto upper layers which know what OS
would be running in VM.  



      reply	other threads:[~2024-08-19 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13  3:31 [PATCH v2] i386/cpu: Introduce enable_cpuid_0x1f to force exposing CPUID 0x1f Xiaoyao Li
2024-08-13  7:39 ` Zhao Liu
2024-08-13  9:27 ` Igor Mammedov
2024-08-13 14:51   ` Xiaoyao Li
2024-08-13 16:39     ` Xiaoyao Li
2024-08-19 15:32       ` Igor Mammedov [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=20240819173210.7db4ca33@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=john.levon@nutanix.com \
    --cc=manish.mishra@nutanix.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiaoyao.li@intel.com \
    --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).