VirtualBox

Changeset 21937 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Aug 3, 2009 8:50:47 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50605
Message:

Fixed wrong check for sysenter.

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

Legend:

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

    r21562 r21937  
    8686            if (u32)
    8787            {
    88                 for (unsigned i=0;i<pVM->cCPUs;i++)
    89                     pVM->aCpus[i].cpum.s.fUseFlags |= CPUM_USE_SYSENTER;
    90 
     88                pVM->cpum.s.fHostUseFlags |= CPUM_USE_SYSENTER;
    9189                Log(("CPUMR0Init: host uses sysenter cs=%08x%08x\n", ASMRdMsr_High(MSR_IA32_SYSENTER_CS), u32));
    9290            }
  • trunk/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac

    r18927 r21937  
    256256    FIXUP FIX_NO_SYSENTER_JMP, 0, htg_no_sysenter - NAME(Start) ; this will insert a jmp htg_no_sysenter if host doesn't use sysenter.
    257257    ; save MSR_IA32_SYSENTER_CS register.
     258    mov     rbx, rdx                    ; save edx
    258259    mov     ecx, MSR_IA32_SYSENTER_CS
    259     mov     rbx, rdx                    ; save edx
    260260    rdmsr                               ; edx:eax <- MSR[ecx]
    261     mov     [rbx + r8 + CPUMCPU.Host.SysEnter.cs], rax
    262     mov     [rbx + r8 + CPUMCPU.Host.SysEnter.cs + 4], rdx
    263     xor     rax, rax                    ; load 0:0 to cause #GP upon sysenter
    264     xor     rdx, rdx
     261    mov     [rbx + r8 + CPUMCPU.Host.SysEnter.cs], eax
     262    mov     [rbx + r8 + CPUMCPU.Host.SysEnter.cs + 4], edx
     263    xor     eax, eax                    ; load 0:0 to cause #GP upon sysenter
     264    xor     edx, edx
    265265    wrmsr
    266266    mov     rdx, rbx                    ; restore edx
Note: See TracChangeset for help on using the changeset viewer.

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