diff options
Diffstat (limited to 'arch/x86/lguest/boot.c')
-rw-r--r-- | arch/x86/lguest/boot.c | 22 |
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. */ |
181 | static unsigned long save_fl(void) | 181 | static 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. */ |
326 | static void lguest_cpuid(unsigned int *eax, unsigned int *ebx, | 326 | static 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 | } |