VirtualBox

Changeset 8870 in vbox


Ignore:
Timestamp:
May 16, 2008 8:23:10 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30901
Message:

Intercept mwait as well (AMD-V)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/hwacc_svm.h

    r8869 r8870  
    231231#define SVM_EXIT_ICEBP                  0x88
    232232/** WBINVD instruction. */
    233 #define SVM_INVD                        0x89
     233#define SVM_EXIT_WBINVD                 0x89
     234/** MONITOR instruction. */
     235#define SVM_EXIT_MONITOR                0x8A
     236/** MWAIT instruction uncond. */
     237#define SVM_EXIT_MWAIT_UNCOND           0x8B
     238/** MWAIT instruction when armed. */
     239#define SVM_EXIT_MWAIT_ARMED            0x8C
    234240/** Nested paging: host-level page fault occurred (EXITINFO1 contains fault errorcode; EXITINFO2 contains the guest physical address causing the fault.). */
    235241#define SVM_EXIT_NPF                    0x400
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r8868 r8870  
    253253
    254254    /** @todo nested paging */
    255     /* Intercept #NM only; #PF is not relevant due to nested paging (we get a seperate exit code (SVM_EXIT_NPF) for
    256      * pagefaults that need our attention).
    257      */
    258255    pVMCB->ctrl.u32InterceptException = HWACCM_SVM_TRAP_MASK;
    259256
     
    283280                                    | SVM_CTRL2_INTERCEPT_SKINIT
    284281                                    | SVM_CTRL2_INTERCEPT_RDTSCP        /* AMD only; we don't support this one */
     282                                    | SVM_CTRL2_INTERCEPT_WBINVD
     283                                    | SVM_CTRL2_INTERCEPT_MWAIT_UNCOND; /* don't execute mwait or else we'll idle inside the guest (host thinks the cpu load is high) */
    285284                                    ;
    286285    Log(("pVMCB->ctrl.u32InterceptException = %x\n", pVMCB->ctrl.u32InterceptException));
     
    12021201        break;
    12031202
     1203    case SVM_EXIT_WBINVD:
    12041204    case SVM_EXIT_INVD:                 /* Guest software attempted to execute INVD. */
    12051205        STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitInvd);
     
    14941494        break;
    14951495
    1496     case SVM_EXIT_RDPMC:
    14971496    case SVM_EXIT_RSM:
    14981497    case SVM_EXIT_INVLPGA:
     
    15211520    }
    15221521
    1523     /* Emulate RDMSR & WRMSR in ring 3. */
     1522    /* Emulate in ring 3. */
     1523    case SVM_EXIT_MONITOR:
     1524    case SVM_EXIT_RDPMC:
     1525    case SVM_EXIT_PAUSE:
     1526    case SVM_EXIT_MWAIT_UNCOND:
     1527    case SVM_EXIT_MWAIT_ARMED:
    15241528    case SVM_EXIT_MSR:
    15251529        rc = VINF_EM_RAW_EXCEPTION_PRIVILEGED;
     
    15341538        break;
    15351539
    1536     case SVM_EXIT_PAUSE:
    15371540    case SVM_EXIT_IDTR_READ:
    15381541    case SVM_EXIT_GDTR_READ:
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