Rusty Russell
78be3706b2
[PATCH] i386: Allow a kernel not to be in ring 0
...
We allow for the fact that the guest kernel may not run in ring 0. This
requires some abstraction in a few places when setting %cs or checking
privilege level (user vs kernel).
This is Chris' [RFC PATCH 15/33] move segment checks to subarch, except rather
than using #define USER_MODE_MASK which depends on a config option, we use
Zach's more flexible approach of assuming ring 3 == userspace. I also used
"get_kernel_rpl()" over "get_kernel_cs()" because I think it reads better in
the code...
1) Remove the hardcoded 3 and introduce #define SEGMENT_RPL_MASK 3 2) Add a
get_kernel_rpl() macro, and don't assume it's zero.
And:
Clean up of patch for letting kernel run other than ring 0:
a. Add some comments about the SEGMENT_IS_*_CODE() macros.
b. Add a USER_RPL macro. (Code was comparing a value to a mask
in some places and to the magic number 3 in other places.)
c. Add macros for table indicator field and use them.
d. Change the entry.S tests for LDT stack segment to use the macros
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
2006-09-26 10:52:39 +02:00
..
2006-01-06 08:33:37 -08:00
2006-09-01 11:39:08 -07:00
2006-09-26 10:52:26 +02:00
2005-09-05 00:06:10 -07:00
2005-06-23 09:45:09 -07:00
2006-09-26 10:52:26 +02:00
2006-06-29 10:26:19 -07:00
2006-06-25 10:00:55 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-09-26 10:52:32 +02:00
2005-09-05 00:06:11 -07:00
2006-09-26 10:52:29 +02:00
2006-08-30 16:05:15 -07:00
2006-09-26 10:52:35 +02:00
2006-04-01 22:50:03 -05:00
2006-03-23 07:38:05 -08:00
2006-07-08 15:24:18 -07:00
2005-09-07 16:57:21 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2006-04-26 12:56:16 +01:00
2006-04-26 12:56:16 +01:00
2006-04-26 12:56:16 +01:00
2006-01-06 08:33:36 -08:00
2005-08-29 16:02:48 -07:00
2006-06-27 17:32:36 -07:00
2006-06-26 10:48:22 -07:00
2005-04-16 15:20:36 -07:00
2006-01-14 18:27:15 -08:00
2005-04-16 15:20:36 -07:00
2006-06-26 09:58:21 -07:00
2006-09-26 10:52:35 +02:00
2005-09-10 10:06:34 -07:00
2006-01-11 19:04:56 -08:00
2006-04-26 12:56:16 +01:00
2006-03-25 09:10:55 -08:00
2006-09-26 10:52:37 +02:00
2006-09-26 10:52:38 +02:00
2006-01-18 19:20:31 -08:00
2006-09-13 07:32:15 -07:00
2005-07-26 14:35:42 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:38 -07:00
2006-06-27 17:32:38 -07:00
2006-07-02 13:58:47 -07:00
2006-09-26 10:52:29 +02:00
2006-07-08 15:24:18 -07:00
2006-09-26 10:52:26 +02:00
2006-04-26 12:56:16 +01:00
2006-04-26 12:56:16 +01:00
2006-04-26 12:56:16 +01:00
2006-06-29 10:26:23 -07:00
2006-04-29 14:13:16 -07:00
2005-06-30 08:45:10 -07:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2006-09-26 10:52:27 +02:00
2006-09-26 10:52:32 +02:00
2006-04-26 12:56:16 +01:00
2006-01-10 08:01:34 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2006-07-03 15:27:03 -07:00
2005-04-16 15:20:36 -07:00
2006-06-26 10:48:15 -07:00
2006-09-19 12:43:58 +01:00
2006-06-26 09:58:22 -07:00
2006-09-26 10:52:38 +02:00
2006-04-26 12:56:16 +01:00
2006-07-31 13:28:38 -07:00
2005-04-16 15:20:36 -07:00
2005-05-26 16:16:16 -07:00
2006-07-08 15:24:18 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-06-23 07:42:56 -07:00
2006-02-15 15:32:22 -08:00
2006-04-26 12:56:16 +01:00
2006-06-27 17:32:38 -07:00
2005-04-16 15:20:36 -07:00
2006-08-27 11:01:32 -07:00
2006-01-06 08:33:38 -08:00
2006-01-06 08:33:39 -08:00
2006-04-11 06:18:34 -07:00
2005-04-16 15:20:36 -07:00
2006-06-21 12:00:00 -07:00
2005-09-05 00:06:12 -07:00
2006-06-23 07:42:56 -07:00
2006-09-26 10:52:31 +02:00
2005-04-16 15:20:36 -07:00
2006-09-26 10:52:27 +02:00
2005-09-12 10:49:57 -07:00
2005-04-16 15:20:36 -07:00
2006-06-27 17:32:38 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2006-04-27 12:00:59 -07:00
2005-04-16 15:20:36 -07:00
2006-04-27 12:00:59 -07:00
2006-09-26 10:52:32 +02:00
2006-03-25 08:22:56 -08:00
2006-07-08 15:24:18 -07:00
2006-06-27 17:32:37 -07:00
2006-09-26 10:52:39 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-09-26 10:52:32 +02:00
2006-09-26 10:52:31 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-09-26 10:52:39 +02:00
2006-09-26 10:52:32 +02:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2006-09-13 07:32:16 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-09-13 07:32:15 -07:00
2006-09-26 10:52:35 +02:00
2006-06-29 16:58:06 -07:00
2005-04-16 15:20:36 -07:00
2005-06-23 09:45:05 -07:00
2005-09-10 10:06:21 -07:00
2006-09-26 10:52:39 +02:00
2005-04-16 15:20:36 -07:00
2006-09-26 10:52:34 +02:00
2006-03-26 08:57:00 -08:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:24:46 -07:00
2006-09-18 16:20:40 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-07-09 18:47:12 -07:00
2006-06-26 09:58:21 -07:00
2006-06-26 09:58:21 -07:00
2005-04-16 15:20:36 -07:00
2006-09-26 10:52:29 +02:00
2006-06-27 17:32:45 -07:00
2006-09-26 10:52:36 +02:00
2006-04-26 12:56:16 +01:00
2006-06-25 10:01:09 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-09-26 10:52:28 +02:00
2006-09-26 10:52:34 +02:00
2005-04-16 15:20:36 -07:00
2006-06-22 15:05:58 -07:00
2005-04-16 15:20:36 -07:00
2006-01-08 20:14:11 -08:00
2005-04-16 15:20:36 -07:00
2005-09-05 00:06:11 -07:00