Deleted Added
full compact
vmcs.c (222605) vmcs.c (242122)
1/*-
2 * Copyright (c) 2011 NetApp, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 353 unchanged lines hidden (view full) ---

362 goto done;
363
364 /* Load the IA32_EFER MSR */
365 efer = rdmsr(MSR_EFER);
366 if ((error = vmwrite(VMCS_HOST_IA32_EFER, efer)) != 0)
367 goto done;
368
369 /* Load the control registers */
1/*-
2 * Copyright (c) 2011 NetApp, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 353 unchanged lines hidden (view full) ---

362 goto done;
363
364 /* Load the IA32_EFER MSR */
365 efer = rdmsr(MSR_EFER);
366 if ((error = vmwrite(VMCS_HOST_IA32_EFER, efer)) != 0)
367 goto done;
368
369 /* Load the control registers */
370 cr0 = rcr0();
370
371 /*
372 * We always want CR0.TS to be set when the processor does a VM exit.
373 *
374 * With emulation turned on unconditionally after a VM exit, we are
375 * able to trap inadvertent use of the FPU until the guest FPU state
376 * has been safely squirreled away.
377 */
378 cr0 = rcr0() | CR0_TS;
371 if ((error = vmwrite(VMCS_HOST_CR0, cr0)) != 0)
372 goto done;
373
374 cr4 = rcr4();
375 if ((error = vmwrite(VMCS_HOST_CR4, cr4)) != 0)
376 goto done;
377
378 /* Load the segment selectors */

--- 169 unchanged lines hidden ---
379 if ((error = vmwrite(VMCS_HOST_CR0, cr0)) != 0)
380 goto done;
381
382 cr4 = rcr4();
383 if ((error = vmwrite(VMCS_HOST_CR4, cr4)) != 0)
384 goto done;
385
386 /* Load the segment selectors */

--- 169 unchanged lines hidden ---