VirtualBox

Changeset 80191 in vbox for trunk/include


Ignore:
Timestamp:
Aug 8, 2019 12:36:57 AM (5 years ago)
Author:
vboxsync
Message:

VMM/r3: Refactored VMCPU enumeration in preparation that aCpus will be replaced with a pointer array. Removed two raw-mode offset members from the CPUM and CPUMCPU sub-structures. bugref:9217 bugref:9517

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/vm.h

    r80135 r80191  
    990990 * Asserts that the current thread IS emulation thread \#0 (EMT0).
    991991 */
    992 #define VM_ASSERT_EMT0(pVM)                 VMCPU_ASSERT_EMT(&(pVM)->aCpus[0])
     992#if defined(VBOX_BUGREF_9217_PART_I) && defined(IN_RING3)
     993# define VM_ASSERT_EMT0(a_pVM)              VMCPU_ASSERT_EMT((a_pVM)->apCpusR3[0])
     994#else
     995# define VM_ASSERT_EMT0(a_pVM)              VMCPU_ASSERT_EMT(&(a_pVM)->aCpus[0])
     996#endif
    993997
    994998/** @def VM_ASSERT_EMT0_RETURN
     
    14251429    } cfgm;
    14261430
    1427 #ifdef VBOX_BUGREF_9217
    14281431    /** Padding for aligning the structure size on a page boundrary. */
    1429 # ifdef VBOX_WITH_REM
    1430     uint8_t         abAlignment2[3030 - sizeof(PVMCPUR3) * VMM_MAX_CPU_COUNT];
    1431 # else
    1432     uint8_t         abAlignment2[3286 - sizeof(PVMCPUR3) * VMM_MAX_CPU_COUNT];
    1433 # endif
    1434 #else
    1435     /** Padding for aligning the cpu array on a page boundary. */
    1436 # ifdef VBOX_WITH_REM
    1437     uint8_t         abAlignment2[3030];
    1438 # else
    1439     uint8_t         abAlignment2[3286];
    1440 # endif
     1432#ifdef VBOX_WITH_REM
     1433    uint8_t         abAlignment2[2520];
     1434#else
     1435    uint8_t         abAlignment2[2520 + 256];
    14411436#endif
    14421437
    14431438    /* ---- end small stuff ---- */
    14441439
    1445 #ifdef VBOX_BUGREF_9217
    14461440    /** Array of VMCPU pointers. */
    1447     PVMCPUR3        apCpus[VMM_MAX_CPU_COUNT];
    1448 #else
     1441    PVMCPUR3        apCpusR3[VMM_MAX_CPU_COUNT];
     1442#if !defined(VBOX_BUGREF_9217) && !defined(VBOX_BUGREF_9217_PART_I)
    14491443    /** VMCPU array for the configured number of virtual CPUs.
    14501444     * Must be aligned on a page boundary for TLB hit reasons as well as
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