aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lguest
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-30 07:30:56 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:56 -0500
commit65ea5b0349903585bfed9720fa06f5edb4f1cd25 (patch)
tree6c252228c34416b7e2077f23475de34500c2ab8a /arch/x86/lguest
parent53756d3722172815f52272b28c6d5d5e9639adde (diff)
x86: rename the struct pt_regs members for 32/64-bit consistency
We have a lot of code which differs only by the naming of specific members of structures that contain registers. In order to enable additional unifications, this patch drops the e- or r- size prefix from the register names in struct pt_regs, and drops the x- prefixes for segment registers on the 32-bit side. This patch also performs the equivalent renames in some additional places that might be candidates for unification in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/lguest')
-rw-r--r--arch/x86/lguest/boot.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index df04bf884dd4..ea46d05853bb 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -175,8 +175,8 @@ static void lguest_leave_lazy_mode(void)
175 * check there when it wants to deliver an interrupt. 175 * check there when it wants to deliver an interrupt.
176 */ 176 */
177 177
178/* save_flags() is expected to return the processor state (ie. "eflags"). The 178/* save_flags() is expected to return the processor state (ie. "flags"). The
179 * eflags word contains all kind of stuff, but in practice Linux only cares 179 * flags word contains all kind of stuff, but in practice Linux only cares
180 * about the interrupt flag. Our "save_flags()" just returns that. */ 180 * about the interrupt flag. Our "save_flags()" just returns that. */
181static unsigned long save_fl(void) 181static unsigned long save_fl(void)
182{ 182{
@@ -323,30 +323,30 @@ static void lguest_load_tr_desc(void)
323 * anyone (including userspace) can just use the raw "cpuid" instruction and 323 * anyone (including userspace) can just use the raw "cpuid" instruction and
324 * the Host won't even notice since it isn't privileged. So we try not to get 324 * the Host won't even notice since it isn't privileged. So we try not to get
325 * too worked up about it. */ 325 * too worked up about it. */
326static void lguest_cpuid(unsigned int *eax, unsigned int *ebx, 326static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
327 unsigned int *ecx, unsigned int *edx) 327 unsigned int *cx, unsigned int *dx)
328{ 328{
329 int function = *eax; 329 int function = *ax;
330 330
331 native_cpuid(eax, ebx, ecx, edx); 331 native_cpuid(ax, bx, cx, dx);
332 switch (function) { 332 switch (function) {
333 case 1: /* Basic feature request. */ 333 case 1: /* Basic feature request. */
334 /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ 334 /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */
335 *ecx &= 0x00002201; 335 *cx &= 0x00002201;
336 /* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, FPU. */ 336 /* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, FPU. */
337 *edx &= 0x07808101; 337 *dx &= 0x07808101;
338 /* The Host can do a nice optimization if it knows that the 338 /* The Host can do a nice optimization if it knows that the
339 * kernel mappings (addresses above 0xC0000000 or whatever 339 * kernel mappings (addresses above 0xC0000000 or whatever
340 * PAGE_OFFSET is set to) haven't changed. But Linux calls 340 * PAGE_OFFSET is set to) haven't changed. But Linux calls
341 * flush_tlb_user() for both user and kernel mappings unless 341 * flush_tlb_user() for both user and kernel mappings unless
342 * the Page Global Enable (PGE) feature bit is set. */ 342 * the Page Global Enable (PGE) feature bit is set. */
343 *edx |= 0x00002000; 343 *dx |= 0x00002000;
344 break; 344 break;
345 case 0x80000000: 345 case 0x80000000:
346 /* Futureproof this a little: if they ask how much extended 346 /* Futureproof this a little: if they ask how much extended
347 * processor information there is, limit it to known fields. */ 347 * processor information there is, limit it to known fields. */
348 if (*eax > 0x80000008) 348 if (*ax > 0x80000008)
349 *eax = 0x80000008; 349 *ax = 0x80000008;
350 break; 350 break;
351 } 351 }
352} 352}