diff --git a/ntoskrnl/ke/amd64/stubs.c b/ntoskrnl/ke/amd64/stubs.c index 7326f7a2cd0..7bfdb98f00e 100644 --- a/ntoskrnl/ke/amd64/stubs.c +++ b/ntoskrnl/ke/amd64/stubs.c @@ -154,8 +154,12 @@ KiIdleLoop(VOID) } else { + Prcb->IdleHalt = 1; + /* Continue staying idle. Note the HAL returns with interrupts on */ Prcb->PowerState.IdleFunction(&Prcb->PowerState); + + Prcb->IdleHalt = 0; } } } diff --git a/ntoskrnl/ke/amd64/traphandler.c b/ntoskrnl/ke/amd64/traphandler.c index ef2cb4d7dae..b96fb5323b9 100644 --- a/ntoskrnl/ke/amd64/traphandler.c +++ b/ntoskrnl/ke/amd64/traphandler.c @@ -36,6 +36,12 @@ KiDpcInterruptHandler(VOID) /* Send an EOI */ KiSendEOI(); + /* Ignore idle halt DPC interrupts */ + if (Prcb->IdleHalt) + { + goto Exit; + } + /* Check for pending timers, pending DPCs, or pending ready threads */ if ((Prcb->DpcData[0].DpcQueueDepth) || (Prcb->TimerRequest) || @@ -79,6 +85,7 @@ KiDpcInterruptHandler(VOID) KiSwapContext(APC_LEVEL, OldThread); } +Exit: /* Disable interrupts and go back to old irql */ _disable(); KeLowerIrql(OldIrql);