VirtualBox

Changeset 47689 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 13, 2013 12:53:07 PM (11 years ago)
Author:
vboxsync
Message:

tstVMM: DRx fixes.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/VMMTests.cpp

    r45618 r47689  
    7070        return rc;
    7171
     72    Log(("vmmR3DoGCTest: %d %#x\n", enmTestcase, uVariation));
    7273    CPUMSetHyperState(pVCpu, pVM->vmm.s.pfnCallTrampolineRC, pVCpu->vmm.s.pbEMTStackBottomRC, 0, 0);
    7374    vmmR3TestClearStack(pVCpu);
     
    7980    Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu));
    8081    rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
     82
     83#if 1
     84    /* flush the raw-mode logs. */
     85# ifdef LOG_ENABLED
     86    PRTLOGGERRC pLogger = pVM->vmm.s.pRCLoggerR3;
     87    if (   pLogger
     88        && pLogger->offScratch > 0)
     89        RTLogFlushRC(NULL, pLogger);
     90# endif
     91# ifdef VBOX_WITH_RC_RELEASE_LOGGING
     92    PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
     93    if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
     94        RTLogFlushRC(RTLogRelDefaultInstance(), pRelLogger);
     95# endif
     96#endif
     97
     98    Log(("vmmR3DoGCTest: rc=%Rrc iLastGZRc=%Rrc\n", rc, pVCpu->vmm.s.iLastGZRc));
    8199    if (RT_LIKELY(rc == VINF_SUCCESS))
    82100        rc = pVCpu->vmm.s.iLastGZRc;
     
    246264        {
    247265            RTPrintf("VMM: Nop test failed, rc=%Rrc not VINF_SUCCESS\n", rc);
    248             return rc;
     266            return RT_FAILURE(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS;
    249267        }
    250268
     
    260278        {
    261279            RTPrintf("VMM: DR0=0x10000 test failed with rc=%Rrc!\n", rc);
    262             return rc;
     280            return RT_FAILURE(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS;
    263281        }
    264282
     
    273291        {
    274292            RTPrintf("VMM: DR1=VMMGCEntry test failed with rc=%Rrc! expected VINF_EM_RAW_BREAKPOINT_HYPER\n", rc);
    275             return rc;
     293            return RT_FAILURE(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS;
    276294        }
    277295
     
    283301        {
    284302            RTPrintf("VMM: failed to resume on hyper breakpoint, rc=%Rrc = KNOWN BUG\n", rc); /** @todo fix VMMR3ResumeHyper */
    285             return rc;
     303            return RT_FAILURE(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS;
    286304        }
    287305
     
    292310        {
    293311            RTPrintf("VMM: DR1=VMMGCEntry test failed with rc=%Rrc! expected VINF_EM_RAW_BREAKPOINT_HYPER\n", rc);
    294             return rc;
     312            return RT_FAILURE(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS;
    295313        }
    296314
     
    305323            {
    306324                RTPrintf("\nVMM: failed to step on hyper breakpoint, rc=%Rrc\n", rc);
    307                 return rc;
     325                return RT_FAILURE(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS;
    308326            }
    309327            RTGCUINTREG Pc = CPUMGetHyperEIP(pVCpu);
     
    329347        {
    330348            RTPrintf("VMM: NOP failed, rc=%Rrc\n", rc);
    331             return rc;
     349            return RT_FAILURE(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS;
    332350        }
    333351
     
    343361            {
    344362                RTPrintf("VMM: Interrupt masking failed: rc=%Rrc\n", rc);
    345                 return rc;
     363                return RT_FAILURE(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS;
    346364            }
    347365            uint64_t Ticks = ASMReadTSC() - StartTick;
  • trunk/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac

    r47686 r47689  
    784784.if_clear_out:
    785785%endif
     786    mov     edi, eax                    ; save return code in EDI (careful with COM_DWORD_REG from here on!)
     787
    786788    ; str     [edx + CPUMCPU.Hyper.tr] - double fault only, and it won't be right then either.
    787789    sldt    [edx + CPUMCPU.Hyper.ldtr.Sel]
     
    791793
    792794    ; Disable debug registers if active so they cannot trigger while switching.
    793     test    dword [edi + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HYPER
     795    test    dword [edx + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HYPER
    794796    jz      .gth_disabled_dr7
    795797    mov     eax, X86_DR7_INIT_VAL
     
    800802    ;; Load Intermediate memory context.
    801803    ;;
    802     mov     edi, eax                    ; save return code in EDI (careful with COM_DWORD_REG from here on!)
    803804    FIXUP SWITCHER_FIX_INTER_CR3_GC, 1
    804805    mov     eax, 0ffffffffh
  • trunk/src/VBox/VMM/VMMSwitcher/PAEand32Bit.mac

    r47660 r47689  
    515515    mov     eax, dr3
    516516    mov     [edx + CPUMCPU.Host.dr3], eax
    517     or      dword [edi + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HOST
     517    or      dword [edx + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HOST
    518518
    519519    ; load hyper DR0-7
     
    530530    mov     eax, [edx + CPUMCPU.Hyper.dr + 8*7]
    531531    mov     dr7, eax
    532     or      dword [edi + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HYPER
     532    or      dword [edx + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HYPER
    533533    jmp     htg_debug_regs_guest_done
    534534
     
    682682    ; special registers which may change.
    683683vmmRCToHostAsm_SaveNoGeneralRegs:
     684    mov     edi, eax                    ; save return code in EDI (careful with COM_DWORD_REG from here on!)
    684685    ; str     [edx + CPUMCPU.Hyper.tr] - double fault only, and it won't be right then either.
    685686    sldt    [edx + CPUMCPU.Hyper.ldtr.Sel]
     
    689690
    690691    ; Disable debug regsiters if active so they cannot trigger while switching.
    691     test    dword [edi + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HYPER
     692    test    dword [edx + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HYPER
    692693    jz      .gth_disabled_dr7
    693694    mov     eax, X86_DR7_INIT_VAL
     
    700701    ;
    701702    mov     esi, edx
    702     mov     edi, eax
    703703
    704704    xor     edx, edx
     
    707707    wrmsr
    708708
    709     mov     eax, edi
    710709    mov     edx, esi
    711710%endif
     
    715714    ;; Load Intermediate memory context.
    716715    ;;
    717     mov     edi, eax                    ; save return code in EDI (careful with COM_DWORD_REG from here on!)
    718716    mov     ecx, [edx + CPUMCPU.Host.cr3]
    719717    FIXUP SWITCHER_FIX_INTER_CR3_GC, 1
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