WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Saving segment registers on interrupt / lost NMI

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Saving segment registers on interrupt / lost NMI
From: Aravind Menon <aravind.menon@xxxxxxx>
Date: Tue, 1 Feb 2005 02:06:47 +0000 (UTC)
Delivery-date: Tue, 01 Feb 2005 07:37:06 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Loom/3.14 (http://gmane.org/)
I was looking at the interrupt entry code in Xen, and noticed that segment
registers get saved depending on the CPU level which was interrupted.
Specifically, the ds, es, fs and gs registers are saved only if ring 1, 2 or 3
was interrupted, and not if ring 0 was interrupted.

What is the motivation for this?

It appears to me that this is responsible for sometimes causing "lost" NMI
interrupts. Basically, if an NMI occurs when a Xen activation was saving or
restoring these registers, the handler just returns without calling the NMI
watchdog. Is this because it may not be possible to restore the segments
otherwise? Can this be fixed by making the NMI handler always save all segment
registers? 

"Losing" an NMI is problematic in the following scenario which I am considering:
I want to use the NMI interrupt in conjunction with the hardware performance
counters for statistical profiling. The hardware counters are programmed to
generate an NMI at regular intervals, and the NMI handler collects PC samples
for statistical profiling. 

Unfortunately, if the NMI is "lost", the profiling comes to a halt, because the
hardware counters need to be restarted on each NMI. Thus, I need to make sure
that no NMIs are lost.

I would like to know if this problem can be solved by making sure that all
interrupt handlers and the NMI handler save all segment registers on entry, and
restore them on exit.

Thanks.

Aravind Menon

Doctoral School
EPFL, Switzerland







-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>