VirtualBox

Changeset 13702

Show
Ignore:
Timestamp:
10/31/08 01:03:32 (2 months ago)
Author:
vboxsync
Message:

VMM++: new EM status code VINF_EM_DBG_RING0_ASSERTION for distinguishing ring-0 and hyper assertions. Resynched the .mac files, hacking the x86.h sed transformations in the process.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Makefile.kmk

    r13547 r13702  
    566566                -e '/\\$$/d' \ 
    567567                -e 's/#define/%define/' \ 
     568                -e 's/\([0-9a-fA-F][0-9a-fA-F]*\)U$$/\1/' \ 
     569                -e 's/\([0-9a-fA-F][0-9a-fA-F]*\)U[[:space:]]/\1 /' \ 
     570                -e 's/[[:space:]]\/\*\*<.*$$//' \ 
    568571                --output include/VBox/x86.mac \ 
    569572                include/VBox/x86.h 
  • trunk/include/VBox/err.h

    r13515 r13702  
    101101 * resolved there it will enter guru meditation. */ 
    102102#define VINF_EM_DBG_HYPER_ASSERTION         1103 
     103/** Hit a ring-0 assertion on EMT. 
     104 * EM will enter guru mediation state when. */ 
     105#define VINF_EM_DBG_RING0_ASSERTION         1104 
    103106/** Indicating that the VM should be suspended for debugging because 
    104107 * the developer wants to inspect the VM state. */ 
    105 #define VINF_EM_DBG_STOP                    1104 
     108#define VINF_EM_DBG_STOP                    1105 
    106109/** Indicating success single stepping and that EM should report that 
    107110 * event to the debugger. */ 
    108 #define VINF_EM_DBG_STEPPED                 1105 
     111#define VINF_EM_DBG_STEPPED                 1106 
    109112/** Indicating that a breakpoint was hit and that EM should notify the debugger 
    110113 * and in the event there is no debugger fail fatally. */ 
    111 #define VINF_EM_DBG_BREAKPOINT              1106 
     114#define VINF_EM_DBG_BREAKPOINT              1107 
    112115/** Indicating that EM should single step an instruction. 
    113116 * The instruction is stepped in the current execution mode (RAW/REM). */ 
    114 #define VINF_EM_DBG_STEP                    1107 
     117#define VINF_EM_DBG_STEP                    1108 
    115118/** Indicating that the VM is being turned off and that the EM should 
    116119 * exit to the VM awaiting the destruction request. */ 
    117 #define VINF_EM_OFF                         1108 
     120#define VINF_EM_OFF                         1109 
    118121/** Indicating that the VM has been reset and that scheduling goes 
    119122 * back to startup defaults. */ 
    120 #define VINF_EM_RESET                       1109 
     123#define VINF_EM_RESET                       1110 
    121124/** Indicating that the VM has been suspended and that the the thread 
    122125 * should wait for request telling it what to do next. */ 
    123 #define VINF_EM_SUSPEND                     1110 
     126#define VINF_EM_SUSPEND                     1111 
    124127/** Indicating that the VM has executed a halt instruction and that 
    125128 * the emulation thread should wait for an interrupt before resuming 
    126129 * execution. */ 
    127 #define VINF_EM_HALT                        1111 
     130#define VINF_EM_HALT                        1112 
    128131/** Indicating that the VM has been resumed and that the thread should 
    129132 * start executing. */ 
    130 #define VINF_EM_RESUME                      1112 
     133#define VINF_EM_RESUME                      1113 
    131134/** Indicating that we've got an out-of-memory condition and that we need 
    132135 * to take the appropriate actions to deal with this. 
     
    136139 *          with an out-of-memory condition, and even if that should happen the condition 
    137140 *          will be rediscovered before executing any more code. */ 
    138 #define VINF_EM_NO_MEMORY                   1113 
     141#define VINF_EM_NO_MEMORY                   1114 
    139142/** The fatal variant of VINF_EM_NO_MEMORY. */ 
    140 #define VERR_EM_NO_MEMORY                   (-1113
     143#define VERR_EM_NO_MEMORY                   (-1114
    141144/** Indicating that a rescheduling to recompiled execution. 
    142145 * Typically caused by raw-mode executing code which is difficult/slow 
    143146 * to virtualize rawly. 
    144147 * @remarks Important to have a higher priority (lower number) than the other rescheduling status codes. */ 
    145 #define VINF_EM_RESCHEDULE_REM              1114 
     148#define VINF_EM_RESCHEDULE_REM              1115 
    146149/** Indicating that a rescheduling to vmx-mode execution. 
    147150 * Typically caused by REM detecting that hardware-accelerated raw-mode execution is possible. */ 
    148 #define VINF_EM_RESCHEDULE_HWACC            1115 
     151#define VINF_EM_RESCHEDULE_HWACC            1116 
    149152/** Indicating that a rescheduling to raw-mode execution. 
    150153 * Typically caused by REM detecting that raw-mode execution is possible. 
    151154 * @remarks Important to have a higher priority (lower number) than VINF_EM_RESCHEDULE. */ 
    152 #define VINF_EM_RESCHEDULE_RAW              1116 
     155#define VINF_EM_RESCHEDULE_RAW              1117 
    153156/** Indicating that a rescheduling now is required. Typically caused by 
    154157 * interrupts having changed the EIP. */ 
    155 #define VINF_EM_RESCHEDULE                  1117 
     158#define VINF_EM_RESCHEDULE                  1118 
    156159/** PARAV call */ 
    157 #define VINF_EM_RESCHEDULE_PARAV            1118 
     160#define VINF_EM_RESCHEDULE_PARAV            1119 
    158161/** Last scheduling related status code. (inclusive) */ 
    159 #define VINF_EM_LAST                        1118 
     162#define VINF_EM_LAST                        1119 
    160163 
    161164/** Reason for leaving GC: Guest trap which couldn't be handled in GC. 
    162165 * The trap is generally forwared to the REM and executed there. */ 
    163 #define VINF_EM_RAW_GUEST_TRAP              1120 
     166#define VINF_EM_RAW_GUEST_TRAP              1121 
    164167/** Reason for leaving GC: Interrupted by external interrupt. 
    165168 * The interrupt needed to be handled by the host OS. */ 
    166 #define VINF_EM_RAW_INTERRUPT               1121 
     169#define VINF_EM_RAW_INTERRUPT               1122 
    167170/** Reason for leaving GC: Interrupted by external interrupt while in hypervisor code. 
    168171 * The interrupt needed to be handled by the host OS and hypervisor execution must be 
    169172 * resumed. VM state is not complete at this point. */ 
    170 #define VINF_EM_RAW_INTERRUPT_HYPER         1122 
     173#define VINF_EM_RAW_INTERRUPT_HYPER         1123 
    171174/** Reason for leaving GC: A Ring switch was attempted. 
    172175 * Normal cause of action is to execute this in REM. */ 
    173 #define VINF_EM_RAW_RING_SWITCH             1123 
     176#define VINF_EM_RAW_RING_SWITCH             1124 
    174177/** Reason for leaving GC: A Ring switch was attempted using software interrupt. 
    175178 * Normal cause of action is to execute this in REM. */ 
    176 #define VINF_EM_RAW_RING_SWITCH_INT         1124 
     179#define VINF_EM_RAW_RING_SWITCH_INT         1125 
    177180/** Reason for leaving GC: A privileged instruction was attempted executed. 
    178181 * Normal cause of action is to execute this in REM. */ 
    179 #define VINF_EM_RAW_EXCEPTION_PRIVILEGED    1125 
     182#define VINF_EM_RAW_EXCEPTION_PRIVILEGED    1126 
    180183 
    181184/** Reason for leaving GC: Emulate instruction. */ 
    182 #define VINF_EM_RAW_EMULATE_INSTR           1126 
     185#define VINF_EM_RAW_EMULATE_INSTR           1127 
    183186/** Reason for leaving GC: Unhandled TSS write. 
    184187 * Recompiler gets control. */ 
    185 #define VINF_EM_RAW_EMULATE_INSTR_TSS_FAULT 1127 
     188#define VINF_EM_RAW_EMULATE_INSTR_TSS_FAULT 1128 
    186189/** Reason for leaving GC: Unhandled LDT write. 
    187190 * Recompiler gets control. */ 
    188 #define VINF_EM_RAW_EMULATE_INSTR_LDT_FAULT 1128 
     191#define VINF_EM_RAW_EMULATE_INSTR_LDT_FAULT 1129 
    189192/** Reason for leaving GC: Unhandled IDT write. 
    190193 * Recompiler gets control. */ 
    191 #define VINF_EM_RAW_EMULATE_INSTR_IDT_FAULT 1129 
     194#define VINF_EM_RAW_EMULATE_INSTR_IDT_FAULT 1130 
    192195/** Reason for leaving GC: Unhandled GDT write. 
    193196 * Recompiler gets control. */ 
    194 #define VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT 1130 
     197#define VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT 1131 
    195198/** Reason for leaving GC: Unhandled Page Directory write. 
    196199 * Recompiler gets control. */ 
    197 #define VINF_EM_RAW_EMULATE_INSTR_PD_FAULT  1131 
     200#define VINF_EM_RAW_EMULATE_INSTR_PD_FAULT  1132 
    198201/** Reason for leaving GC: jump inside generated patch jump. 
    199202 * Fatal error. */ 
    200 #define VERR_EM_RAW_PATCH_CONFLICT          (-1132
     203#define VERR_EM_RAW_PATCH_CONFLICT          (-1133
    201204/** Reason for leaving GC: Hlt instruction. 
    202205 * Recompiler gets control. */ 
    203 #define VINF_EM_RAW_EMULATE_INSTR_HLT       1133 
     206#define VINF_EM_RAW_EMULATE_INSTR_HLT       1134 
    204207/** Reason for leaving GC: Ring-3 operation pending. */ 
    205 #define VINF_EM_RAW_TO_R3                   1134 
     208#define VINF_EM_RAW_TO_R3                   1135 
    206209/** Reason for leaving GC: Timer pending. */ 
    207 #define VINF_EM_RAW_TIMER_PENDING           1135 
     210#define VINF_EM_RAW_TIMER_PENDING           1136 
    208211/** Reason for leaving GC: Interrupt pending (guest). */ 
    209 #define VINF_EM_RAW_INTERRUPT_PENDING       1136 
     212#define VINF_EM_RAW_INTERRUPT_PENDING       1137 
    210213/** Reason for leaving GC: Encountered a stale selector. */ 
    211 #define VINF_EM_RAW_STALE_SELECTOR          1137 
     214#define VINF_EM_RAW_STALE_SELECTOR          1138 
    212215/** Reason for leaving GC: The IRET resuming guest code trapped. */ 
    213 #define VINF_EM_RAW_IRET_TRAP               1138 
     216#define VINF_EM_RAW_IRET_TRAP               1139 
    214217/** The interpreter was unable to deal with the instruction at hand. */ 
    215218#define VERR_EM_INTERPRETER                 (-1148) 
  • trunk/include/VBox/err.mac

    r10375 r13702  
    1919%define VINF_EM_DBG_HYPER_BREAKPOINT    1102 
    2020%define VINF_EM_DBG_HYPER_ASSERTION    1103 
    21 %define VINF_EM_DBG_STOP    1104 
    22 %define VINF_EM_DBG_STEPPED    1105 
    23 %define VINF_EM_DBG_BREAKPOINT    1106 
    24 %define VINF_EM_DBG_STEP    1107 
    25 %define VINF_EM_OFF    1108 
    26 %define VINF_EM_RESET    1109 
    27 %define VINF_EM_SUSPEND    1110 
    28 %define VINF_EM_HALT    1111 
    29 %define VINF_EM_RESUME    1112 
    30 %define VINF_EM_NO_MEMORY    1113 
    31 %define VERR_EM_NO_MEMORY    (-1113) 
    32 %define VINF_EM_RESCHEDULE_REM    1114 
    33 %define VINF_EM_RESCHEDULE_HWACC    1115 
    34 %define VINF_EM_RESCHEDULE_RAW    1116 
    35 %define VINF_EM_RESCHEDULE    1117 
    36 %define VINF_EM_LAST    1117 
    37 %define VINF_EM_RAW_GUEST_TRAP    1120 
    38 %define VINF_EM_RAW_INTERRUPT    1121 
    39 %define VINF_EM_RAW_INTERRUPT_HYPER    1122 
    40 %define VINF_EM_RAW_RING_SWITCH    1123 
    41 %define VINF_EM_RAW_RING_SWITCH_INT    1124 
    42 %define VINF_EM_RAW_EXCEPTION_PRIVILEGED    1125 
    43 %define VINF_EM_RAW_EMULATE_INSTR    1126 
    44 %define VINF_EM_RAW_EMULATE_INSTR_TSS_FAULT    1127 
    45 %define VINF_EM_RAW_EMULATE_INSTR_LDT_FAULT    1128 
    46 %define VINF_EM_RAW_EMULATE_INSTR_IDT_FAULT    1129 
    47 %define VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT    1130 
    48 %define VINF_EM_RAW_EMULATE_INSTR_PD_FAULT    1131 
    49 %define VERR_EM_RAW_PATCH_CONFLICT    (-1132) 
    50 %define VINF_EM_RAW_EMULATE_INSTR_HLT    1133 
    51 %define VINF_EM_RAW_TO_R3    1134 
    52 %define VINF_EM_RAW_TIMER_PENDING    1135 
    53 %define VINF_EM_RAW_INTERRUPT_PENDING    1136 
    54 %define VINF_EM_RAW_STALE_SELECTOR    1137 
    55 %define VINF_EM_RAW_IRET_TRAP    1138 
     21%define VINF_EM_DBG_RING0_ASSERTION    1104 
     22%define VINF_EM_DBG_STOP    1105 
     23%define VINF_EM_DBG_STEPPED    1106 
     24%define VINF_EM_DBG_BREAKPOINT    1107 
     25%define VINF_EM_DBG_STEP    1108 
     26%define VINF_EM_OFF    1109 
     27%define VINF_EM_RESET    1110 
     28%define VINF_EM_SUSPEND    1111 
     29%define VINF_EM_HALT    1112 
     30%define VINF_EM_RESUME    1113 
     31%define VINF_EM_NO_MEMORY    1114 
     32%define VERR_EM_NO_MEMORY    (-1114) 
     33%define VINF_EM_RESCHEDULE_REM    1115 
     34%define VINF_EM_RESCHEDULE_HWACC    1116 
     35%define VINF_EM_RESCHEDULE_RAW    1117 
     36%define VINF_EM_RESCHEDULE    1118 
     37%define VINF_EM_RESCHEDULE_PARAV    1119 
     38%define VINF_EM_LAST    1119 
     39%define VINF_EM_RAW_GUEST_TRAP    1121 
     40%define VINF_EM_RAW_INTERRUPT    1122 
     41%define VINF_EM_RAW_INTERRUPT_HYPER    1123 
     42%define VINF_EM_RAW_RING_SWITCH    1124 
     43%define VINF_EM_RAW_RING_SWITCH_INT    1125 
     44%define VINF_EM_RAW_EXCEPTION_PRIVILEGED    1126 
     45%define VINF_EM_RAW_EMULATE_INSTR    1127 
     46%define VINF_EM_RAW_EMULATE_INSTR_TSS_FAULT    1128 
     47%define VINF_EM_RAW_EMULATE_INSTR_LDT_FAULT    1129 
     48%define VINF_EM_RAW_EMULATE_INSTR_IDT_FAULT    1130 
     49%define VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT    1131 
     50%define VINF_EM_RAW_EMULATE_INSTR_PD_FAULT    1132 
     51%define VERR_EM_RAW_PATCH_CONFLICT    (-1133) 
     52%define VINF_EM_RAW_EMULATE_INSTR_HLT    1134 
     53%define VINF_EM_RAW_TO_R3    1135 
     54%define VINF_EM_RAW_TIMER_PENDING    1136 
     55%define VINF_EM_RAW_INTERRUPT_PENDING    1137 
     56%define VINF_EM_RAW_STALE_SELECTOR    1138 
     57%define VINF_EM_RAW_IRET_TRAP    1139 
    5658%define VERR_EM_INTERPRETER    (-1148) 
    5759%define VERR_EM_INTERNAL_ERROR    (-1149) 
     
    343345%define VERR_VDI_BLOCK_FREE    (-3215) 
    344346%define VERR_VDI_VALUE_NOT_FOUND    (-3216) 
     347%define VERR_VDI_UNKNOWN_CFG_VALUES    (-3217) 
     348%define VINF_VDI_ASYNC_IO_FINISHED    3218 
     349%define VERR_VDI_ASYNC_IO_IN_PROGRESS    (-3219) 
    345350%define VERR_VBGL_NOT_INITIALIZED    (-3300) 
    346351%define VERR_VBGL_INVALID_ADDR    (-3301) 
     
    358363%define VERR_INTNET_FLT_IF_BUSY    (-3601) 
    359364%define VERR_INTNET_FLT_IF_FAILED    (-3602) 
     365%define VERR_INTNET_INCOMPATIBLE_TRUNK    (-3603) 
     366%define VERR_INTNET_INCOMPATIBLE_FLAGS    (-3604) 
    360367%define VERR_SUPDRV_COMPONENT_NOT_FOUND    (-3700) 
    361368%define VERR_SUPDRV_INTERFACE_NOT_SUPPORTED    (-3701) 
     
    392399%define VERR_VMX_X86_CR4_VMXE_CLEARED    (-4012) 
    393400%define VERR_VMX_MSR_LOCKED_OR_DISABLED    (-4013) 
     401%define VERR_VMX_INVALID_GUEST_STATE    (-4014) 
     402%define VERR_VMX_UNEXPECTED_EXIT_CODE    (-4015) 
     403%define VERR_VMX_UNEXPECTED_EXCEPTION    (-4016) 
     404%define VERR_VMX_UNEXPECTED_INTERRUPTION_EXIT_CODE    (-4017) 
    394405%define VERR_SVM_UNABLE_TO_START_VM    (-4050) 
    395406%define VERR_SVM_ILLEGAL_EFER_MSR    (-4051) 
     
    398409%define VERR_HWACCM_UNKNOWN_CPU    (-4100) 
    399410%define VERR_HWACCM_NO_CPUID    (-4101) 
     411%define VERR_HWACCM_SUSPEND_PENDING    (-4102) 
    400412%define VERR_DIS_INVALID_OPCODE    (-4200) 
    401413%define VERR_DIS_GEN_FAILURE    (-4201) 
     
    405417%define VERR_WEB_INVALID_OBJECT_ID    (-4303) 
    406418%define VERR_WEB_UNSUPPORTED_INTERFACE    (-4304) 
     419%define VINF_PARAV_SWITCH_TO_HOST    4400 
    407420%include "iprt/err.mac" 
  • trunk/include/VBox/x86.mac

    r10648 r13702  
    3535%define X86_CPUID_FEATURE_ECX_CX16      RT_BIT(13) 
    3636%define X86_CPUID_FEATURE_ECX_TPRUPDATE RT_BIT(14) 
     37%define X86_CPUID_FEATURE_ECX_X2APIC    RT_BIT(21) 
    3738%define X86_CPUID_FEATURE_ECX_POPCOUNT  RT_BIT(23) 
    3839%define X86_CPUID_FEATURE_EDX_FPU       RT_BIT(0) 
     
    104105%define X86_CPUID_AMD_FEATURE_ECX_SKINIT    RT_BIT(12) 
    105106%define X86_CPUID_AMD_FEATURE_ECX_WDT       RT_BIT(13) 
     107%define X86_CPUID_AMD_ADVPOWER_EDX_TS        RT_BIT(0) 
     108%define X86_CPUID_AMD_ADVPOWER_EDX_FID       RT_BIT(1) 
     109%define X86_CPUID_AMD_ADVPOWER_EDX_VID       RT_BIT(2) 
     110%define X86_CPUID_AMD_ADVPOWER_EDX_TTP       RT_BIT(3) 
     111%define X86_CPUID_AMD_ADVPOWER_EDX_TM        RT_BIT(4) 
     112%define X86_CPUID_AMD_ADVPOWER_EDX_STC       RT_BIT(5) 
     113%define X86_CPUID_AMD_ADVPOWER_EDX_MC        RT_BIT(6) 
     114%define X86_CPUID_AMD_ADVPOWER_EDX_HWPSTATE  RT_BIT(7) 
     115%define X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR  RT_BIT(8) 
    106116%define X86_CR0_PE                          RT_BIT(0) 
    107117%define X86_CR0_PROTECTION_ENABLE           RT_BIT(0) 
     
    150160%define X86_DR6_BS                          RT_BIT(14) 
    151161%define X86_DR6_BT                          RT_BIT(15) 
     162%define X86_DR6_INIT_VAL                    UINT64_C(0xFFFF0FF0) 
    152163%define X86_DR7_L0                          RT_BIT(0) 
    153164%define X86_DR7_G0                          RT_BIT(1) 
     
    170181%define X86_DR7_LEN3_MASK                   (3 << 30) 
    171182%define X86_DR7_MB1_MASK                    (RT_BIT(10)) 
    172 %define X86_DR7_L(iBp)                      ( 1 << (iBp * 2) ) 
    173 %define X86_DR7_G(iBp)                      ( 1 << (iBp * 2 + 1) ) 
     183%define X86_DR7_L(iBp)                      ( UINT32_C(1) << (iBp * 2) ) 
     184%define X86_DR7_G(iBp)                      ( UINT32_C(1) << (iBp * 2 + 1) ) 
    174185%define X86_DR7_RW_EO                       0 
    175186%define X86_DR7_RW_WO                       1 
     
    179190%define X86_DR7_LEN_BYTE                    0 
    180191%define X86_DR7_LEN_WORD                    1 
    181 %define X86_DR7_LEN_QWORD                   2 ;/**< AMD64 long mode only. */ 
     192%define X86_DR7_LEN_QWORD                   2 
    182193%define X86_DR7_LEN_DWORD                   3 
    183194%define X86_DR7_LEN(iBp, cb)                ( (cb) << ((iBp) * 4 + 18) ) 
    184 %define X86_DR7_ENABLED_MASK                (RT_BIT(0) | RT_BIT(1) | RT_BIT(2) | RT_BIT(3) | RT_BIT(4) | RT_BIT(6) | RT_BIT(7)) 
     195%define X86_DR7_GET_LEN(uDR7, iBp)          ( ( (uDR7) >> ((iBp) * 4 + 18) ) & 0x3U) 
     196%define X86_DR7_ENABLED_MASK                (RT_BIT(0) | RT_BIT(1) | RT_BIT(2) | RT_BIT(3) | RT_BIT(4) | RT_BIT(5) | RT_BIT(6) | RT_BIT(7)) 
     197%define X86_DR7_IO_ENABLED_MASK             (X86_DR7_RW(0, X86_DR7_RW_IO) | X86_DR7_RW(1, X86_DR7_RW_IO) | X86_DR7_RW(2, X86_DR7_RW_IO) | X86_DR7_RW(3, X86_DR7_RW_IO)) 
     198%define X86_DR7_INIT_VAL                    0x400 
    185199%define MSR_IA32_TSC                        0x10 
     200%define MSR_IA32_PLATFORM_ID                0x17 
    186201%define MSR_IA32_APICBASE                   0x1b 
    187202%define MSR_IA32_FEATURE_CONTROL            0x3A 
    188203%define MSR_IA32_FEATURE_CONTROL_LOCK       RT_BIT(0) 
    189204%define MSR_IA32_FEATURE_CONTROL_VMXON      RT_BIT(2) 
     205%define MSR_IA32_BIOS_UPDT_TRIG             0x79 
     206%define MSR_IA32_BIOS_SIGN_ID               0x8B 
    190207%define MSR_IA32_MTRR_CAP                   0xFE 
    191208%define MSR_IA32_SYSENTER_CS                0x174 
     
    197214%define MSR_IA32_CR_PAT                     0x277 
    198215%define MSR_IA32_MTRR_DEF_TYPE              0x2FF 
     216%define MSR_IA32_MC0_CTL                    0x400 
     217%define MSR_IA32_MC0_STATUS                 0x401 
    199218%define MSR_IA32_VMX_BASIC_INFO             0x480 
    200219%define MSR_IA32_VMX_PINBASED_CTLS          0x481 
     
    208227%define MSR_IA32_VMX_CR4_FIXED1             0x489 
    209228%define MSR_IA32_VMX_VMCS_ENUM              0x48A 
     229%define MSR_IA32_VMX_PROCBASED_CTLS2        0x48B 
     230%define MSR_IA32_VMX_EPT_CAPS               0x48C 
     231%define MSR_IA32_APIC_START                 0x800 
     232%define MSR_IA32_APIC_END                   0x900 
    210233%define MSR_K6_EFER                         0xc0000080 
    211234%define  MSR_K6_EFER_SCE                     RT_BIT(0) 
     
    262285%define X86_PAGE_4K_OFFSET_MASK             0xfff 
    263286%define X86_PAGE_4K_BASE_MASK               0xfffffffffffff000ULL 
    264 %define X86_PAGE_4K_BASE_MASK_32            0xfffff000U 
     287%define X86_PAGE_4K_BASE_MASK_32            0xfffff000 
    265288%define X86_PAGE_2M_SIZE                    _2M 
    266289%define X86_PAGE_2M_SHIFT                   21 
    267290%define X86_PAGE_2M_OFFSET_MASK             0x001fffff 
    268291%define X86_PAGE_2M_BASE_MASK               0xffffffffffe00000ULL 
    269 %define X86_PAGE_2M_BASE_MASK_32            0xffe00000U 
     292%define X86_PAGE_2M_BASE_MASK_32            0xffe00000 
    270293%define X86_PAGE_4M_SIZE                    _4M 
    271294%define X86_PAGE_4M_SHIFT                   22 
    272295%define X86_PAGE_4M_OFFSET_MASK             0x003fffff 
    273296%define X86_PAGE_4M_BASE_MASK               0xffffffffffc00000ULL 
    274 %define X86_PAGE_4M_BASE_MASK_32            0xffc00000U 
     297%define X86_PAGE_4M_BASE_MASK_32            0xffc00000 
    275298%define X86_PTE_P                           RT_BIT(0) 
    276299%define X86_PTE_RW                          RT_BIT(1) 
     
    422445%define X86_TRAP_PF_RSVD            RT_BIT(3) 
    423446%define X86_TRAP_PF_ID              RT_BIT(4) 
    424  
  • trunk/include/iprt/err.mac

    r10375 r13702  
    8585%define VERR_OUT_OF_RESOURCES    (-80) 
    8686%define VWRN_OUT_OF_RESOURCES    80 
     87%define VERR_NO_MORE_HANDLES    (-81) 
     88%define VERR_PREEMPT_DISABLED    (-82) 
    8789%define VERR_FILE_IO_ERROR    (-100) 
    8890%define VERR_OPEN_FAILED    (-101) 
     
    258260%define VERR_GETOPT_REQUIRED_ARGUMENT_MISSING    (-826) 
    259261%define VERR_GETOPT_INVALID_ARGUMENT_FORMAT    (-827) 
     262%define VERR_CACHE_FULL    (-850) 
     263%define VERR_CACHE_EMPTY    (-851) 
  • trunk/src/VBox/VMM/EM.cpp

    r13645 r13702  
    645645             * Guru meditation. 
    646646             */ 
     647            case VINF_EM_DBG_RING0_ASSERTION: /** @todo Make a guru meditation event! */ 
     648                rc = DBGFR3EventSrc(pVM, DBGFEVENT_DEV_STOP, "VINF_EM_DBG_RING0_ASSERTION", 0, NULL, NULL); 
     649                break; 
    647650            case VERR_REM_TOO_MANY_TRAPS: /** @todo Make a guru meditation event! */ 
    648651                rc = DBGFR3EventSrc(pVM, DBGFEVENT_DEV_STOP, "VERR_REM_TOO_MANY_TRAPS", 0, NULL, NULL); 
     
    671674                case VINF_EM_DBG_HYPER_BREAKPOINT: 
    672675                case VINF_EM_DBG_HYPER_ASSERTION: 
     676                case VINF_EM_DBG_RING0_ASSERTION: 
    673677                    break; 
    674678 
     
    701705                    switch (rcLast) 
    702706                    { 
    703                         case VINF_EM_DBG_HYPER_ASSERTION: 
    704707                        case VINF_EM_DBG_HYPER_STEPPED: 
    705708                        case VINF_EM_DBG_HYPER_BREAKPOINT: 
     709                        case VINF_EM_DBG_HYPER_ASSERTION: 
     710                        case VINF_EM_DBG_RING0_ASSERTION: 
    706711                            return rcLast; 
    707712                    } 
     
    23562361        case VINF_EM_DBG_BREAKPOINT: 
    23572362        case VINF_EM_DBG_STEP: 
    2358         case VINF_EM_DBG_HYPER_ASSERTION: 
    23592363        case VINF_EM_DBG_HYPER_BREAKPOINT: 
    23602364        case VINF_EM_DBG_HYPER_STEPPED: 
     2365        case VINF_EM_DBG_HYPER_ASSERTION: 
    23612366        case VINF_EM_DBG_STOP: 
    23622367            break; 
     
    23672372        case VERR_TRPM_DONT_PANIC: 
    23682373        case VERR_TRPM_PANIC: 
    2369             break; 
    2370  
     2374        case VINF_EM_DBG_RING0_ASSERTION: 
     2375            break; 
     2376 
     2377        /* 
     2378         * Up a level, after HwAccM have done some release logging. 
     2379         */ 
    23712380        case VERR_VMX_INVALID_VMCS_FIELD: 
    23722381        case VERR_VMX_INVALID_VMCS_PTR: 
     
    32583267 * and signaling of the wait object. 
    32593268 * 
    3260  * @returns VBox status code
     3269 * @returns VBox status code, informational status codes may indicate failure
    32613270 * @param   pVM         The VM to operate on. 
    32623271 */ 
     
    34513460                case VINF_EM_DBG_HYPER_BREAKPOINT: 
    34523461                case VINF_EM_DBG_HYPER_ASSERTION: 
    3453                     Log2(("EMR3ExecuteVM: %Vrc: %d -> %d\n", rc, pVM->em.s.enmState, EMSTATE_DEBUG_HYPER)); 
     3462                    Log2(("EMR3ExecuteVM: %Rrc: %d -> %d\n", rc, pVM->em.s.enmState, EMSTATE_DEBUG_HYPER)); 
    34543463                    pVM->em.s.enmState = EMSTATE_DEBUG_HYPER; 
     3464                    break; 
     3465 
     3466                /* 
     3467                 * Guru mediations. 
     3468                 */ 
     3469                case VINF_EM_DBG_RING0_ASSERTION: 
     3470                    Log(("EMR3ExecuteVM: %Rrc: %d -> %d (EMSTATE_GURU_MEDITATION)\n", rc, pVM->em.s.enmState, EMSTATE_GURU_MEDITATION)); 
     3471                    pVM->em.s.enmState = EMSTATE_GURU_MEDITATION; 
    34553472                    break; 
    34563473 
  • trunk/src/VBox/VMM/VMM.cpp

    r13701 r13702  
    19661966        } 
    19671967        rc = vmmR3ServiceCallHostRequest(pVM); 
    1968         if (VBOX_FAILURE(rc) || rc == VINF_EM_DBG_HYPER_ASSERTION) 
     1968        if (VBOX_FAILURE(rc) || rc == VINF_EM_DBG_RING0_ASSERTION) 
    19691969            return rc; 
    19701970        /* Resume R0 */ 
     
    22372237            LogRel((pVM->vmm.s.szRing0AssertMsg1)); 
    22382238            LogRel((pVM->vmm.s.szRing0AssertMsg2)); 
    2239             return VINF_EM_DBG_HYPER_ASSERTION; /** @todo rename this. */ 
     2239            return VINF_EM_DBG_RING0_ASSERTION; 
    22402240 
    22412241        default: 
  • trunk/src/VBox/VMM/VMMGuruMeditation.cpp

    r13698 r13702  
    227227         * Hypervisor errors. 
    228228         */ 
     229        case VINF_EM_DBG_RING0_ASSERTION: 
    229230        case VINF_EM_DBG_HYPER_ASSERTION: 
    230231        { 
    231             const char *pszMsg1 = HWACCMR3IsActive(pVM) ? pVM->vmm.s.szRing0AssertMsg1 : VMMR3GetGCAssertMsg1(pVM); 
     232            bool fIsRing0 = rcErr == VINF_EM_DBG_RING0_ASSERTION; 
     233            const char *pszMsg1 = fIsRing0 ? pVM->vmm.s.szRing0AssertMsg1 : VMMR3GetGCAssertMsg1(pVM); 
    232234            while (pszMsg1 && *pszMsg1 == '\n') 
    233235                pszMsg1++; 
    234             const char *pszMsg2 = HWACCMR3IsActive(pVM) ? pVM->vmm.s.szRing0AssertMsg2 : VMMR3GetGCAssertMsg2(pVM); 
     236            const char *pszMsg2 = fIsRing0 ? pVM->vmm.s.szRing0AssertMsg2 : VMMR3GetGCAssertMsg2(pVM); 
    235237            while (pszMsg2 && *pszMsg2 == '\n') 
    236238                pszMsg2++; 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy