VirtualBox

Changeset 92444 in vbox


Ignore:
Timestamp:
Nov 16, 2021 1:04:01 AM (3 years ago)
Author:
vboxsync
Message:

VMM/NEM-linux: Some very early bits. bugref:9044

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r92408 r92444  
    29982998/** NEM failed to query dirty page bitmap. */
    29992999#define VERR_NEM_QUERY_DIRTY_BITMAP_FAILED          (-6816)
     3000/** NEM is missing a require feature in the host API. */
     3001#define VERR_NEM_MISSING_FEATURE                    (-6817)
    30003002
    30013003/** NEM internal processing error \#0. */
  • trunk/src/VBox/VMM/Config.kmk

    r92221 r92444  
    6868endif
    6969ifdef VBOX_WITH_NATIVE_NEM
    70  if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), win.amd64 darwin.amd64)
     70 if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), linux.amd64)
     71  VMM_COMMON_DEFS += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0 VBOX_WITH_PGM_NEM_MODE
     72 else if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), win.amd64 darwin.amd64 linux.amd64)
    7173  VMM_COMMON_DEFS += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0
    7274  ifdef VBOX_WITH_PGM_NEM_MODE
  • trunk/src/VBox/VMM/Makefile.kmk

    r92408 r92444  
    226226
    227227ifdef VBOX_WITH_NATIVE_NEM
     228VBoxVMM_SOURCES.linux.amd64 += VMMR3/NEMR3Native-linux.cpp
     229
    228230VBoxVMM_SOURCES.win.amd64 += VMMR3/NEMR3Native-win.cpp
    229231VBoxVMM_DEFS.win.amd64    += VBOX_WITH_NATIVE_NEM
     
    571573        $(VBOX_LIB_SUPR0)
    572574 ifdef VBOX_WITH_NATIVE_NEM
     575VMMR0_SOURCES.linux.amd64 += VMMR0/NEMR0Native-stubs.cpp
     576
    573577VMMR0_SOURCES.win.amd64 += \
    574578        VMMR0/NEMR0Native-win.cpp \
  • trunk/src/VBox/VMM/VMMR3/NEMR3.cpp

    r92317 r92444  
    374374{
    375375#ifdef VBOX_WITH_NATIVE_NEM
    376 # if defined(RT_OS_WINDOWS) || defined(RT_OS_DARWIN)
    377376    if (VM_IS_NEM_ENABLED(pVM))
    378377        return true;
    379 # endif
    380378#else
    381379    RT_NOREF(pVM);
  • trunk/src/VBox/VMM/include/NEMInternal.h

    r92376 r92444  
    182182    /** Set if long mode guests are allowed. */
    183183    bool                        fAllow64BitGuests;
    184 #ifdef RT_OS_WINDOWS
     184
     185#if defined(RT_OS_LINUX)
     186    /** The '/dev/kvm' file descriptor.   */
     187    int32_t                     fdKvm;
     188    /** The KVM_CREATE_VM file descriptor. */
     189    int32_t                     fdVm;
     190
     191    /** KVM_CAP_NR_MEMSLOTS. */
     192    uint32_t                    cMaxMemSlots;
     193    /** KVM_CAP_X86_ROBUST_SINGLESTEP. */
     194    bool                        fRobustSingleStep;
     195    /** KVM_GET_VCPU_MMAP_SIZE. */
     196    uint32_t                    cbVCpuMmap;
     197
     198#elif defined(RT_OS_WINDOWS)
    185199    /** Set if we've created the EMTs. */
    186200    bool                        fCreatedEmts : 1;
     
    273287        uint64_t                cPagesInUse;
    274288    } R0Stats;
     289
    275290#elif defined(RT_OS_DARWIN)
    276291    /** Set if we've created the EMTs. */
     
    308323    /** Whether \#GP needs to be intercept for mesa driver workaround. */
    309324    bool                        fTrapXcptGpForLovelyMesaDrv: 1;
    310 #ifdef RT_OS_WINDOWS
     325
     326#if defined(RT_OS_LINUX)
     327    uint8_t                     abPadding[3];
     328    /** The KVM VCpu file descriptor. */
     329    int32_t                     fdVCpu;
     330    /** Pointer to the KVM_RUN data exchange region. */
     331    R3PTRTYPE(struct kvm_run *) pRun;
     332
     333    /** @name Statistics
     334     * @{ */
     335# if 0
     336    STAMCOUNTER                 StatExitPortIo;
     337    STAMCOUNTER                 StatExitMemUnmapped;
     338    STAMCOUNTER                 StatExitMemIntercept;
     339    STAMCOUNTER                 StatExitHalt;
     340    STAMCOUNTER                 StatExitInterruptWindow;
     341    STAMCOUNTER                 StatExitCpuId;
     342    STAMCOUNTER                 StatExitMsr;
     343    STAMCOUNTER                 StatExitException;
     344    STAMCOUNTER                 StatExitExceptionBp;
     345    STAMCOUNTER                 StatExitExceptionDb;
     346    STAMCOUNTER                 StatExitExceptionGp;
     347    STAMCOUNTER                 StatExitExceptionGpMesa;
     348    STAMCOUNTER                 StatExitExceptionUd;
     349    STAMCOUNTER                 StatExitExceptionUdHandled;
     350    STAMCOUNTER                 StatExitUnrecoverable;
     351    STAMCOUNTER                 StatGetMsgTimeout;
     352    STAMCOUNTER                 StatStopCpuSuccess;
     353    STAMCOUNTER                 StatStopCpuPending;
     354    STAMCOUNTER                 StatStopCpuPendingAlerts;
     355    STAMCOUNTER                 StatStopCpuPendingOdd;
     356    STAMCOUNTER                 StatCancelChangedState;
     357    STAMCOUNTER                 StatCancelAlertedThread;
     358    STAMCOUNTER                 StatBreakOnCancel;
     359    STAMCOUNTER                 StatBreakOnFFPre;
     360    STAMCOUNTER                 StatBreakOnFFPost;
     361    STAMCOUNTER                 StatBreakOnStatus;
     362# endif
     363    STAMCOUNTER                 StatImportOnDemand;
     364    STAMCOUNTER                 StatImportOnReturn;
     365    STAMCOUNTER                 StatImportOnReturnSkipped;
     366    STAMCOUNTER                 StatQueryCpuTick;
     367    /** @} */
     368
     369
     370#elif defined(RT_OS_WINDOWS)
    311371    /** The current state of the interrupt windows (NEM_WIN_INTW_F_XXX). */
    312372    uint8_t                     fCurrentInterruptWindows;
     
    411471    STAMCOUNTER                 StatQueryCpuTick;
    412472    /** @} */
     473
    413474#elif defined(RT_OS_DARWIN)
    414475    /** The vCPU handle associated with the EMT executing this vCPU. */
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