Changeset 97178 in vbox for trunk/src/VBox/VMM/VMMR3/NEMR3Native-linux.cpp
- Timestamp:
- Oct 17, 2022 9:06:03 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3Native-linux.cpp
r96407 r97178 1476 1476 pVCpu->cpum.GstCtx.rip = pRun->s.regs.regs.rip; 1477 1477 1478 if (KvmEvents.interrupt.shadow) 1479 EMSetInhibitInterruptsPC(pVCpu, pVCpu->cpum.GstCtx.rip); 1480 else if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)) 1481 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 1482 1483 if (KvmEvents.nmi.masked) 1484 VMCPU_FF_SET(pVCpu, VMCPU_FF_BLOCK_NMIS); 1485 else if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_BLOCK_NMIS)) 1486 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_BLOCK_NMIS); 1478 CPUMUpdateInterruptShadowEx(&pVCpu->cpum.GstCtx, KvmEvents.interrupt.shadow != 0, pVCpu->cpum.GstCtx.rip); 1479 CPUMUpdateInterruptInhibitingByNmi(&pVCpu->cpum.GstCtx, KvmEvents.nmi.masked != 0); 1487 1480 1488 1481 if (KvmEvents.interrupt.injected) … … 1869 1862 1870 1863 KvmEvents.flags = KVM_VCPUEVENT_VALID_SHADOW; 1871 if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)) 1872 { 1873 if (pRun->s.regs.regs.rip == EMGetInhibitInterruptsPC(pVCpu)) 1874 KvmEvents.interrupt.shadow = KVM_X86_SHADOW_INT_MOV_SS | KVM_X86_SHADOW_INT_STI; 1875 else 1876 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 1877 } 1864 if (!CPUMIsInInterruptShadowWithUpdate(&pVCpu->cpum.GstCtx)) 1865 { /* probably likely */ } 1866 else 1867 KvmEvents.interrupt.shadow = KVM_X86_SHADOW_INT_MOV_SS | KVM_X86_SHADOW_INT_STI; 1878 1868 1879 1869 /* No flag - this is updated unconditionally. */ 1880 if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_BLOCK_NMIS)) 1881 KvmEvents.nmi.masked = 1; 1870 KvmEvents.nmi.masked = CPUMAreInterruptsInhibitedByNmi(&pVCpu->cpum.GstCtx); 1882 1871 1883 1872 if (TRPMHasTrap(pVCpu)) … … 2059 2048 KvmEvents.flags |= KVM_VCPUEVENT_VALID_SHADOW; 2060 2049 if (!(pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_INHIBIT_INT)) 2061 { 2062 if (!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)) 2063 KvmEvents.interrupt.shadow = 0; 2064 else if (EMGetInhibitInterruptsPC(pVCpu) == pRun->s.regs.regs.rip) 2065 KvmEvents.interrupt.shadow = KVM_X86_SHADOW_INT_MOV_SS | KVM_X86_SHADOW_INT_STI; 2066 else 2067 { 2068 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 2069 KvmEvents.interrupt.shadow = 0; 2070 } 2071 } 2072 else if (KvmEvents.interrupt.shadow) 2073 EMSetInhibitInterruptsPC(pVCpu, pRun->s.regs.regs.rip); 2074 else if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)) 2075 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 2050 KvmEvents.interrupt.shadow = !CPUMIsInInterruptShadowWithUpdate(&pVCpu->cpum.GstCtx) ? 0 2051 : KVM_X86_SHADOW_INT_MOV_SS | KVM_X86_SHADOW_INT_STI; 2052 else 2053 CPUMUpdateInterruptShadowEx(&pVCpu->cpum.GstCtx, KvmEvents.interrupt.shadow != 0, pRun->s.regs.regs.rip); 2076 2054 2077 2055 if (!(pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_INHIBIT_NMI)) 2078 KvmEvents.nmi.masked = VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_BLOCK_NMIS) ? 1 : 0; 2079 else if (KvmEvents.nmi.masked) 2080 VMCPU_FF_SET(pVCpu, VMCPU_FF_BLOCK_NMIS); 2081 else if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_BLOCK_NMIS)) 2082 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_BLOCK_NMIS); 2056 KvmEvents.nmi.masked = CPUMAreInterruptsInhibitedByNmi(&pVCpu->cpum.GstCtx); 2057 else 2058 CPUMUpdateInterruptInhibitingByNmi(&pVCpu->cpum.GstCtx, KvmEvents.nmi.masked != 0); 2083 2059 2084 2060 /* KVM will own the INT + NMI inhibit state soon: */
Note:
See TracChangeset
for help on using the changeset viewer.