From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: NMI delivery not correctly working Date: Tue, 24 Jul 2007 17:47:23 +0200 Message-ID: <200707241747.23720.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 =3D 0;" in do_iret() in xen/arch/x86/x86_(32|64)/traps.c, but this is actually never called after NMI delivery. =46or 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 =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy