VirtualBox

Changeset 62020 in vbox


Ignore:
Timestamp:
Jul 5, 2016 8:18:23 AM (8 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Verify CPU feature before reading VMCS fields in debug-mode diagnostic code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r61977 r62020  
    48794879        }
    48804880# ifdef VBOX_ENABLE_64_BITS_GUESTS
    4881         /* Keep using the 64-bit switcher even though we're in 32-bit because of bad Intel design. See @bugref{8432#c7}. 
     4881        /* Keep using the 64-bit switcher even though we're in 32-bit because of bad Intel design. See @bugref{8432#c7}.
    48824882         * Except if Real-on-V86 is active, clear the 64-bit switcher flag because now we know the guest is in a sane
    48834883         * state where it's safe to use the 32-bit switcher again.
     
    49904990                rc = VMXReadVmcs32(VMX_VMCS32_CTRL_PROC_EXEC, &u32Val);                 AssertRC(rc);
    49914991                Log4(("VMX_VMCS32_CTRL_PROC_EXEC               %#RX32\n", u32Val));
    4992                 rc = VMXReadVmcs32(VMX_VMCS32_CTRL_PROC_EXEC2, &u32Val);                AssertRC(rc);
    4993                 Log4(("VMX_VMCS32_CTRL_PROC_EXEC2              %#RX32\n", u32Val));
     4992                if (pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_SECONDARY_EXEC_CTRL)
     4993                {
     4994                    rc = VMXReadVmcs32(VMX_VMCS32_CTRL_PROC_EXEC2, &u32Val);            AssertRC(rc);
     4995                    Log4(("VMX_VMCS32_CTRL_PROC_EXEC2              %#RX32\n", u32Val));
     4996                }
    49944997                rc = VMXReadVmcs32(VMX_VMCS32_CTRL_ENTRY, &u32Val);                     AssertRC(rc);
    49954998                Log4(("VMX_VMCS32_CTRL_ENTRY                   %#RX32\n", u32Val));
     
    50265029                rc = VMXReadVmcsHstN(VMX_VMCS_CTRL_CR4_READ_SHADOW, &uHCReg);           AssertRC(rc);
    50275030                Log4(("VMX_VMCS_CTRL_CR4_READ_SHADOW           %#RHr\n", uHCReg));
    5028                 rc = VMXReadVmcs64(VMX_VMCS64_CTRL_EPTP_FULL, &u64Val);                 AssertRC(rc);
    5029                 Log4(("VMX_VMCS64_CTRL_EPTP_FULL               %#RX64\n", u64Val));
     5031                if (pVM->hm.s.fNestedPaging)
     5032                {
     5033                    rc = VMXReadVmcs64(VMX_VMCS64_CTRL_EPTP_FULL, &u64Val);             AssertRC(rc);
     5034                    Log4(("VMX_VMCS64_CTRL_EPTP_FULL               %#RX64\n", u64Val));
     5035                }
    50305036
    50315037                /* Guest bits. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette