summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-08-26 00:57:51 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-08-26 00:57:51 +0200
commitdad50b78b6a7507c460dc349acfbda78e91b3ee3 (patch)
tree56a9a26371433f48716c73f1541bbbcb9f9ffaac
parente6a0432b5b92b507970e3a6d2302c94a3a389519 (diff)
Do not advice to install libc0.3-xen on 4gb_segment trap
ext2fs.static will trigger some anyway. Instead, provide an easy way to track how many traps happen. * i386/i386/gdt.c [MACH_XEN] (gdt_init): Disable enabling VMASST_TYPE_4gb_segments_notify. * i386/i386/trap.c [MACH_XEN] (user_trap): Remove printing libc0.3-xen installation advice on 4gb_segments trap. Instead, print a count every 10000 traps, and disable them on the 1000000th.
-rw-r--r--i386/i386/gdt.c2
-rw-r--r--i386/i386/trap.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/i386/i386/gdt.c b/i386/i386/gdt.c
index 68f5764..f26a50c 100644
--- a/i386/i386/gdt.c
+++ b/i386/i386/gdt.c
@@ -71,8 +71,10 @@ gdt_init()
panic("couldn't set gdt\n");
if (hyp_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments))
panic("couldn't set 4gb segments vm assist");
+#if 0
if (hyp_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments_notify))
panic("couldn't set 4gb segments vm assist notify");
+#endif
#else /* MACH_XEN */
/* Load the new GDT. */
{
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index a0cebcb..a2e77da 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -530,9 +530,11 @@ printf("user trap %d error %d sub %08x\n", type, code, subcode);
case 15:
{
static unsigned count = 0;
- if (!count) {
- count = 1;
- printf("4gb segment access, probably from TLS use, please use a Xenified libc package (i.e. with the nosegneg option)\n");
+ count++;
+ if (!(count % 10000))
+ print("%d 4gb segments accesses\n", count);
+ if (count > 1000000) {
+ printf("A million 4gb segment accesses, stopping reporting them.");
if (hyp_vm_assist(VMASST_CMD_disable, VMASST_TYPE_4gb_segments_notify))
panic("couldn't disable 4gb segments vm assist notify");
}