VirtualBox

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


Ignore:
Timestamp:
Jul 10, 2008 8:08:05 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33127
Message:

TPR & interrupt dispatch updates.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/EM.cpp

    r10411 r10458  
    30243024        }
    30253025
    3026         /* Replays the handler notification changes. */
     3026        /* Replay the handler notification changes. */
    30273027        if (VM_FF_ISSET(pVM, VM_FF_REM_HANDLER_NOTIFY))
    30283028            REMR3ReplayHandlerNotifications(pVM);
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r10354 r10458  
    319319    /* Virtualize masking of INTR interrupts. (reads/writes from/to CR8 go to the V_TPR register) */
    320320    pVMCB->ctrl.IntCtrl.n.u1VIrqMasking = 1;
     321    /* Ignore the priority in the TPR; just deliver it when we tell it to. */
     322    pVMCB->ctrl.IntCtrl.n.u1IgnoreTPR   = 1;
    321323
    322324    /* Set IO and MSR bitmap addresses. */
     
    395397        &&  VM_FF_ISPENDING(pVM, (VM_FF_INTERRUPT_APIC|VM_FF_INTERRUPT_PIC)))
    396398    {
    397         if (!(pCtx->eflags.u32 & X86_EFL_IF))
     399        if (    !(pCtx->eflags.u32 & X86_EFL_IF)
     400            ||  VM_FF_ISSET(pVM, VM_FF_INHIBIT_INTERRUPTS))
    398401        {
    399402            if (!pVMCB->ctrl.IntCtrl.n.u1VIrqValid)
    400403            {
    401                 LogFlow(("Enable irq window exit!\n"));
     404                if (!VM_FF_ISSET(pVM, VM_FF_INHIBIT_INTERRUPTS))
     405                    LogFlow(("Enable irq window exit!\n"));
     406                else
     407                    Log(("Pending interrupt blocked at %VGv by VM_FF_INHIBIT_INTERRUPTS -> irq window exit\n", pCtx->rip));
     408
    402409                /** @todo use virtual interrupt method to inject a pending irq; dispatched as soon as guest.IF is set. */
    403410                pVMCB->ctrl.u32InterceptCtrl1 |= SVM_CTRL1_INTERCEPT_VINTR;
    404411                pVMCB->ctrl.IntCtrl.n.u1VIrqValid    = 1;
    405                 pVMCB->ctrl.IntCtrl.n.u1IgnoreTPR    = 1; /* ignore the priority in the TPR; just deliver it */
    406412                pVMCB->ctrl.IntCtrl.n.u8VIrqVector   = 0; /* don't care */
    407413            }
    408414        }
    409415        else
    410         if (!VM_FF_ISSET(pVM, VM_FF_INHIBIT_INTERRUPTS))
    411416        {
    412417            uint8_t u8Interrupt;
     
    427432            }
    428433        }
    429         else
    430             Log(("Pending interrupt blocked at %VGv by VM_FF_INHIBIT_INTERRUPTS!!\n", pCtx->rip));
    431434    }
    432435
     
    14331436        Log(("SVM_EXIT_VINTR IF=%d\n", pCtx->eflags.Bits.u1IF));
    14341437        pVMCB->ctrl.IntCtrl.n.u1VIrqValid    = 0;
    1435         pVMCB->ctrl.IntCtrl.n.u1IgnoreTPR    = 0;
    14361438        pVMCB->ctrl.IntCtrl.n.u8VIrqVector   = 0;
    14371439        goto ResumeExecution;
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r10360 r10458  
    278278#if HC_ARCH_BITS == 64
    279279    /* Always exit on CR8 writes. */
    280     /* @todo investigate TRP treshold option */
     280    /* @todo investigate TPR treshold option */
    281281    val |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_STORE_EXIT;
    282282
     
    11971197        AssertRC(rc);
    11981198        /* The TPR can be found at offset 0x80 in the APIC mmio page. */
    1199         pVM->hwaccm.s.vmx.pAPIC[0x80] = u8TPR;
     1199        pVM->hwaccm.s.vmx.pAPIC[0x80] = u8TPR << 4; /* bits 7-4 */
    12001200    }
    12011201
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