VirtualBox

Changeset 45701 in vbox for trunk/include


Ignore:
Timestamp:
Apr 24, 2013 2:21:09 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85247
Message:

VMM: SELM and VMM early HM init changes.

Location:
trunk/include
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/apic.mac

    r33935 r45701  
    22%define ___VBox_apic_h
    33%define APIC_REG_VERSION                        0x0030
    4 %define   APIC_REG_VERSION_GET_VER(u32)         (u32 & 0xff)
    5 %define   APIC_REG_VERSION_GET_MAX_LVT(u32)     ((u32 & 0xff0000) >> 16)
     4%define APIC_REG_VERSION_GET_VER(u32)           (u32 & 0xff)
     5%define APIC_REG_VERSION_GET_MAX_LVT(u32)       ((u32 & 0xff0000) >> 16)
    66%define APIC_REG_LVT_LINT0                      0x0350
    77%define APIC_REG_LVT_LINT1                      0x0360
     
    99%define APIC_REG_LVT_PC                         0x0340
    1010%define APIC_REG_LVT_THMR                       0x0330
    11 %define   APIC_REG_LVT_MODE_MASK                (RT_BIT(8)|RT_BIT(9)|RT_BIT(10))
    12 %define   APIC_REG_LVT_MODE_FIXED               0
    13 %define   APIC_REG_LVT_MODE_NMI                 (RT_BIT(10))
    14 %define   APIC_REG_LVT_MODE_EXTINT              (RT_BIT(8)|RT_BIT(9)|RT_BIT(10))
    15 %define   APIC_REG_LVT_PIN_POLARIY              RT_BIT(13)
    16 %define   APIC_REG_LVT_REMOTE_IRR               RT_BIT(14)
    17 %define   APIC_REG_LVT_LEVEL_TRIGGER            RT_BIT(15)
    18 %define   APIC_REG_LVT_MASKED                   RT_BIT(16)
     11%define APIC_REG_LVT_MODE_MASK                  (RT_BIT(8) | RT_BIT(9) | RT_BIT(10))
     12%define APIC_REG_LVT_MODE_FIXED                 0
     13%define APIC_REG_LVT_MODE_NMI                   RT_BIT(10)
     14%define APIC_REG_LVT_MODE_EXTINT                (RT_BIT(8) | RT_BIT(9) | RT_BIT(10))
     15%define APIC_REG_LVT_PIN_POLARIY                RT_BIT(13)
     16%define APIC_REG_LVT_REMOTE_IRR                 RT_BIT(14)
     17%define APIC_REG_LVT_LEVEL_TRIGGER              RT_BIT(15)
     18%define APIC_REG_LVT_MASKED                     RT_BIT(16)
    1919%endif
  • trunk/include/VBox/err.h

    r45693 r45701  
    975975/** Internal processing error \#3 in TRPM. */
    976976#define VERR_TRPM_IPE_3                     (-2409)
     977/** Got into a part of TRPM that is not used when HM (VT-x/AMD-V) is enabled. */
     978#define VERR_TRPM_HM_IPE                    (-2410)
    977979/** @} */
    978980
     
    10061008 * selectors. */
    10071009#define VERR_SELM_GDT_TOO_FULL              (-2508)
     1010/** Got into a part of SELM that is not used when HM (VT-x/AMD-V) is enabled. */
     1011#define VERR_SELM_HM_IPE                    (-2509)
    10081012/** @} */
    10091013
     
    11261130/** Reason for leaving RZ: Unknown call to ring-3. */
    11271131#define VINF_VMM_UNKNOWN_RING3_CALL         (2714)
     1132/** Attempted to use stub switcher. */
     1133#define VERR_VMM_SWITCHER_STUB              (-2715)
    11281134/** @} */
    11291135
  • trunk/include/VBox/err.mac

    r45474 r45701  
    2020%define VERR_TOO_MANY_CPUS    (-1019)
    2121%define VERR_SERVICE_DISABLED    (-1020)
     22%define VERR_NOT_SUP_IN_RAW_MODE    (-1021)
    2223%define VINF_EM_FIRST    1100
    2324%define VINF_EM_TERMINATE    1100
     
    3738%define VERR_EM_NO_MEMORY    (-1114)
    3839%define VINF_EM_RESCHEDULE_REM    1115
    39 %define VINF_EM_RESCHEDULE_HWACC    1116
     40%define VINF_EM_RESCHEDULE_HM    1116
    4041%define VINF_EM_RESCHEDULE_RAW    1117
    4142%define VINF_EM_RESCHEDULE    1118
     
    6869%define VINF_EM_RAW_EMULATE_DBG_STEP    1151
    6970%define VINF_EM_HM_PATCH_TPR_INSTR    1152
    70 %define VERR_EM_INTERNAL_DISAS_ERROR    (-1153)
    7171%define VERR_EM_UNEXPECTED_MAPPING_CONFLICT    (-1154)
     72%define VINF_EM_TRIPLE_FAULT    1155
    7273%define VERR_DBGF_NOT_ATTACHED    (-1200)
    7374%define VERR_DBGF_ALREADY_ATTACHED    (-1201)
     
    119120%define VINF_PATM_SPINLOCK_FAILED    (1429)
    120121%define VINF_PATCH_CONTINUE    (1430)
     122%define VERR_PATM_HM_IPE    (-1431)
    121123%define VWRN_CSAM_TRAP_NOT_HANDLED    1500
    122124%define VWRN_CSAM_INSTRUCTION_PATCHED    1501
    123125%define VWRN_CSAM_PAGE_NOT_FOUND    1502
    124126%define VINF_CSAM_PENDING_ACTION    1503
     127%define VERR_CSAM_HM_IPE    (-1504)
    125128%define VERR_PGM_MAPPING_CONFLICT    (-1600)
    126129%define VERR_PGM_HANDLER_PHYSICAL_NO_RAM_RANGE    (-1601)
     
    356359%define VERR_TRPM_IPE_2    (-2408)
    357360%define VERR_TRPM_IPE_3    (-2409)
     361%define VERR_TRPM_HM_IPE    (-2410)
    358362%define VERR_SELM_SHADOW_GDT_WRITE    (-2500)
    359363%define VERR_SELM_SHADOW_LDT_WRITE    (-2501)
     
    365369%define VERR_SELM_GDT_READ_ERROR    (-2507)
    366370%define VERR_SELM_GDT_TOO_FULL    (-2508)
     371%define VERR_SELM_HM_IPE    (-2509)
    367372%define VERR_IOM_INVALID_IOPORT_RANGE    (-2600)
    368373%define VERR_IOM_NO_R3_IOPORT_RANGE    (-2601)
     
    408413%define VINF_VMM_CALL_TRACER    (2712)
    409414%define VERR_VMM_SWITCHER_IPE_1    (-2713)
     415%define VINF_VMM_UNKNOWN_RING3_CALL    (2714)
     416%define VERR_VMM_SWITCHER_STUB    (-2715)
    410417%define VERR_PDM_NO_SUCH_LUN    (-2800)
    411418%define VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES    (-2801)
     
    442449%define VERR_PDM_DRIVER_DETACH_NOT_POSSIBLE    (-2832)
    443450%define VERR_PDM_NO_PCI_BUS    (-2833)
    444 %define VINF_PDM_PCI_PHYS_READ_BM_DISABLED    (2833)
    445451%define VERR_PDM_NOT_PCI_DEVICE    (-2834)
    446 %define VINF_PDM_PCI_PHYS_WRITE_BM_DISABLED    (2834)
    447452%define VERR_PDM_UNKNOWN_DEVREG_VERSION    (-2835)
    448453%define VERR_PDM_INVALID_DEVICE_REGISTRATION    (-2836)
     
    502507%define VERR_PDM_MISCONFIGURED_DRV_TRANSFORMATION    (-2889)
    503508%define VERR_PDM_CANNOT_TRANSFORM_REMOVED_DRIVER    (-2890)
     509%define VERR_PDM_NOT_PCI_BUS_MASTER    (-2891)
    504510%define VERR_HGCM_SERVICE_NOT_FOUND    (-2900)
    505511%define VINF_HGCM_CLIENT_REJECTED    2901
     
    684690%define VERR_VMX_UNSUPPORTED_MODE    (-4004)
    685691%define VERR_VMX_UNABLE_TO_START_VM    (-4005)
    686 %define VERR_VMX_UNABLE_TO_RESUME_VM    (-4006)
    687692%define VERR_VMX_INVALID_HOST_STATE    (-4007)
    688693%define VERR_VMX_ILLEGAL_FEATURE_CONTROL_MSR    (-4008)
     
    697702%define VERR_VMX_UNEXPECTED_INTERRUPTION_EXIT_CODE    (-4017)
    698703%define VERR_VMX_NOT_IN_VMX_ROOT_MODE    (-4018)
    699 %define VERR_VMX_UNDEFINED_EXIT_CODE     (-4019)
    700 %define VINF_VMX_DOUBLE_FAULT              4020
    701 %define VERR_VMX_VMPTRLD_FAILED          (-4021)
     704%define VERR_VMX_UNDEFINED_EXIT_CODE    (-4019)
     705%define VINF_VMX_DOUBLE_FAULT    4020
     706%define VERR_VMX_VMPTRLD_FAILED    (-4021)
    702707%define VERR_SVM_UNABLE_TO_START_VM    (-4050)
    703708%define VERR_SVM_ILLEGAL_EFER_MSR    (-4051)
     
    705710%define VERR_SVM_DISABLED    (-4053)
    706711%define VERR_SVM_IN_USE    (-4054)
     712%define VERR_SVM_INVALID_PVMCB    (-4055)
     713%define VERR_SVM_UNEXPECTED_EXIT    (-4056)
     714%define VERR_SVM_UNEXPECTED_XCPT_EXIT    (-4057)
     715%define VERR_SVM_UNEXPECTED_PATCH_TYPE    (-4058)
    707716%define VERR_HM_UNKNOWN_CPU    (-4100)
    708717%define VERR_HM_NO_CPUID    (-4101)
     
    712721%define VERR_HM_UNEXPECTED_LD_ST_MSR    (-4105)
    713722%define VERR_HM_NO_32_TO_64_SWITCHER    (-4106)
    714 %define VERR_HMSVM_INVALID_PVMCB    (-4107)
    715 %define VERR_HMSVM_UNEXPECTED_EXIT    (-4108)
    716 %define VERR_HMSVM_UNEXPECTED_XCPT_EXIT    (-4109)
    717 %define VERR_HMSVM_UNEXPECTED_PATCH_TYPE    (-4110)
    718 %define VERR_HM_WRONG_CPU_1    (-4111)
    719 %define VERR_HM_IPE_1    (-4112)
    720 %define VERR_HM_IPE_2    (-4113)
    721 %define VERR_HM_WRONG_SWITCHER    (-4114)
    722 %define VERR_HM_UNKNOWN_IO_INSTRUCTION    (-4115)
     723%define VERR_HM_WRONG_CPU_1    (-4107)
     724%define VERR_HM_IPE_1    (-4108)
     725%define VERR_HM_IPE_2    (-4109)
     726%define VERR_HM_WRONG_SWITCHER    (-4110)
     727%define VERR_HM_UNKNOWN_IO_INSTRUCTION    (-4111)
     728%define VERR_HM_UNSUPPORTED_CPU_FEATURE_COMBO    (-4112)
     729%define VERR_HM_IPE_3    (-4113)
     730%define VERR_HM_IPE_4    (-4114)
     731%define VERR_HM_IPE_5    (-4115)
    723732%define VERR_DIS_INVALID_OPCODE    (-4200)
    724733%define VERR_DIS_GEN_FAILURE    (-4201)
     
    726735%define VERR_DIS_INVALID_MODRM    (-4203)
    727736%define VERR_DIS_INVALID_PARAMETER    (-4204)
    728 %define VERR_DIS_MEM_READ    (-4205)
    729737%define VERR_DIS_TOO_LONG_INSTR    (-4206)
    730738%define VERR_WEB_NOT_AUTHENTICATED    (-4300)
     
    812820%define VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL    (-6000)
    813821%define VERR_EXTPACK_VBOX_VERSION_MISMATCH    (-6001)
     822%define VERR_GSTCTL_GUEST_ERROR    (-6200)
     823%define VWRN_GSTCTL_OBJECTSTATE_CHANGED    6220
    814824%include "iprt/err.mac"
  • trunk/include/VBox/vmm/hm.h

    r45618 r45701  
    4040
    4141/**
    42  * Query HM state (enabled/disabled)
     42 * Checks whether HM (VT-x/AMD-V) is being used by this VM.
    4343 *
    44  * @returns 0 - disabled, 1 - enabled
    45  * @param   a_pVM       Pointer to the shared VM structure.
     44 * @retval  @c true if used.
     45 * @retval  @c false if software virtualization (raw-mode) is used.
     46 *
     47 * @param   a_pVM       The cross context VM structure.
    4648 * @sa      HMIsEnabledNotMacro, HMR3IsEnabled
    4749 * @internal
     
    5153#else
    5254# define HMIsEnabled(a_pVM)   ((a_pVM)->fHMEnabled)
     55#endif
     56
     57/**
     58 * Checks whether raw-mode context is required for any purpose.
     59 *
     60 * @retval  @c true if required either by raw-mode itself or by HM for doing
     61 *          switching the cpu to 64-bit mode.
     62 * @retval  @c false if not required.
     63 *
     64 * @param   a_pVM       The cross context VM structure.
     65 * @internal
     66 */
     67#if HC_ARCH_BITS == 64
     68# define HMIsRawModeCtxNeeded(a_pVM)   (!HMIsEnabled(a_pVM))
     69#else
     70# define HMIsRawModeCtxNeeded(a_pVM)   (!HMIsEnabled(a_pVM) || (a_pVM)->fHMNeedRawModeCtx)
    5371#endif
    5472
  • trunk/include/VBox/vmm/selm.h

    r45533 r45701  
    4242VMMDECL(void)           SELMSetTrap8EIP(PVM pVM, uint32_t u32EIP);
    4343VMMDECL(int)            SELMGetRing1Stack(PVM pVM, uint32_t *pSS, PRTGCPTR32 pEsp);
    44 VMMDECL(RTGCPTR)        SELMGetGuestTSS(PVM pVM);
    4544VMMDECL(RTSEL)          SELMGetHyperCS(PVM pVM);
    4645VMMDECL(RTSEL)          SELMGetHyperCS64(PVM pVM);
  • trunk/include/VBox/vmm/vm.h

    r45618 r45701  
    882882    /** For asserting on fHMEnable usage. */
    883883    bool                        fHMEnabledFixed;
     884    /** Hardware VM support requires a minimal raw-mode context.
     885     * This is never set on 64-bit hosts, only 32-bit hosts requires it. */
     886    bool                        fHMNeedRawModeCtx;
    884887    /** Set when this VM is the master FT node.
    885888     * @todo This doesn't need to be here, FTM should store it in it's own
     
    893896
    894897    /** Alignment padding.. */
    895     uint8_t                     uPadding1[3];
     898    uint8_t                     uPadding1[2];
    896899
    897900    /** @name Debugging
  • trunk/include/VBox/vmm/vm.mac

    r45618 r45701  
    6464    .fHMEnabled             resb 1
    6565    .fHMEnabledFixed        resb 1
     66    .fHMNeedRawModeCtx      resb 1
    6667    .fFaultTolerantMaster   resb 1
    6768    .fUseLargePages         resb 1
    6869
    69     .uPadding1              resb 3
     70    .uPadding1              resb 2
    7071
    7172    .hTraceBufRC            RTRCPTR_RES 1
  • trunk/include/VBox/vmm/vmm.h

    r45618 r45701  
    6464    /** Switcher for AMD64 host paging to AMD64 shadow paging. */
    6565    VMMSWITCHER_AMD64_TO_AMD64,
     66    /** Stub switcher for 32-bit and PAE. */
     67    VMMSWITCHER_X86_STUB,
     68    /** Stub switcher for AMD64. */
     69    VMMSWITCHER_AMD64_STUB,
    6670    /** Used to make a count for array declarations and suchlike. */
    6771    VMMSWITCHER_MAX,
     
    254258VMMR3DECL(const char *) VMMR3GetRZAssertMsg2(PVM pVM);
    255259VMMR3_INT_DECL(int)     VMMR3SelectSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
    256 VMMR3_INT_DECL(int)     VMMR3DisableSwitcher(PVM pVM);
    257260VMMR3_INT_DECL(RTR0PTR) VMMR3GetHostToGuestSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
    258261VMMR3_INT_DECL(int)     VMMR3HmRunGC(PVM pVM, PVMCPU pVCpu);
  • trunk/include/iprt/err.mac

    r41976 r45701  
    1616%define VERR_VERSION_MISMATCH    (-11)
    1717%define VERR_NOT_IMPLEMENTED    (-12)
     18%define VERR_INVALID_FLAGS    (-13)
    1819%define VERR_NOT_EQUAL    (-18)
    1920%define VERR_NOT_SYMLINK    (-19)
     
    122123%define VERR_UNEVEN_INPUT    (-22402)
    123124%define VERR_NOT_AVAILABLE    (-22403)
     125%define VERR_PROC_DETACH_NOT_SUPPORTED    (-22404)
    124126%define VERR_FILE_IO_ERROR    (-100)
    125127%define VERR_OPEN_FAILED    (-101)
     
    169171%define VERR_PATH_IS_RELATIVE    (-143)
    170172%define VERR_PATH_IS_NOT_RELATIVE    (-144)
     173%define VERR_PATH_ZERO_LENGTH    (-145)
    171174%define VERR_DISK_IO_ERROR    (-150)
    172175%define VERR_INVALID_DRIVE    (-151)
     
    275278%define VERR_NET_HOST_UNREACHABLE    (-465)
    276279%define VERR_NET_PROTOCOL_ERROR    (-466)
     280%define VERR_NET_INCOMPLETE_TX_PACKET    (-467)
    277281%define VERR_TCP_SERVER_STOP    (-500)
    278282%define VINF_TCP_SERVER_STOP    500
     
    395399%define VERR_S3_BUCKET_NOT_EMPTY    (-878)
    396400%define VERR_S3_CANCELED    (-879)
     401%define VERR_HTTP_INIT_FAILED    (-885)
     402%define VERR_HTTP_NOT_FOUND    (-886)
     403%define VERR_HTTP_ACCESS_DENIED    (-887)
     404%define VERR_HTTP_BAD_REQUEST    (-888)
     405%define VERR_HTTP_COULDNT_CONNECT    (-889)
     406%define VERR_HTTP_SSL_CONNECT_ERROR    (-890)
     407%define VERR_HTTP_CACERT_WRONG_FORMAT    (-891)
     408%define VERR_HTTP_CACERT_CANNOT_AUTHENTICATE    (-892)
     409%define VERR_HTTP_ABORTED    (-893)
    397410%define VERR_MANIFEST_UNSUPPORTED_DIGEST_TYPE    (-900)
    398411%define VERR_MANIFEST_WRONG_FILE_FORMAT    (-901)
  • trunk/include/iprt/x86.mac

    r43974 r45701  
    334334%define MSR_IA32_VMX_VMCS_ENUM              0x48A
    335335%define MSR_IA32_VMX_PROCBASED_CTLS2        0x48B
    336 %define MSR_IA32_VMX_EPT_CAPS               0x48C
     336%define MSR_IA32_VMX_EPT_VPID_CAP           0x48C
    337337%define MSR_IA32_DS_AREA                    0x600
    338338%define MSR_IA32_X2APIC_START               0x800
     
    647647%define X86_SEL_RPL             0x0003
    648648%define X86_SEL_RPL_LDT         0x0007
     649%define X86_XCPT_MAX                (X86_XCPT_XF)
    649650%define X86_TRAP_ERR_EXTERNAL       1
    650651%define X86_TRAP_ERR_IDT            2
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