qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Petr Cvek <petrcvekcz@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	"S. Tsirkin, Michael" <mst@redhat.com>
Subject: Re: [PATCH] qemu/timer: Don't use RDTSC on i486
Date: Sun, 26 Nov 2023 23:52:09 +0100	[thread overview]
Message-ID: <ce5c9d80-28b9-43ff-8315-996929faaa60@gmail.com> (raw)
In-Reply-To: <CABgObfabW_WKdfGFgao0BJ0wHYHRx6KzMsLzvqUvzu3ZMx5Bdw@mail.gmail.com>

Dne 26. 11. 23 v 16:56 Paolo Bonzini napsal(a):
> 
> 
> Il sab 25 nov 2023, 13:23 Petr Cvek <petrcvekcz@gmail.com <mailto:petrcvekcz@gmail.com>> ha scritto:
> 
>     GCC defines __i386__ for i386 and i486, which both lack RDTSC instruction.
>     The i386 seems to be impossible to distinguish, but i486 can be identified
>     by checking for undefined __i486__.
> 
> 
> As far as I know QEMU cannot be run on i486 anyway since TCG assumes the presence of CPUID. Have you actually tried?
> 

Yes I tried running x86_64 mesa3d glxgears on amd 5x86. It worked with about 5 fps :). Latest 486 CPUs supports CPUID btw.

> Paolo
> 
> 
>     Signed-off-by: Petr Cvek <petrcvekcz@gmail.com <mailto:petrcvekcz@gmail.com>>
>     ---
>      include/qemu/timer.h | 2 +-
>      1 file changed, 1 insertion(+), 1 deletion(-)
> 
>     diff --git a/include/qemu/timer.h b/include/qemu/timer.h
>     index 9a366e551f..7baa5d1d41 100644
>     --- a/include/qemu/timer.h
>     +++ b/include/qemu/timer.h
>     @@ -872,7 +872,7 @@ static inline int64_t cpu_get_host_ticks(void)
>          return retval;
>      }
> 
>     -#elif defined(__i386__)
>     +#elif defined(__i386__) && !defined(__i486__)
> 
>      static inline int64_t cpu_get_host_ticks(void)
>      {
>     -- 
>     2.43.0
> 


  reply	other threads:[~2023-11-26 22:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-25 12:23 [PATCH] qemu/timer: Don't use RDTSC on i486 Petr Cvek
2023-11-26 12:37 ` Samuel Tardieu
2023-11-26 12:59   ` Petr Cvek
2023-11-26 13:03     ` Samuel Tardieu
2023-11-26 22:49       ` Petr Cvek
2023-11-26 15:56 ` Paolo Bonzini
2023-11-26 22:52   ` Petr Cvek [this message]
2023-11-28 15:52   ` Richard Henderson
2023-11-29 13:50     ` Petr Cvek
2023-11-29 14:27       ` Richard Henderson
2023-11-27  9:49 ` Peter Maydell

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=ce5c9d80-28b9-43ff-8315-996929faaa60@gmail.com \
    --to=petrcvekcz@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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 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).