public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jan Beulich <jbeulich@novell.com>
Cc: tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org,
	Roland McGrath <roland@redhat.com>
Subject: Re: [PATCH] i386: fix merge mistake in i387.c
Date: Wed, 5 Mar 2008 15:36:34 +0100	[thread overview]
Message-ID: <20080305143634.GB16477@elte.hu> (raw)
In-Reply-To: <47CE6952.76E4.0078.0@novell.com>


* Jan Beulich <jbeulich@novell.com> wrote:

> convert_fxsr_to_user() in 2.6.24's i387_32.c did this, and 
> convert_to_fxsr() also does the inverse, so I assume it's an oversight 
> that it is no longer being done.

thanks Jan, applied.

> -	env->fcs = fxsave->fcs;
> +	env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16);

we encode it this way because there's no space for the 'FPU Last 
Instruction Opcode' (->fop) field in the legacy user_i387_ia32_struct 
that ptrace PTRACE_GETFPREGS/PTRACE_SETFPREGS uses.

it's probably pure legacy - i'd be surprised if any user-space relied on 
the FPU Last Opcode in any way. But indeed we used to do it previously 
so the most conservative thing is to preserve that piece of information.

FXRESTORE ignores the FOP field so the "restore" direction is 
meaningless:

    fxsave->fop = (u16) ((u32) env->fcs >> 16);

	Ingo

      reply	other threads:[~2008-03-05 14:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05  8:35 [PATCH] i386: fix merge mistake in i387.c Jan Beulich
2008-03-05 14:36 ` Ingo Molnar [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=20080305143634.GB16477@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --cc=tglx@linutronix.de \
    /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