All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Keir Fraser <keir.xen@gmail.com>
Cc: Jan Beulich <JBeulich@suse.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: x86_64: Fix double fault stack setup
Date: Thu, 24 May 2012 19:15:14 +0100	[thread overview]
Message-ID: <4FBE7AB2.3070408@citrix.com> (raw)
In-Reply-To: <CBE436D3.342EC%keir.xen@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

On 24/05/12 19:04, Keir Fraser wrote:
> On 24/05/2012 16:28, "Andrew Cooper" <andrew.cooper3@citrix.com> wrote:
>
>> Ah yes - how silly of me.  I misread the manual when checking that fact,
>> but this was an INT 08 experiment.  I really should have checked with a
>> ud2 as well.
>>
>> That is a bit awkward.
>>
>> Do we actually care about this error from an INT 08?  I suppose we could
>> check under rip for 0xcd 0x08, but then the same argument would apply to
>> all other exceptions which may push an error onto the stack.
>>
>> Do we care however that entry_vector is not being set correctly?  I cant
>> see anything on the current codepath which uses it, but it doesn't
>> preclude someone adding code in the future.
> It would be a simple one-line patch and make that entry point consistent
> with all other exception-handling entry points. So I'm in favour of it.
>
>  -- Keir

Ok - attached.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com


[-- Attachment #2: x86_64-double-fault-entry-vector.patch --]
[-- Type: text/x-patch, Size: 514 bytes --]

# HG changeset patch
# Parent 69c3ae25bb1ddcb0ea44b7566d36d34e9d6a70aa
x86_64: Record entry vector for double faults.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r 69c3ae25bb1d xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -595,6 +595,7 @@ ENTRY(spurious_interrupt_bug)
         jmp   handle_exception
 
 ENTRY(double_fault)
+        movl $TRAP_double_fault,4(%rsp)
         SAVE_ALL
         movq  %rsp,%rdi
         call  do_double_fault

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2012-05-24 18:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 14:59 x86_64: Fix double fault stack setup Andrew Cooper
2012-05-24 15:14 ` Jan Beulich
2012-05-24 15:28   ` Andrew Cooper
2012-05-24 15:46     ` Jan Beulich
2012-05-24 16:12       ` Andrew Cooper
2012-05-25 10:35         ` Jan Beulich
2012-05-25 11:04           ` Keir Fraser
2012-05-24 18:04     ` Keir Fraser
2012-05-24 18:15       ` Andrew Cooper [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=4FBE7AB2.3070408@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir.xen@gmail.com \
    --cc=xen-devel@lists.xen.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.