VirtualBox

Changeset 100877 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Aug 15, 2023 8:13:22 AM (17 months ago)
Author:
vboxsync
Message:

VMM/NEMR3Native-darwin: Disable intercepting #DB exceptions and mov drX instructions as it currently breaks using a debugger inside the guest. This will break using the hypervisor debugger but only very few people use it anyway and even less on macOS, bugref:10504

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin.cpp

    r99739 r100877  
    15831583    }
    15841584
     1585    /** @todo The DRx handling is not quite correct breaking debugging inside the guest with gdb,
     1586     * see @ticketref{21413} and @ticketref{21546}, so this is disabled for now. See @bugref{10504}
     1587     * as well.
     1588     */
     1589#if 0
    15851590    if (fInterceptMovDRx)
    15861591        uProcCtls |= VMX_PROC_CTLS_MOV_DR_EXIT;
    15871592    else
    15881593        uProcCtls &= ~VMX_PROC_CTLS_MOV_DR_EXIT;
     1594#endif
    15891595
    15901596    /*
     
    15981604        pVmcsInfo->u32ProcCtls = uProcCtls;
    15991605    }
     1606
     1607    /*
     1608     * Update guest DR7.
     1609     */
     1610    int rc = nemR3DarwinWriteVmcs64(pVCpu, VMX_VMCS_GUEST_DR7, u64GuestDr7);
     1611    AssertRC(rc);
    16001612
    16011613    /*
     
    16111623
    16121624        uint32_t fIntrState = 0;
    1613         int rc = nemR3DarwinReadVmcs32(pVCpu, VMX_VMCS32_GUEST_INT_STATE, &fIntrState);
     1625        rc = nemR3DarwinReadVmcs32(pVCpu, VMX_VMCS32_GUEST_INT_STATE, &fIntrState);
    16141626        AssertRC(rc);
    16151627
     
    26762688    uint32_t const fZap = g_HmMsrs.u.vmx.ProcCtls.n.allowed1;     /* Bits cleared here must be cleared in the VMCS. */
    26772689
     2690    /** @todo The DRx handling is not quite correct breaking debugging inside the guest with gdb,
     2691     * see @ticketref{21413} and @ticketref{21546}, so intercepting mov drX is disabled for now. See @bugref{10504}
     2692     * as well. This will break the hypervisor debugger but only very few people use it and even less on macOS
     2693     * using the NEM backend.
     2694     */
    26782695    fVal |= VMX_PROC_CTLS_HLT_EXIT                                    /* HLT causes a VM-exit. */
    26792696//         |  VMX_PROC_CTLS_USE_TSC_OFFSETTING                          /* Use TSC-offsetting. */
    2680          |  VMX_PROC_CTLS_MOV_DR_EXIT                                 /* MOV DRx causes a VM-exit. */
     2697//         |  VMX_PROC_CTLS_MOV_DR_EXIT                                 /* MOV DRx causes a VM-exit. */
    26812698         |  VMX_PROC_CTLS_UNCOND_IO_EXIT                              /* All IO instructions cause a VM-exit. */
    26822699         |  VMX_PROC_CTLS_RDPMC_EXIT                                  /* RDPMC causes a VM-exit. */
     
    27832800     *       recursive #DBs can cause a CPU hang.
    27842801     */
     2802    /** @todo The DRx handling is not quite correct breaking debugging inside the guest with gdb,
     2803     * see @ticketref{21413} and @ticketref{21546}, so intercepting #DB is disabled for now. See @bugref{10504}
     2804     * as well. This will break the hypervisor debugger but only very few people use it and even less on macOS
     2805     * using the NEM backend.
     2806     */
    27852807    uint32_t const uXcptBitmap = RT_BIT(X86_XCPT_AC)
    2786                                | RT_BIT(X86_XCPT_DB);
     2808                               /*| RT_BIT(X86_XCPT_DB)*/;
    27872809
    27882810    /* Commit it to the VMCS. */
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