VirtualBox

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


Ignore:
Timestamp:
Nov 7, 2018 10:28:57 AM (6 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:9180 VM-exit bits; APIC-access and APIC-write infrastructure. Handling of instruction/event boundary
pending APIC bits todo.

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

Legend:

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

    r75107 r75301  
    661661                /** 0x398 - Guest TSC timestamp of VM-entry (used for VMX-preemption timer). */
    662662                uint64_t                uVmentryTick;
    663                 /** 0x3a0 - Padding. */
    664                 uint8_t             abPadding[0x3f0 - 0x3a0];
     663                /** 0x3a0 - Virtual-APIC write offset (until trap-like VM-exit). */
     664                uint16_t                offVirtApicWrite;
     665                /** 0x3a2 - Padding. */
     666                uint8_t             abPadding[0x3f0 - 0x3a2];
    665667            } vmx;
    666668        } CPUM_UNION_NM(s);
     
    773775AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.uPrevPauseTick,         0x390);
    774776AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.uVmentryTick,           0x398);
     777AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.offVirtApicWrite,       0x3a0);
    775778AssertCompileMemberAlignment(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pVmcsR0,           8);
    776779AssertCompileMemberAlignment(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pShadowVmcsR0,     8);
  • trunk/include/VBox/vmm/hm_vmx.h

    r74736 r75301  
    20792079 * @{
    20802080 */
    2081 /** Virtualize APIC access. */
     2081/** Virtualize APIC accesses. */
    20822082#define VMX_PROC_CTLS2_VIRT_APIC_ACCESS                         RT_BIT(0)
    20832083/** EPT supported/enabled. */
     
    28522852#define VMX_EXIT_QUAL_APIC_ACCESS_TYPE(a)                       (((a) & 0xf000) >> 12)
    28532853/* Rest reserved. */
     2854
     2855/** Bit fields for Exit qualification for APIC-access VM-exits. */
     2856#define VMX_BF_EXIT_QUAL_APIC_ACCESS_OFFSET_SHIFT               0
     2857#define VMX_BF_EXIT_QUAL_APIC_ACCESS_OFFSET_MASK                UINT64_C(0x0000000000000fff)
     2858#define VMX_BF_EXIT_QUAL_APIC_ACCESS_TYPE_SHIFT                 12
     2859#define VMX_BF_EXIT_QUAL_APIC_ACCESS_TYPE_MASK                  UINT64_C(0x000000000000f000)
     2860#define VMX_BF_EXIT_QUAL_APIC_ACCESS_RSVD_16_63_SHIFT           16
     2861#define VMX_BF_EXIT_QUAL_APIC_ACCESS_RSVD_16_63_MASK            UINT64_C(0xffffffffffff0000)
     2862RT_BF_ASSERT_COMPILE_CHECKS(VMX_BF_EXIT_QUAL_APIC_ACCESS_, UINT64_C(0), UINT64_MAX,
     2863                            (OFFSET, TYPE, RSVD_16_63));
    28542864/** @} */
    28552865
     
    28582868 * @{
    28592869 */
    2860 /** Linear read access. */
     2870/** Linear access for a data read during instruction execution. */
    28612871#define VMX_APIC_ACCESS_TYPE_LINEAR_READ                        0
    2862 /** Linear write access. */
     2872/** Linear access for a data write during instruction execution. */
    28632873#define VMX_APIC_ACCESS_TYPE_LINEAR_WRITE                       1
    2864 /** Linear instruction fetch access. */
     2874/** Linear access for an instruction fetch. */
    28652875#define VMX_APIC_ACCESS_TYPE_LINEAR_INSTR_FETCH                 2
    28662876/** Linear read/write access during event delivery. */
     
    28702880/** Physical access for an instruction fetch or during instruction execution. */
    28712881#define VMX_APIC_ACCESS_TYPE_PHYSICAL_INSTR                     15
     2882
     2883/**
     2884 * APIC-access type.
     2885 */
     2886typedef enum
     2887{
     2888    VMXAPICACCESS_LINEAR_READ             = VMX_APIC_ACCESS_TYPE_LINEAR_READ,
     2889    VMXAPICACCESS_LINEAR_WRITE            = VMX_APIC_ACCESS_TYPE_LINEAR_WRITE,
     2890    VMXAPICACCESS_LINEAR_INSTR_FETCH      = VMX_APIC_ACCESS_TYPE_LINEAR_INSTR_FETCH,
     2891    VMXAPICACCESS_LINEAR_EVENT_DELIVERY   = VMX_APIC_ACCESS_TYPE_LINEAR_EVENT_DELIVERY,
     2892    VMXAPICACCESS_PHYSICAL_EVENT_DELIVERY = VMX_APIC_ACCESS_TYPE_PHYSICAL_EVENT_DELIVERY,
     2893    VMXAPICACCESS_PHYSICAL_INSTR          = VMX_APIC_ACCESS_TYPE_PHYSICAL_INSTR
     2894} VMXAPICACCESS;
     2895AssertCompileSize(VMXAPICACCESS, 4);
    28722896/** @} */
    28732897
     
    38033827    /* VMLAUNCH/VMRESUME. */
    38043828    kVmxVDiag_Vmentry_AddrApicAccess,
     3829    kVmxVDiag_Vmentry_AddrApicAccessEqVirtApic,
    38053830    kVmxVDiag_Vmentry_AddrEntryMsrLoad,
    38063831    kVmxVDiag_Vmentry_AddrExitMsrLoad,
  • trunk/include/VBox/vmm/vm.h

    r75200 r75301  
    366366 *
    367367 * Available VMCPU bits:
    368  *      14, 15, 33 to 63
     368 *      11, 14, 15, 35 to 63
    369369 *
    370370 * @todo If we run low on VMCPU, we may consider merging the SELM bits
     
    471471/** The bit number for VMCPU_FF_DBGF. */
    472472#define VMCPU_FF_DBGF_BIT                   10
    473 /** Pending MTF (Monitor Trap Flag) event - Intel only.  */
    474 #define VMCPU_FF_MTF                        RT_BIT_64(VMCPU_FF_MTF_BIT)
    475 /** The bit number for VMCPU_FF_MTF. */
    476 #define VMCPU_FF_MTF_BIT                    11
    477473/** This action forces the VM to service any pending updates to CR3 (used only
    478474 *  by HM). */
     
    550546/** VMX-preemption timer in effect. */
    551547#define VMCPU_FF_VMX_PREEMPT_TIMER          RT_BIT_64(VMCPU_FF_VMX_PREEMPT_TIMER_BIT)
     548/** Bit number for VMCPU_FF_VMX_PREEMPT_TIMER. */
    552549#define VMCPU_FF_VMX_PREEMPT_TIMER_BIT      32
     550/** Pending MTF (Monitor Trap Flag) event.  */
     551#define VMCPU_FF_VMX_MTF                    RT_BIT_64(VMCPU_FF_VMX_MTF_BIT)
     552/** The bit number for VMCPU_FF_VMX_MTF. */
     553#define VMCPU_FF_VMX_MTF_BIT                33
     554/** Virtual-APIC operation pending (VTPR, VEOI or APIC-write).  */
     555#define VMCPU_FF_VMX_UPDATE_VAPIC           RT_BIT_64(VMCPU_FF_VMX_UPDATE_VAPIC_BIT)
     556/** The bit number for VMCPU_FF_VMX_UPDATE_VTPR. */
     557#define VMCPU_FF_VMX_UPDATE_VAPIC_BIT       34
    553558
    554559
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