VirtualBox

Changeset 80196 in vbox for trunk/src


Ignore:
Timestamp:
Aug 8, 2019 8:35:30 AM (5 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Nested VMX: bugref:9180 Set VMX_VMCS_GUEST_PENDING_DEBUG_XCPTS while merging VMCS. nits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r80192 r80196  
    50005000            /** @todo r=ramshankar: Warning!! We ASSUME EFLAGS.TF will not cleared on
    50015001             *        premature trips to ring-3 esp since IEM does not yet handle it. */
    5002             rc = VMXWriteVmcs32(VMX_VMCS_GUEST_PENDING_DEBUG_XCPTS, VMX_VMCS_GUEST_PENDING_DEBUG_XCPT_BS);
     5002            rc = VMXWriteVmcsNw(VMX_VMCS_GUEST_PENDING_DEBUG_XCPTS, VMX_VMCS_GUEST_PENDING_DEBUG_XCPT_BS);
    50035003            AssertRC(rc);
    50045004        }
    5005         /** @todo NSTVMX: Handling copying of VMX_VMCS_GUEST_PENDING_DEBUG_XCPTS from
    5006          *        nested-guest VMCS. */
     5005        /* else: for nested-guest currently handling while merging controls. */
    50075006
    50085007        ASMAtomicUoAndU64(&pVCpu->hm.s.fCtxChanged, ~HM_CHANGED_GUEST_RFLAGS);
     
    54545453        HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR3);
    54555454
    5456         RTGCPHYS GCPhysGuestCr3 = NIL_RTGCPHYS;
    54575455        if (pVM->hm.s.fNestedPaging)
    54585456        {
     
    54805478            AssertRC(rc);
    54815479
    5482             PCPUMCTX pCtx = &pVCpu->cpum.GstCtx;
     5480            uint64_t  u64GuestCr3;
     5481            PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx;
    54835482            if (   pVM->hm.s.vmx.fUnrestrictedGuest
    54845483                || CPUMIsGuestPagingEnabledEx(pCtx))
     
    55005499                 * the guest when it's not using paging.
    55015500                 */
    5502                 GCPhysGuestCr3 = pCtx->cr3;
     5501                u64GuestCr3 = pCtx->cr3;
    55035502            }
    55045503            else
     
    55255524                    AssertMsgFailedReturn(("%Rrc\n",  rc), rc);
    55265525
    5527                 GCPhysGuestCr3 = GCPhys;
     5526                u64GuestCr3 = GCPhys;
    55285527            }
    55295528
    5530             Log4Func(("u32GuestCr3=%#RGp (GstN)\n", GCPhysGuestCr3));
    5531             rc = VMXWriteVmcsNw(VMX_VMCS_GUEST_CR3, GCPhysGuestCr3);
     5529            Log4Func(("guest_cr3=%#RX64 (GstN)\n", u64GuestCr3));
     5530            rc = VMXWriteVmcsNw(VMX_VMCS_GUEST_CR3, u64GuestCr3);
    55325531            AssertRC(rc);
    55335532        }
     
    55375536            RTHCPHYS const HCPhysGuestCr3 = PGMGetHyperCR3(pVCpu);
    55385537
    5539             Log4Func(("u32GuestCr3=%#RHv (HstN)\n", HCPhysGuestCr3));
     5538            Log4Func(("guest_cr3=%#RX64 (HstN)\n", HCPhysGuestCr3));
    55405539            rc = VMXWriteVmcsNw(VMX_VMCS_GUEST_CR3, HCPhysGuestCr3);
    55415540            AssertRC(rc);
     
    96239622
    96249623        /* Pending debug exceptions. */
    9625         rc = VMXReadVmcs64(VMX_VMCS_GUEST_PENDING_DEBUG_XCPTS, &u64Val);
     9624        rc = VMXReadVmcsNw(VMX_VMCS_GUEST_PENDING_DEBUG_XCPTS, &u64Val);
    96269625        AssertRC(rc);
    96279626        /* Bits 63:15, Bit 13, Bits 11:4 MBZ. */
     
    99819980
    99829981    /*
     9982     * Pending debug exceptions.
     9983     * Currently just copy whatever the nested-guest provides us.
     9984     */
     9985    uint64_t const uPendingDbgXcpt = pVmcsNstGst->u64GuestPendingDbgXcpt.u;
     9986
     9987    /*
    99839988     * I/O Bitmap.
    99849989     *
     
    1011210117    if (u32ProcCtls2 & VMX_PROC_CTLS2_VIRT_APIC_ACCESS)
    1011310118        rc |= VMXWriteVmcs64(VMX_VMCS64_CTRL_APIC_ACCESSADDR_FULL, HCPhysApicAccess);
     10119    rc |= VMXWriteVmcsNw(VMX_VMCS_GUEST_PENDING_DEBUG_XCPTS, uPendingDbgXcpt);
    1011410120    AssertRC(rc);
    1011510121
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