VirtualBox

Changeset 105352 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Jul 16, 2024 11:21:19 AM (8 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164005
Message:

VMM/VMR3Req,iprt/cdefs.h: Adjustments of VMR3ReqCallUV family to fit darwin/arm64 restrictions. bugref:10725

Location:
trunk/src/VBox/Main/src-client
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r105301 r105352  
    25312531         */
    25322532        PVMREQ pReq;
    2533         vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS,
    2534                                     (PFNRT)i_unplugCpu, 4,
     2533        vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, (PFNRT)i_unplugCpu, 4,
    25352534                                    this, pUVM, pVMM, (VMCPUID)aCpu);
    25362535
     
    26362635     */
    26372636    PVMREQ pReq;
    2638     int vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS,
    2639                                     (PFNRT)i_plugCpu, 4,
     2637    int vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, (PFNRT)i_plugCpu, 4,
    26402638                                    this, pUVM, pVMM, aCpu);
    26412639
     
    38053803     */
    38063804    PVMREQ pReq;
    3807     int vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS,
    3808                                     (PFNRT)i_changeRemovableMedium, 9,
     3805    int vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, (PFNRT)i_changeRemovableMedium, 9,
    38093806                                    this, pUVM, pVMM, pszDevice, uInstance, enmBus, fUseHostIOCache, aMediumAttachment, fForce);
    38103807
     
    39843981     */
    39853982    PVMREQ pReq;
    3986     int vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS,
    3987                                     (PFNRT)i_attachStorageDevice, 9,
     3983    int vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, (PFNRT)i_attachStorageDevice, 9,
    39883984                                    this, pUVM, pVMM, pszDevice, uInstance, enmBus, fUseHostIOCache, aMediumAttachment, fSilent);
    39893985
     
    41594155     */
    41604156    PVMREQ pReq;
    4161     int vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS,
    4162                                     (PFNRT)i_detachStorageDevice, 8,
     4157    int vrc = pVMM->pfnVMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, (PFNRT)i_detachStorageDevice, 8,
    41634158                                    this, pUVM, pVMM, pszDevice, uInstance, enmBus, aMediumAttachment, fSilent);
    41644159
     
    52125207     * here to make requests from under the lock in order to serialize them.
    52135208     */
    5214     int vrc = pVMM->pfnVMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/,
    5215                                         (PFNRT)i_changeNetworkAttachment, 7,
     5209    int vrc = pVMM->pfnVMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)i_changeNetworkAttachment, 7,
    52165210                                        this, pUVM, pVMM, pszDevice, uInstance, uLun, aNetworkAdapter);
    52175211
     
    69226916
    69236917    alock.release();
    6924     vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY,
    6925                                               (PFNRT)i_reconfigureMediumAttachment, 15,
    6926                                               this, ptrVM.rawUVM(), ptrVM.vtable(), pcszDevice, uInstance, enmBus,
    6927                                               fUseHostIOCache, fBuiltinIOCache, fInsertDiskIntegrityDrv, true /* fSetupMerge */,
    6928                                               aSourceIdx, aTargetIdx, aMediumAttachment, mMachineState, &hrc);
     6918
     6919    Console::ReconfigureMediumAttachmentArgs Args1;
     6920    Args1.pcszDevice                = pcszDevice;
     6921    Args1.uInstance                 = uInstance;
     6922    Args1.enmBus                    = enmBus;
     6923    Args1.fUseHostIOCache           = fUseHostIOCache;
     6924    Args1.fBuiltinIOCache           = fBuiltinIOCache;
     6925    Args1.fInsertDiskIntegrityDrv   = fInsertDiskIntegrityDrv;
     6926    Args1.fSetupMerge               = true;
     6927    Args1.uMergeSource              = aSourceIdx;
     6928    Args1.uMergeTarget              = aTargetIdx;
     6929    Args1.aMediumAtt                = aMediumAttachment;
     6930    Args1.aMachineState             = mMachineState;
     6931    vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)i_reconfigureMediumAttachment, 5,
     6932                                              this, ptrVM.rawUVM(), ptrVM.vtable(), &Args1, &hrc);
    69296933    /* error handling is after resuming the VM */
    69306934
     
    69676971    hrc = mControl->FinishOnlineMergeMedium();
    69686972
    6969     vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY,
    6970                                               (PFNRT)i_reconfigureMediumAttachment, 15,
    6971                                               this, ptrVM.rawUVM(), ptrVM.vtable(), pcszDevice, uInstance, enmBus,
    6972                                               fUseHostIOCache, fBuiltinIOCache, fInsertDiskIntegrityDrv, false /* fSetupMerge */,
    6973                                               0 /* uMergeSource */, 0 /* uMergeTarget */, aMediumAttachment, mMachineState, &hrc);
     6973    Console::ReconfigureMediumAttachmentArgs Args2;
     6974    Args2.pcszDevice                = pcszDevice;
     6975    Args2.uInstance                 = uInstance;
     6976    Args2.enmBus                    = enmBus;
     6977    Args2.fUseHostIOCache           = fUseHostIOCache;
     6978    Args2.fBuiltinIOCache           = fBuiltinIOCache;
     6979    Args2.fInsertDiskIntegrityDrv   = fInsertDiskIntegrityDrv;
     6980    Args2.fSetupMerge               = false;
     6981    Args2.uMergeSource              = 0;
     6982    Args2.uMergeTarget              = 0;
     6983    Args2.aMediumAtt                = aMediumAttachment;
     6984    Args2.aMachineState             = mMachineState;
     6985    vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)i_reconfigureMediumAttachment, 5,
     6986                                              this, ptrVM.rawUVM(), ptrVM.vtable(), &Args2, &hrc);
    69746987    /* error handling is after resuming the VM */
    69756988
     
    70537066
    70547067        hrc = S_OK;
    7055         IMediumAttachment *pAttachment = aAttachments[i];
    7056         int vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY,
    7057                                                       (PFNRT)i_reconfigureMediumAttachment, 15,
    7058                                                       this, ptrVM.rawUVM(), ptrVM.vtable(), pcszDevice, lInstance, enmBus,
    7059                                                       fUseHostIOCache, fBuiltinIOCache, fInsertDiskIntegrityDrv,
    7060                                                       false /* fSetupMerge */, 0 /* uMergeSource */, 0 /* uMergeTarget */,
    7061                                                       pAttachment, mMachineState, &hrc);
     7068        Console::ReconfigureMediumAttachmentArgs Args;
     7069        Args.pcszDevice                 = pcszDevice;
     7070        Args.uInstance                  = lInstance;
     7071        Args.enmBus                     = enmBus;
     7072        Args.fUseHostIOCache            = fUseHostIOCache;
     7073        Args.fBuiltinIOCache            = fBuiltinIOCache;
     7074        Args.fInsertDiskIntegrityDrv    = fInsertDiskIntegrityDrv;
     7075        Args.fSetupMerge                = false;
     7076        Args.uMergeSource               = 0;
     7077        Args.uMergeTarget               = 0;
     7078        Args.aMediumAtt                 = aAttachments[i];
     7079        Args.aMachineState              = mMachineState;
     7080        int vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)i_reconfigureMediumAttachment, 5,
     7081                                                      this, ptrVM.rawUVM(), ptrVM.vtable(), &Args, &hrc);
    70627082        if (RT_FAILURE(vrc))
    70637083            throw setErrorBoth(E_FAIL, vrc, "%Rrc", vrc);
     
    1034610366
    1034710367    int vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), 0 /* idDstCpu (saved state, see #6232) */,
    10348                                                   (PFNRT)i_usbAttachCallback, 11,
     10368                                                  (PFNRT)i_usbAttachCallback, 11 | VMREQ_F_EXTRA_ARGS_ALL_PTRS,
    1034910369                                                  this, ptrVM.rawUVM(), ptrVM.vtable(), aHostDevice, uuid.raw(),
    10350                                                   strBackend.c_str(), Address.c_str(), pRemoteCfg, enmSpeed, aMaskedIfs,
    10351                                                   aCaptureFilename.isEmpty() ? NULL : aCaptureFilename.c_str());
     10370                                                  strBackend.c_str(), Address.c_str(), pRemoteCfg, /* extra arg (ptrs only): */
     10371                                                  &enmSpeed, &aMaskedIfs, aCaptureFilename.isEmpty()
     10372                                                                        ? (const char *)NULL : aCaptureFilename.c_str());
    1035210373    if (RT_SUCCESS(vrc))
    1035310374    {
     
    1039810419DECLCALLBACK(int)
    1039910420Console::i_usbAttachCallback(Console *that, PUVM pUVM, PCVMMR3VTABLE pVMM, IUSBDevice *aHostDevice, PCRTUUID aUuid,
    10400                              const char *pszBackend, const char *aAddress, PCFGMNODE pRemoteCfg, USBConnectionSpeed_T aEnmSpeed,
    10401                              ULONG aMaskedIfs, const char *pszCaptureFilename)
     10421                             const char *pszBackend, const char *aAddress, PCFGMNODE pRemoteCfg,
     10422                             USBConnectionSpeed_T *penmSpeed, ULONG *pfMaskedIfs, const char *pszCaptureFilename)
    1040210423{
    1040310424    RT_NOREF(aHostDevice);
     
    1040910430
    1041010431    VUSBSPEED enmSpeed = VUSB_SPEED_UNKNOWN;
    10411     switch (aEnmSpeed)
     10432    switch (*penmSpeed)
    1041210433    {
    1041310434        case USBConnectionSpeed_Low:        enmSpeed = VUSB_SPEED_LOW;          break;
     
    1042010441
    1042110442    int vrc = pVMM->pfnPDMR3UsbCreateProxyDevice(pUVM, aUuid, pszBackend, aAddress, pRemoteCfg,
    10422                                                  enmSpeed, aMaskedIfs, pszCaptureFilename);
     10443                                                 enmSpeed, *pfMaskedIfs, pszCaptureFilename);
    1042310444    LogFlowFunc(("vrc=%Rrc\n", vrc));
    1042410445    LogFlowFuncLeave();
     
    1046910490    alock.release();
    1047010491    int vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), 0 /* idDstCpu (saved state, see #6232) */,
    10471                                                   (PFNRT)i_usbDetachCallback, 4,
    10472                                                   this, ptrVM.rawUVM(), ptrVM.vtable(), pUuid);
     10492                                                  (PFNRT)i_usbDetachCallback, 4, this, ptrVM.rawUVM(), ptrVM.vtable(), pUuid);
    1047310493    if (RT_SUCCESS(vrc))
    1047410494    {
     
    1164211662 * @param   pUVM                    The VM handle.
    1164311663 * @param   pVMM                    The VMM vtable.
    11644  * @param   pcszDevice              The name of the controller type.
    11645  * @param   uInstance               The instance of the controller.
    11646  * @param   enmBus                  The storage bus type of the controller.
    11647  * @param   fUseHostIOCache         Use the host I/O cache (disable async I/O).
    11648  * @param   fBuiltinIOCache         Use the builtin I/O cache.
    11649  * @param   fInsertDiskIntegrityDrv Flag whether to insert the disk integrity driver into the chain
    11650  *                                  for additionalk debugging aids.
    11651  * @param   fSetupMerge             Whether to set up a medium merge
    11652  * @param   uMergeSource            Merge source image index
    11653  * @param   uMergeTarget            Merge target image index
    11654  * @param   aMediumAtt              The medium attachment.
    11655  * @param   aMachineState           The current machine state.
     11664 * @param   pArgs                   Argument package.
    1165611665 * @param   phrc                    Where to store com error - only valid if we return VERR_GENERAL_FAILURE.
    1165711666 * @return  VBox status code.
     
    1166111670                                                         PUVM pUVM,
    1166211671                                                         PCVMMR3VTABLE pVMM,
    11663                                                          const char *pcszDevice,
    11664                                                          unsigned uInstance,
    11665                                                          StorageBus_T enmBus,
    11666                                                          bool fUseHostIOCache,
    11667                                                          bool fBuiltinIOCache,
    11668                                                          bool fInsertDiskIntegrityDrv,
    11669                                                          bool fSetupMerge,
    11670                                                          unsigned uMergeSource,
    11671                                                          unsigned uMergeTarget,
    11672                                                          IMediumAttachment *aMediumAtt,
    11673                                                          MachineState_T aMachineState,
     11672                                                         Console::ReconfigureMediumAttachmentArgs const *pArgs,
    1167411673                                                         HRESULT *phrc)
    1167511674{
    11676     LogFlowFunc(("pUVM=%p aMediumAtt=%p phrc=%p\n", pUVM, aMediumAtt, phrc));
     11675    LogFlowFunc(("pUVM=%p aMediumAtt=%p phrc=%p\n", pUVM, pArgs->aMediumAtt, phrc));
    1167711676
    1167811677    HRESULT         hrc;
     
    1168411683     * not subject to snapshotting in general. */
    1168511684    DeviceType_T lType;
    11686     hrc = aMediumAtt->COMGETTER(Type)(&lType);                                  H();
     11685    hrc = pArgs->aMediumAtt->COMGETTER(Type)(&lType); H();
    1168711686    if (lType != DeviceType_HardDisk)
    1168811687        return VINF_SUCCESS;
    1168911688
    1169011689    /* Update the device instance configuration. */
    11691     int vrc = pThis->i_configMediumAttachment(pcszDevice,
    11692                                               uInstance,
    11693                                               enmBus,
    11694                                               fUseHostIOCache,
    11695                                               fBuiltinIOCache,
    11696                                               fInsertDiskIntegrityDrv,
    11697                                               fSetupMerge,
    11698                                               uMergeSource,
    11699                                               uMergeTarget,
    11700                                               aMediumAtt,
    11701                                               aMachineState,
     11690    int vrc = pThis->i_configMediumAttachment(pArgs->pcszDevice,
     11691                                              pArgs->uInstance,
     11692                                              pArgs->enmBus,
     11693                                              pArgs->fUseHostIOCache,
     11694                                              pArgs->fBuiltinIOCache,
     11695                                              pArgs->fInsertDiskIntegrityDrv,
     11696                                              pArgs->fSetupMerge,
     11697                                              pArgs->uMergeSource,
     11698                                              pArgs->uMergeTarget,
     11699                                              pArgs->aMediumAtt,
     11700                                              pArgs->aMachineState,
    1170211701                                              phrc,
    1170311702                                              true /* fAttachDetach */,
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r105135 r105352  
    15951595    Console::SafeVMPtrQuiet ptrVM(mParent);
    15961596    if (ptrVM.isOk()) /** @todo r=andy This apparently *never* is true at this point? */
    1597         ptrVM.vtable()->pfnVMR3ReqCallNoWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)Display::i_InvalidateAndUpdateEMT,
    1598                                               3, this, aScreenId, false);
     1597        ptrVM.vtable()->pfnVMR3ReqCallNoWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)Display::i_InvalidateAndUpdateEMT, 3,
     1598                                              this, aScreenId, false);
    15991599
    16001600    LogRelFlowFunc(("Attached to %d %RTuuid\n", aScreenId, aId.raw()));
     
    26772677        alock.release();
    26782678
    2679         int vrc = ptrVM.vtable()->pfnVMR3ReqCallNoWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)Display::i_InvalidateAndUpdateEMT,
    2680                                                         3, this, 0, true);
     2679        int vrc = ptrVM.vtable()->pfnVMR3ReqCallNoWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)Display::i_InvalidateAndUpdateEMT, 3,
     2680                                                        this, 0, true);
    26812681        alock.acquire();
    26822682
     
    26972697    if (SUCCEEDED(hrc))
    26982698    {
    2699         int vrc = ptrVM.vtable()->pfnVMR3ReqCallNoWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)Display::i_InvalidateAndUpdateEMT,
    2700                                                         3, this, aScreenId, false);
     2699        int vrc = ptrVM.vtable()->pfnVMR3ReqCallNoWaitU(ptrVM.rawUVM(), VMCPUID_ANY, (PFNRT)Display::i_InvalidateAndUpdateEMT, 3,
     2700                                                        this, aScreenId, false);
    27012701        if (RT_FAILURE(vrc))
    27022702            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Could not invalidate and update the screen %d (%Rrc)"), aScreenId, vrc);
  • trunk/src/VBox/Main/src-client/EmulatedUSBImpl.cpp

    r98278 r105352  
    288288HRESULT EUSBWEBCAM::Attach(Console *pConsole, PUVM pUVM, PCVMMR3VTABLE pVMM, const char *pszDriver)
    289289{
    290     int vrc = pVMM->pfnVMR3ReqCallWaitU(pUVM, 0 /* idDstCpu (saved state, see #6232) */,
    291                                         (PFNRT)emulatedWebcamAttach, 4,
     290    int vrc = pVMM->pfnVMR3ReqCallWaitU(pUVM, 0 /* idDstCpu (saved state, see #6232) */, (PFNRT)emulatedWebcamAttach, 4,
    292291                                        pUVM, pVMM, this, pszDriver);
    293292    if (RT_SUCCESS(vrc))
     
    299298HRESULT EUSBWEBCAM::Detach(Console *pConsole, PUVM pUVM, PCVMMR3VTABLE pVMM)
    300299{
    301     int vrc = pVMM->pfnVMR3ReqCallWaitU(pUVM, 0 /* idDstCpu (saved state, see #6232) */,
    302                                         (PFNRT)emulatedWebcamDetach, 3,
     300    int vrc = pVMM->pfnVMR3ReqCallWaitU(pUVM, 0 /* idDstCpu (saved state, see #6232) */, (PFNRT)emulatedWebcamDetach, 3,
    303301                                        pUVM, pVMM, this);
    304302    if (RT_SUCCESS(vrc))
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