[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] Only call EvtchnFlush on valid Cpus
On 03/07/2023 17:46, Paul Durrant wrote: On 20/06/2023 15:33, Owen Smith wrote:The Evtchn processor array is created using KeQueryMaximumProcessorCountEx, whichcan include processors that do not get initialized. Skip cleanup and flushing uninitialized event channels Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx>Acked-by: Paul Durrant <paul@xxxxxxx> Actually, taking another look I think we should actually fix EvtchnTwoLevelIsProcessorEnabled() to check SystemProcessorVcpuId() rather than blindly returning TRUE (the FIFO variant already checks) and then we can use EvtchnIsProcessorEnabled()... --- src/xenbus/evtchn.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xenbus/evtchn.c b/src/xenbus/evtchn.c index 2e63edb..ec4ac28 100644 --- a/src/xenbus/evtchn.c +++ b/src/xenbus/evtchn.c @@ -1752,10 +1752,16 @@ EvtchnRelease( for (Cpu = 0; Cpu < Context->ProcessorCount; Cpu++) { PXENBUS_EVTCHN_PROCESSOR Processor; + unsigned int vcpu_id; + NTSTATUS status; ASSERT(Context->Processor != NULL); Processor = &Context->Processor[Cpu]; + status = SystemProcessorVcpuId(Cpu, &vcpu_id); ... here instead. I'll send a follow-up patch. Paul + if (!NT_SUCCESS(status)) + continue; + EvtchnFlush(Context, Cpu); (VOID) KeRemoveQueueDpc(&Processor->Dpc);
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |