qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64
@ 2014-05-10 11:25 Peter Maydell
  2014-06-03 14:07 ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-05-10 11:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, patches

We were returning the incorrect uname string (with a hyphen, not
an underscore) for x86_64. Fix this by removing the x86_64 special
case, since the default "just use UNAME_MACHINE" behaviour suffices.
This leaves cpu_to_uname_machine() special cases for only those
architectures which need to vary the string based on runtime CPU
features.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/uname.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/linux-user/uname.c b/linux-user/uname.c
index f5d4c66..1e6560d 100644
--- a/linux-user/uname.c
+++ b/linux-user/uname.c
@@ -52,9 +52,7 @@ const char *cpu_to_uname_machine(void *cpu_env)
     /* earliest emulated CPU is ARMv5TE; qemu can emulate the 1026, but not its
      * Jazelle support */
     return "armv5te" utsname_suffix;
-#elif defined(TARGET_X86_64)
-    return "x86-64";
-#elif defined(TARGET_I386)
+#elif defined(TARGET_I386) && !defined(TARGET_X86_64)
     /* see arch/x86/kernel/cpu/bugs.c: check_bugs(), 386, 486, 586, 686 */
     CPUState *cpu = ENV_GET_CPU((CPUX86State *)cpu_env);
     int family = object_property_get_int(OBJECT(cpu), "family", NULL);
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64
  2014-05-10 11:25 [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64 Peter Maydell
@ 2014-06-03 14:07 ` Peter Maydell
  2014-06-05 13:11   ` Riku Voipio
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-06-03 14:07 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Riku Voipio, Patch Tracking

Ping!

thanks
-- PMM

On 10 May 2014 12:25, Peter Maydell <peter.maydell@linaro.org> wrote:
> We were returning the incorrect uname string (with a hyphen, not
> an underscore) for x86_64. Fix this by removing the x86_64 special
> case, since the default "just use UNAME_MACHINE" behaviour suffices.
> This leaves cpu_to_uname_machine() special cases for only those
> architectures which need to vary the string based on runtime CPU
> features.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  linux-user/uname.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/linux-user/uname.c b/linux-user/uname.c
> index f5d4c66..1e6560d 100644
> --- a/linux-user/uname.c
> +++ b/linux-user/uname.c
> @@ -52,9 +52,7 @@ const char *cpu_to_uname_machine(void *cpu_env)
>      /* earliest emulated CPU is ARMv5TE; qemu can emulate the 1026, but not its
>       * Jazelle support */
>      return "armv5te" utsname_suffix;
> -#elif defined(TARGET_X86_64)
> -    return "x86-64";
> -#elif defined(TARGET_I386)
> +#elif defined(TARGET_I386) && !defined(TARGET_X86_64)
>      /* see arch/x86/kernel/cpu/bugs.c: check_bugs(), 386, 486, 586, 686 */
>      CPUState *cpu = ENV_GET_CPU((CPUX86State *)cpu_env);
>      int family = object_property_get_int(OBJECT(cpu), "family", NULL);
> --
> 1.9.2
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64
  2014-06-03 14:07 ` Peter Maydell
@ 2014-06-05 13:11   ` Riku Voipio
  2014-06-05 13:21     ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Riku Voipio @ 2014-06-05 13:11 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Riku Voipio, QEMU Developers, Patch Tracking

Hi,

On Tue, Jun 03, 2014 at 03:07:59PM +0100, Peter Maydell wrote:
> Ping!

Looks good, I'll collect this and other linux-user patches and submit linux-user update
by tomorrow.

Riku

> thanks
> -- PMM
> 
> On 10 May 2014 12:25, Peter Maydell <peter.maydell@linaro.org> wrote:
> > We were returning the incorrect uname string (with a hyphen, not
> > an underscore) for x86_64. Fix this by removing the x86_64 special
> > case, since the default "just use UNAME_MACHINE" behaviour suffices.
> > This leaves cpu_to_uname_machine() special cases for only those
> > architectures which need to vary the string based on runtime CPU
> > features.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> >  linux-user/uname.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/linux-user/uname.c b/linux-user/uname.c
> > index f5d4c66..1e6560d 100644
> > --- a/linux-user/uname.c
> > +++ b/linux-user/uname.c
> > @@ -52,9 +52,7 @@ const char *cpu_to_uname_machine(void *cpu_env)
> >      /* earliest emulated CPU is ARMv5TE; qemu can emulate the 1026, but not its
> >       * Jazelle support */
> >      return "armv5te" utsname_suffix;
> > -#elif defined(TARGET_X86_64)
> > -    return "x86-64";
> > -#elif defined(TARGET_I386)
> > +#elif defined(TARGET_I386) && !defined(TARGET_X86_64)
> >      /* see arch/x86/kernel/cpu/bugs.c: check_bugs(), 386, 486, 586, 686 */
> >      CPUState *cpu = ENV_GET_CPU((CPUX86State *)cpu_env);
> >      int family = object_property_get_int(OBJECT(cpu), "family", NULL);
> > --
> > 1.9.2
> >
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64
  2014-06-05 13:11   ` Riku Voipio
@ 2014-06-05 13:21     ` Peter Maydell
  2014-06-06  9:20       ` Riku Voipio
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-06-05 13:21 UTC (permalink / raw)
  To: Riku Voipio; +Cc: QEMU Developers, Patch Tracking

On 5 June 2014 14:11, Riku Voipio <riku.voipio@iki.fi> wrote:
> Hi,
>
> On Tue, Jun 03, 2014 at 03:07:59PM +0100, Peter Maydell wrote:
>> Ping!
>
> Looks good, I'll collect this and other linux-user patches and submit linux-user update
> by tomorrow.

Does that include the set you did fixing gcc 4.9 compiles?
I forget whether that had issues that needed a v2 or not.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64
  2014-06-05 13:21     ` Peter Maydell
@ 2014-06-06  9:20       ` Riku Voipio
  0 siblings, 0 replies; 5+ messages in thread
From: Riku Voipio @ 2014-06-06  9:20 UTC (permalink / raw)
  To: Peter Maydell, QEMU Developers

On Thu, Jun 05, 2014 at 02:21:42PM +0100, Peter Maydell wrote:
> On 5 June 2014 14:11, Riku Voipio <riku.voipio@iki.fi> wrote:
> > Hi,
> >
> > On Tue, Jun 03, 2014 at 03:07:59PM +0100, Peter Maydell wrote:
> >> Ping!
> >
> > Looks good, I'll collect this and other linux-user patches and submit linux-user update
> > by tomorrow.
 
> Does that include the set you did fixing gcc 4.9 compiles?
> I forget whether that had issues that needed a v2 or not.

The only issue is that nobody reviewed it. I've updated the patchset
a bit with better description and replaced ifdeffing of
restore_fpu_state with removin the lines. I'll send it on the list 
again so people have another chance to look at the patches.

Riku

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-06  9:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-10 11:25 [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64 Peter Maydell
2014-06-03 14:07 ` Peter Maydell
2014-06-05 13:11   ` Riku Voipio
2014-06-05 13:21     ` Peter Maydell
2014-06-06  9:20       ` Riku Voipio

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).