VirtualBox

Ignore:
Timestamp:
Apr 2, 2013 8:17:11 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
84670
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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/SELMInternal.h

    r44528 r45276  
    2525#include <VBox/log.h>
    2626#include <iprt/x86.h>
     27#include <VBox/vmm/em.h>
    2728
    2829
     
    3334 * @{
    3435 */
     36
     37/**
     38 * Enable or disable tracking of Shadow GDT/LDT/TSS.
     39 * @{
     40 */
     41#define SELM_TRACK_SHADOW_GDT_CHANGES
     42#define SELM_TRACK_SHADOW_LDT_CHANGES
     43#define SELM_TRACK_SHADOW_TSS_CHANGES
     44/** @} */
     45
     46/**
     47 * Enable or disable tracking of Guest GDT/LDT/TSS.
     48 * @{
     49 */
     50#define SELM_TRACK_GUEST_GDT_CHANGES
     51#define SELM_TRACK_GUEST_LDT_CHANGES
     52#define SELM_TRACK_GUEST_TSS_CHANGES
     53/** @} */
     54
    3555
    3656/** The number of GDTS allocated for our GDT. (full size) */
     
    203223
    204224void           selmSetRing1Stack(PVM pVM, uint32_t ss, RTGCPTR32 esp);
     225#ifdef VBOX_WITH_RAW_RING1
     226void           selmSetRing2Stack(PVM pVM, uint32_t ss, RTGCPTR32 esp);
     227#endif
    205228
    206229RT_C_DECLS_END
     
    362385 * Converts a guest GDT or LDT entry to a shadow table entry.
    363386 *
     387 * @param   pVM                 The VM handle.
    364388 * @param   pDesc       Guest entry on input, shadow entry on return.
    365389 */
    366 DECL_FORCE_INLINE(void) selmGuestToShadowDesc(PX86DESC pDesc)
     390DECL_FORCE_INLINE(void) selmGuestToShadowDesc(PVM pVM, PX86DESC pDesc)
    367391{
    368392    /*
     
    391415            pDesc->Gen.u1Available = 1;
    392416        }
     417# ifdef VBOX_WITH_RAW_RING1
     418        else
     419        if (    pDesc->Gen.u2Dpl == 1
     420//            &&  EMIsRawRing1Enabled(pVM)
     421            &&      (pDesc->Gen.u4Type & (X86_SEL_TYPE_CODE | X86_SEL_TYPE_CONF))
     422                !=  (X86_SEL_TYPE_CODE | X86_SEL_TYPE_CONF) )
     423        {
     424            pDesc->Gen.u2Dpl       = 2;
     425            pDesc->Gen.u1Available = 1;
     426        }
     427# endif
    393428        else
    394429            pDesc->Gen.u1Available = 0;
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