All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christoph Egger" <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Subject: NMI delivery not correctly working
Date: Tue, 24 Jul 2007 17:47:23 +0200	[thread overview]
Message-ID: <200707241747.23720.Christoph.Egger@amd.com> (raw)


Hi!

The NMI delivery does not work correctly.

In the section process_nmi: in
xen/arch/x86/x86_(32|64)/entry.S you set a bit in VCPU_nmi_masked,
deliver the NMI but not clear VCPU_nmi_masked.

I know, there is a line "current->nmi_masked = 0;" in do_iret() in
xen/arch/x86/x86_(32|64)/traps.c, but this is actually never called
after NMI delivery.

For short: The *first* NMI is actually delivered, but all following NMIs
are NEVER delivered!!

I don't know if this change is correct for 64 bit:

@@ -218,6 +220,7 @@ process_nmi:
         movq %rax,TRAPBOUNCE_eip(%rdx)
         movb $TBF_INTERRUPT,TRAPBOUNCE_flags(%rdx)
         call create_bounce_frame
+        movb  $0, VCPU_nmi_masked(%rbx)
         jmp  test_all_events


and for 32 bit:

@@ -261,6 +262,7 @@ process_nmi:
         movw $FLAT_KERNEL_CS,TRAPBOUNCE_cs(%edx)
         movb $TBF_INTERRUPT,TRAPBOUNCE_flags(%edx)
         call create_bounce_frame
+        movb $0,VCPU_nmi_masked(%ebx)
         jmp  test_all_events

but NMI delivery seems to work with these changes.


Christoph



-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

             reply	other threads:[~2007-07-24 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24 15:47 Christoph Egger [this message]
2007-07-24 17:07 ` NMI delivery not correctly working Keir Fraser
2007-07-24 18:26   ` Kaushik Barde
2007-07-25  6:22     ` Keir Fraser
2007-07-25  6:43       ` Kaushik Barde
2007-07-25  6:55         ` Keir Fraser
2007-07-25  6:48   ` Christoph Egger
2007-07-25  6:57     ` Keir Fraser

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=200707241747.23720.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /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.