VirtualBox

Changeset 75997 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 6, 2018 6:45:19 AM (6 years ago)
Author:
vboxsync
Message:

VMM/EM: Nested VMX: bugref:9180 Include APIC-write FF in the high-priority post-execution FF mask. Add VMCPU_FF_INTERRUPT_NESTED_GUEST among the flags we check to reschedule from a MWAIT keeping in mind when virtual posted-interrupts may be implemented.

File:
1 edited

Legend:

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

    r75960 r75997  
    16951695    }
    16961696
     1697#ifdef VBOX_WITH_NESTED_HWVIRT_VMX
     1698        /*
     1699         * VMX Nested-guest APIC-write pending (can cause VM-exits).
     1700         * Takes priority over even SMI and INIT signals.
     1701         * See Intel spec. 29.4.3.2 "APIC-Write Emulation".
     1702         */
     1703        if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_APIC_WRITE))
     1704        {
     1705            rc = VBOXSTRICTRC_VAL(IEMExecVmxVmexitApicWrite(pVCpu));
     1706            Assert(rc != VINF_VMX_INTERCEPT_NOT_ACTIVE);
     1707        }
     1708#endif
     1709
    16971710#ifdef VBOX_WITH_RAW_MODE
    16981711    if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_CSAM_PENDING_ACTION))
     
    21112124        }
    21122125
    2113 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX
    2114         /*
    2115          * VMX Nested-guest APIC-write VM-exit.
    2116          * Takes priority over SMI, INIT signals.
    2117          * See Intel spec. 29.4.3.2 "APIC-Write Emulation".
    2118          */
    2119         if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_APIC_WRITE))
    2120         {
    2121             rc2 = VBOXSTRICTRC_VAL(IEMExecVmxVmexitApicWrite(pVCpu));
    2122             if (rc2 == VINF_VMX_INTERCEPT_NOT_ACTIVE)
    2123                 rc2 = VINF_SUCCESS;
    2124             UPDATE_RC();
    2125         }
    2126 #endif
    2127 
    21282126        /** @todo SMIs. If we implement SMIs, this is where they will have to be
    21292127         *        delivered. */
     
    21952193            if (fGif)
    21962194            {
    2197                 /* In VMX, virtual interrupt takes priority over physical interrupts. */
     2195                /*
     2196                 * With VMX, virtual interrupts takes priority over physical interrupts.
     2197                 * With SVM, physical interrupts takes priority over virtual interrupts.
     2198                 */
    21982199                if (   VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_NESTED_GUEST)
    21992200                    && CPUMIsGuestInVmxNonRootMode(&pVCpu->cpum.GstCtx)
     
    22032204                    rc2 = VINF_NO_CHANGE;
    22042205                }
    2205                 /* In SVM, physical interrupts take priority over virtual interrupts. */
    22062206                else if (   VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC)
    22072207                         && CPUMIsGuestPhysIntrEnabled(pVCpu))
     
    29182918
    29192919                            if (VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC
     2920                                                         | VMCPU_FF_INTERRUPT_NESTED_GUEST
    29202921                                                         | VMCPU_FF_INTERRUPT_NMI  | VMCPU_FF_INTERRUPT_SMI | VMCPU_FF_UNHALT))
    29212922                            {
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