VirtualBox

Changeset 82814 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Jan 22, 2020 3:38:46 AM (5 years ago)
Author:
vboxsync
Message:

VMM/HM: Implement last-branch-record (LBR) support for guests executed using hardware-assisted VT-x. Enable per-VM using CFGM.

Location:
trunk/include/VBox/vmm
Files:
3 edited

Legend:

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

    r82573 r82814  
    133133/** VMX VMWRITE all feature exposed to the guest but not supported on host. */
    134134#define VMX_UFC_GST_HOST_VMWRITE_ALL                            15
     135/** LBR stack size cannot be determined for the current CPU. */
     136#define VMX_UFC_LBR_STACK_SIZE_UNKNOWN                          16
     137/** LBR stack size of the CPU exceeds our buffer size. */
     138#define VMX_UFC_LBR_STACK_SIZE_OVERFLOW                         17
    135139/** @} */
    136140
     
    12001204/** Pointer to a const VMXMSRS struct. */
    12011205typedef const VMXMSRS *PCVMXMSRS;
     1206
     1207
     1208/**
     1209 * LBR MSRs.
     1210 */
     1211typedef struct LBRMSRS
     1212{
     1213    /** List of LastBranch-From-IP MSRs. */
     1214    uint64_t    au64BranchFromIpMsr[32];
     1215    /** List of LastBranch-To-IP MSRs. */
     1216    uint64_t    au64BranchToIpMsr[32];
     1217    /** The MSR containing the index to the most recent branch record.  */
     1218    uint64_t    uBranchTosMsr;
     1219} LBRMSRS;
     1220AssertCompileSizeAlignment(LBRMSRS, 8);
     1221AssertCompile(sizeof(LBRMSRS) < X86_PAGE_4K_SIZE);
     1222/** Pointer to a VMXMSRS struct. */
     1223typedef LBRMSRS *PLBRMSRS;
     1224/** Pointer to a const VMXMSRS struct. */
     1225typedef const LBRMSRS *PCLBRMSRS;
    12021226
    12031227
  • trunk/include/VBox/vmm/vm.h

    r81786 r82814  
    12791279        struct HM s;
    12801280#endif
    1281         uint8_t     padding[5440];      /* multiple of 64 */
     1281        uint8_t     padding[5504];      /* multiple of 64 */
    12821282    } hm;
    12831283
     
    14361436
    14371437    /** Padding for aligning the structure size on a page boundrary. */
    1438     uint8_t         abAlignment2[664 + 256 - sizeof(PVMCPUR3) * VMM_MAX_CPU_COUNT];
     1438    uint8_t         abAlignment2[664 - 64 + 256 - sizeof(PVMCPUR3) * VMM_MAX_CPU_COUNT];
    14391439
    14401440    /* ---- end small stuff ---- */
  • trunk/include/VBox/vmm/vm.mac

    r81624 r82814  
    122122    .vmm                    resb 1600
    123123    .pgm                    resb 21120
    124     .hm                     resb 5440
     124    .hm                     resb 5504
    125125    .trpm                   resb 5248
    126126    .selm                   resb 768
     
    138138    .cfgm                   resb 8
    139139
    140     .abAlignment2           resb 664 + 256 - RTR0PTR_CB * VMM_MAX_CPU_COUNT
     140    .abAlignment2           resb 664 - 64 + 256 - RTR0PTR_CB * VMM_MAX_CPU_COUNT
    141141
    142142    alignb RTR0PTR_CB * VMM_MAX_CPU_COUNT ; ASSUMES VMM_MAX_CPU_COUNT is a power of two.
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