]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Add logging for Active/Maximum Processors
authorOwen Smith <owen.smith@cloud.com>
Thu, 25 May 2023 15:14:10 +0000 (16:14 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Fri, 9 Jun 2023 13:07:34 +0000 (14:07 +0100)
Server 2022 can report Active = 32, Maximum = 64

Signed-off-by: Owen Smith <owen.smith@cloud.com>
src/xen/system.c

index 3c013975dedc7a07a1886711e854c67204427580..844deea15fc637d6ac633852551b823ce7890ddb 100644 (file)
@@ -1263,6 +1263,7 @@ SystemInitialize(
     LONG            References;
     HANDLE          ParametersKey;
     ULONG           RegisterVcpuInfo;
+    ULONG           ActiveProcessors;
     NTSTATUS        status;
 
     References = InterlockedIncrement(&Context->References);
@@ -1271,9 +1272,12 @@ SystemInitialize(
     if (References != 1)
         goto fail1;
 
+    ActiveProcessors = KeQueryActiveProcessorCountEx(ALL_PROCESSOR_GROUPS);
     Context->ProcessorCount = KeQueryMaximumProcessorCountEx(ALL_PROCESSOR_GROUPS);
     Context->Processor = __SystemAllocate(sizeof (SYSTEM_PROCESSOR) * Context->ProcessorCount);
 
+    Info("CPUs %u / %u\n", ActiveProcessors, Context->ProcessorCount);
+
     status = STATUS_NO_MEMORY;
     if (Context->Processor == NULL)
         goto fail2;