VirtualBox

Changeset 39995 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 4, 2012 1:47:46 PM (13 years ago)
Author:
vboxsync
Message:

tstX86-1: fxsave (on intel) will #PF before writing anything. very nice.

Location:
trunk/src/VBox/VMM/testcase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstX86-1.cpp

    r39993 r39995  
    55
    66/*
    7  * Copyright (C) 2011 Oracle Corporation
     7 * Copyright (C) 2011-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/VMM/testcase/tstX86-1A.asm

    r39993 r39995  
    55
    66;
    7 ; Copyright (C) 2011 Oracle Corporation
     7; Copyright (C) 2011-2012 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    10101010BEGINPROC   x861_Test3
    10111011        SAVE_ALL_PROLOGUE
    1012 
     1012%if 0
    10131013        call    x861_LoadUniqueRegValuesSSE
    10141014        mov     xDI, REF_GLOBAL(g_pbEfExecPage)
     
    11411141        ShouldTrap X86_XCPT_GP, fxrstor [xDI + 14]
    11421142        ShouldTrap X86_XCPT_GP, fxrstor [xDI + 15]
     1143%endif
     1144
     1145        ; Lets check what a FP in fxsave changes ... nothing on intel.
     1146        mov     ebx, 16
     1147.fxsave_pf_effect_loop:
     1148        mov     xDI, REF_GLOBAL(g_pbEfExecPage)
     1149        add     xDI, PAGE_SIZE - 512 * 2
     1150        mov     xSI, xDI
     1151        mov     eax, 066778899h
     1152        mov     ecx, 512 * 2 / 4
     1153        cld
     1154        rep stosd
     1155
     1156        ShouldTrap X86_XCPT_PF, fxsave  [xSI + PAGE_SIZE - 512 + xBX]
     1157
     1158        mov     ecx, 512 / 4
     1159        lea     xDI, [xSI + 512]
     1160        repz cmpsd
     1161        mov     eax, ebx
     1162        jnz     .return
     1163
     1164        add     ebx, 16
     1165        cmp     ebx, 512
     1166        jb      .fxsave_pf_effect_loop
    11431167
    11441168
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