All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH 0/2] i386: use better matching family/model/stepping for generic CPUs
Date: Wed, 26 May 2021 17:43:26 +0100	[thread overview]
Message-ID: <YK56rnSly772QAxl@redhat.com> (raw)
In-Reply-To: <20210507133650.645526-1-berrange@redhat.com>

ping

On Fri, May 07, 2021 at 02:36:48PM +0100, Daniel P. Berrangé wrote:
> This is in response to this bug report:
> 
>    https://gitlab.com/qemu-project/qemu/-/issues/191
> 
> The generic 'qemu64' and 'max' CPUs currently defined to report a
> family/model/stepping that approximately corresponds to an AMD K7
> vintage architecture. The K7 series predates the introduction of
> 64-bit support by AMD in the K8 series. This has been reported to
> lead to LLVM complaints about generating 64-bit code for a 32-bit
> CPU target
> 
>   LLVM ERROR: 64-bit code requested on a subtarget that doesn't support it!
> 
> The bug report is fairly limited, but it suggests LLVM looks at the
> family/model/stepping and decides it to be 32-bit, despite qemu64
> reporting it is 64-bit capable. I've not reproduced this myself,
> however, so I'm largely trusting the original reporter's diagnosis
> 
> Of course interpreting the family/model/stepping only makes sense
> with scoped to the reported vendor ID.  Under TCG, the vendor is
> honoured, but AFAICT, under KVM the vendor defined by the QEMU
> model model is ignored and the real host vendor passed through.
> This will make the chosen family/model/stepping non-sensical when
> run under KVM on an Intel host.
> 
> None the less these patches change to report a CPUID with the
> family, model and stepping taken from a
> 
>  AMD Athlon(tm) 64 X2 Dual Core Processor 4000+
> 
> which is one of the first 64-bit AMD CPUs. This is at least more
> accurate in terms of the static CPU model definition, even if it
> is still nonsense in the case where KVM overrides the vendor to
> be non-AMD.
> 
> Daniel P. Berrangé (2):
>   i386: use better matching family/model/stepping for 'qemu64' CPU
>   i386: use better matching family/model/stepping for 'max' CPU
> 
>  hw/i386/pc.c      |  6 +++++-
>  target/i386/cpu.c | 12 +++++++++---
>  2 files changed, 14 insertions(+), 4 deletions(-)
> 
> -- 
> 2.31.1
> 
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2021-05-26 16:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 13:36 [PATCH 0/2] i386: use better matching family/model/stepping for generic CPUs Daniel P. Berrangé
2021-05-07 13:36 ` [PATCH 1/2] i386: use better matching family/model/stepping for 'qemu64' CPU Daniel P. Berrangé
2021-05-26 19:31   ` Eduardo Habkost
2021-05-07 13:36 ` [PATCH 2/2] i386: use better matching family/model/stepping for 'max' CPU Daniel P. Berrangé
2021-05-26 19:34   ` Eduardo Habkost
2021-05-26 16:43 ` Daniel P. Berrangé [this message]
2021-05-26 19:38 ` [PATCH 0/2] i386: use better matching family/model/stepping for generic CPUs Eduardo Habkost

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=YK56rnSly772QAxl@redhat.com \
    --to=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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.