]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Only call EvtchnFlush on valid Cpus
authorOwen Smith <owen.smith@cloud.com>
Tue, 20 Jun 2023 14:33:19 +0000 (15:33 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Tue, 4 Jul 2023 17:23:26 +0000 (18:23 +0100)
The Evtchn processor array is created using KeQueryMaximumProcessorCountEx, which
can include processors that do not get initialized.
Skip cleanup and flushing uninitialized event channels

Signed-off-by: Owen Smith <owen.smith@cloud.com>
Use EvtchnIsProcessorEnabled() rather than SystemProcessorVcpuId() as the test.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
src/xenbus/evtchn.c

index 2e63edb93b781ef40d93411acb9d023d69ed9641..9f7026db8dde5391feec057740daa3fc9d5f7ff7 100644 (file)
@@ -1753,6 +1753,9 @@ EvtchnRelease(
     for (Cpu = 0; Cpu < Context->ProcessorCount; Cpu++) {
         PXENBUS_EVTCHN_PROCESSOR Processor;
 
+        if (!EvtchnIsProcessorEnabled(Context, Cpu))
+            continue;
+
         ASSERT(Context->Processor != NULL);
         Processor = &Context->Processor[Cpu];