VirtualBox

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


Ignore:
Timestamp:
Nov 17, 2008 3:46:29 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
39419
Message:

cpuid clears the high dwords of the 64 bits registers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r14251 r14257  
    18981898VMMDECL(int) EMInterpretCpuId(PVM pVM, PCPUMCTXCORE pRegFrame)
    18991899{
    1900     uint32_t iLeaf = pRegFrame->eax; NOREF(iLeaf);
     1900    uint32_t iLeaf = pRegFrame->eax;
     1901
     1902    /* cpuid clears the high dwords of the affected 64 bits registers. */
     1903    pRegFrame->rax = 0;
     1904    pRegFrame->rbx = 0;
     1905    pRegFrame->rcx = 0;
     1906    pRegFrame->rdx = 0;
    19011907
    19021908    /* Note: operates the same in 64 and non-64 bits mode. */
    1903     CPUMGetGuestCpuId(pVM, pRegFrame->eax, &pRegFrame->eax, &pRegFrame->ebx, &pRegFrame->ecx, &pRegFrame->edx);
     1909    CPUMGetGuestCpuId(pVM, iLeaf, &pRegFrame->eax, &pRegFrame->ebx, &pRegFrame->ecx, &pRegFrame->edx);
    19041910    Log(("Emulate: CPUID %x -> %08x %08x %08x %08x\n", iLeaf, pRegFrame->eax, pRegFrame->ebx, pRegFrame->ecx, pRegFrame->edx));
    19051911    return VINF_SUCCESS;
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