VirtualBox

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


Ignore:
Timestamp:
Apr 2, 2013 8:17:11 AM (12 years ago)
Author:
vboxsync
Message:

Ring-1 compression patches, courtesy of trivirt AG:

  • main: diff to remove the hwvirt requirement for QNX
  • rem: diff for dealing with raw ring 0/1 selectors and general changes to allowed guest execution states
  • vmm: changes for using the guest's TSS selector index as our hypervisor TSS selector (makes str safe) (VBOX_WITH_SAFE_STR )
  • vmm: changes for dealing with guest ring 1 code (VBOX_WITH_RAW_RING1)
  • vmm: change to emulate smsw in RC/R0 (QNX uses this old style instruction a lot so going to qemu for emulation is very expensive)
  • vmm: change (hack) to kick out patm virtual handlers in case they conflict with guest GDT/TSS write monitors; we should allow multiple handlers per page, but that change would be rather invasive
Location:
trunk/include/VBox/vmm
Files:
5 edited

Legend:

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

    r44793 r45276  
    485485DECLASM(void)           CPUMGCCallV86Code(PCPUMCTXCORE pRegFrame);
    486486
     487
     488/**
     489 * Get the current privilege level of the guest.
     490 *
     491 * @returns CPL
     492 * @param   pVCpu       The current virtual CPU.
     493 * @param   pRegFrame   Pointer to the register frame.
     494 */
     495VMMDECL(uint32_t)       CPUMRCGetGuestCPL(PVMCPU pVCpu, PCPUMCTXCORE pRegFrame);
     496
     497#ifdef VBOX_WITH_RAW_RING1
     498/**
     499 * Transforms the guest CPU state to raw-ring mode.
     500 *
     501 * This function will change the any of the cs and ss register with DPL=0 to DPL=1.
     502 *
     503 * @returns VBox status. (recompiler failure)
     504 * @param   pVCpu       Pointer to the VMCPU.
     505 * @param   pCtxCore    The context core (for trap usage).
     506 * @see     @ref pg_raw
     507 */
     508VMMDECL(void)         CPUMRCRecheckRawState(PVMCPU pVCpu, PCPUMCTXCORE pCtxCore);
     509#endif
     510
    487511/** @} */
    488512#endif /* IN_RC */
  • trunk/include/VBox/vmm/em.h

    r44528 r45276  
    133133#define EMIsRawRing0Enabled(pVM) (!(pVM)->fRecompileSupervisor)
    134134
     135#ifdef VBOX_WITH_RAW_RING1
     136/**
     137 * Checks if raw ring-1 execute mode is enabled.
     138 *
     139 * @returns true if enabled.
     140 * @returns false if disabled.
     141 * @param   pVM         The VM to operate on.
     142 */
     143#define EMIsRawRing1Enabled(pVM) ((pVM)->fRawRing1Enabled)
     144#else
     145#define EMIsRawRing1Enabled(pVM) false
     146#endif
     147
    135148/**
    136149 * Checks if execution with hardware assisted virtualization is enabled.
  • trunk/include/VBox/vmm/selm.h

    r42427 r45276  
    107107VMMR3DECL(bool)         SELMR3CheckTSS(PVM pVM);
    108108VMMR3DECL(int)          SELMR3DebugCheck(PVM pVM);
     109#ifdef VBOX_WITH_SAFE_STR
     110VMMR3DECL(bool)         SELMR3CheckShadowTR(PVM pVM);
     111#endif
     112
    109113/** @def SELMR3_DEBUG_CHECK
    110114 * Invokes SELMR3DebugCheck in stricts builds. */
  • trunk/include/VBox/vmm/vm.h

    r45152 r45276  
    843843    /** Whether to recompile supervisor mode code or run it raw/hm. */
    844844    bool                        fRecompileSupervisor;
     845    /** Whether raw mode supports ring-1 code or not. */
     846    bool                        fRawRing1Enabled;
    845847    /** PATM enabled flag.
    846848     * This is placed here for performance reasons. */
     
    862864
    863865    /** Alignment padding.. */
    864     uint32_t                    uPadding1;
     866    uint8_t                     uPadding1[3];
    865867
    866868    /** @name Debugging
  • trunk/include/VBox/vmm/vm.mac

    r45152 r45276  
    5959    .fRecompileUser         resb 1
    6060    .fRecompileSupervisor   resb 1
     61    .fRawRing1Enabled       resb 1
    6162    .fPATMEnabled           resb 1
    6263    .fCSAMEnabled           resb 1
     
    6667    .fUseLargePages         resb 1
    6768
    68     .uPadding1              resd 1
     69    .uPadding1              resb 3
    6970
    7071    .hTraceBufRC            RTRCPTR_RES 1
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