- Timestamp:
- May 18, 2016 10:14:11 AM (8 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
-
VMMAll/IEMAllCImpl.cpp.h (modified) (1 diff)
-
VMMR0/CPUMR0A.asm (modified) (7 diffs)
-
VMMR3/APIC.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r61019 r61029 1021 1021 IEM_CIMPL_DEF_4(iemCImpl_BranchCallGate, uint16_t, uSel, IEMBRANCH, enmBranch, IEMMODE, enmEffOpSize, PIEMSELDESC, pDesc) 1022 1022 { 1023 #define IEM_IMPLEMENTS_CALLGATE 1023 1024 #ifndef IEM_IMPLEMENTS_CALLGATE 1024 1025 IEM_RETURN_ASPECT_NOT_IMPLEMENTED(); -
trunk/src/VBox/VMM/VMMR0/CPUMR0A.asm
r57446 r61029 201 201 202 202 203 ;; Macro for FXSAVE for the guest FPU but tries to figure out whether to203 ;; Macro for FXSAVE/XSAVE for the guest FPU but tries to figure out whether to 204 204 ; save the 32-bit FPU state or 64-bit FPU state. 205 205 ; … … 207 207 ; @param %2 Pointer to XState. 208 208 ; @param %3 Force AMD64 209 ; @param %4 Use XSAVE 209 210 ; @uses xAX, xDX, EFLAGS, 20h of stack. 210 211 ; 211 %macro SAVE_32_OR_64_FPU 3212 %macro SAVE_32_OR_64_FPU 4 212 213 %if CPUMR0_IS_AMD64 || %3 213 214 ; Save the guest FPU (32-bit or 64-bit), preserves existing broken state. See @bugref{7138}. … … 215 216 jnz short %%save_long_mode_guest 216 217 %endif 218 %if %4 219 xsave [pXState] 220 %else 217 221 fxsave [pXState] 222 %endif 218 223 %if CPUMR0_IS_AMD64 || %3 219 224 jmp %%save_done_32bit_cs_ds 220 225 221 226 %%save_long_mode_guest: 227 %if %4 228 o64 xsave [pXState] 229 %else 222 230 o64 fxsave [pXState] 231 %endif 223 232 224 233 xor edx, edx … … 266 275 and eax, ~CPUM_VOLATILE_XSAVE_GUEST_COMPONENTS ; Already saved in HMR0A.asm. 267 276 %endif 268 %ifdef RT_ARCH_AMD64 269 o64 xsave [pXState] 270 %else 271 xsave [pXState] 272 %endif 277 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0, 1 273 278 jmp %%guest_done 274 279 275 280 ; FXSAVE 276 281 %%guest_fxsave: 277 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0 282 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0, 0 278 283 279 284 %%guest_done: … … 282 287 283 288 ;; 284 ; Wrapper for selecting 32-bit or 64-bit FXRSTOR according to what SAVE_32_OR_64_FPU did.289 ; Wrapper for selecting 32-bit or 64-bit FXRSTOR/XRSTOR according to what SAVE_32_OR_64_FPU did. 285 290 ; 286 291 ; @param %1 Pointer to CPUMCPU. 287 292 ; @param %2 Pointer to XState. 288 293 ; @param %3 Force AMD64. 294 ; @param %4 Use XRSTOR 289 295 ; @uses xAX, xDX, EFLAGS 290 296 ; 291 %macro RESTORE_32_OR_64_FPU 3297 %macro RESTORE_32_OR_64_FPU 4 292 298 %if CPUMR0_IS_AMD64 || %3 293 299 ; Restore the guest FPU (32-bit or 64-bit), preserves existing broken state. See @bugref{7138}. … … 298 304 %%restore_32bit_fpu: 299 305 %endif 306 %if %4 307 xrstor [pXState] 308 %else 300 309 fxrstor [pXState] 310 %endif 301 311 %if CPUMR0_IS_AMD64 || %3 302 312 ; TODO: Restore XMM8-XMM15! 303 313 jmp short %%restore_fpu_done 304 314 %%restore_64bit_fpu: 315 %if %4 316 o64 xrstor [pXState] 317 %else 305 318 o64 fxrstor [pXState] 319 %endif 306 320 %%restore_fpu_done: 307 321 %endif … … 334 348 and eax, ~CPUM_VOLATILE_XSAVE_GUEST_COMPONENTS ; Will be loaded by HMR0A.asm. 335 349 %endif 336 %ifdef RT_ARCH_AMD64 337 o64 xrstor [pXState] 338 %else 339 xrstor [pXState] 340 %endif 350 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0, 1 341 351 jmp %%guest_done 342 352 343 353 ; FXRSTOR 344 354 %%guest_fxrstor: 345 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0 355 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0, 0 346 356 347 357 %%guest_done: -
trunk/src/VBox/VMM/VMMR3/APIC.cpp
r60858 r61029 905 905 SSMR3GetU32(pSSM, &u32TimerShift); 906 906 /* Old implementation may have left the timer shift uninitialized until 907 * the timer configuration register was written. Fix that up.908 * /909 if (!u32TimerShift)910 u32TimerShift = 1;907 * the timer configuration register was written. Unfortunately zero is 908 * also a valid timer shift value, so we're just going to ignore it 909 * completely. The shift count can always be derived from the DCR. 910 */ 911 911 uint8_t const uTimerShift = apicGetTimerShift(pXApicPage); 912 AssertMsgReturn(u32TimerShift == uTimerShift, ("Timer shift invalid! Saved-state contains %u, expected %u\n", u32TimerShift,913 uTimerShift), VERR_INVALID_STATE);914 912 915 913 SSMR3GetU32(pSSM, &pXApicPage->timer_icr.u32InitialCount);
Note:
See TracChangeset
for help on using the changeset viewer.

