From 23bb836a44fd2331cfed244a091dbff0aa458d13 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 30 Jan 2013 13:54:39 +0100 Subject: Do not use 4gb segment assistance in PVH * i386/i386/gdt.c (gdt_init) [MACH_PV_DESCRIPTORS && !MACH_PV_PAGETABLES]: Do not enable VMASST_TYPE_4gb_segments. * i386/i386/trap.c (user_trap): Do not handle trap 15, 4gb segment assist notification. --- i386/i386/gdt.c | 6 +++++- i386/i386/trap.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'i386') diff --git a/i386/i386/gdt.c b/i386/i386/gdt.c index c3a9a7c..5523fea 100644 --- a/i386/i386/gdt.c +++ b/i386/i386/gdt.c @@ -69,13 +69,17 @@ gdt_init() pmap_set_page_readonly(gdt); if (hyp_set_gdt(kv_to_la(&frame), GDTSZ)) panic("couldn't set gdt\n"); +#endif +#ifdef MACH_PV_PAGETABLES 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_PV_DESCRIPTORS */ +#endif /* MACH_PV_PAGETABLES */ + +#ifndef MACH_PV_DESCRIPTORS /* Load the new GDT. */ { struct pseudo_descriptor pdesc; diff --git a/i386/i386/trap.c b/i386/i386/trap.c index 74a89f9..c6aab48 100644 --- a/i386/i386/trap.c +++ b/i386/i386/trap.c @@ -510,7 +510,7 @@ printf("user trap %d error %d sub %08x\n", type, code, subcode); /*NOTREACHED*/ break; -#ifdef MACH_XEN +#ifdef MACH_PV_PAGETABLES case 15: { static unsigned count = 0; -- cgit v1.2.3