PFN_NUMBER Pfn;
PHYSICAL_ADDRESS Address;
+ status = SystemProcessorVcpuId(Index, &vcpu_id);
+
+ Index++;
+
+ if (status == STATUS_NOT_SUPPORTED)
+ continue;
+
+ if (!NT_SUCCESS(status))
+ goto fail1;
+
Mdl = __AllocatePage();
status = STATUS_NO_MEMORY;
if (Mdl == NULL)
- goto fail1;
-
- status = SystemProcessorVcpuId(Index, &vcpu_id);
- if (!NT_SUCCESS(status))
goto fail2;
Pfn = MmGetMdlPfnArray(Mdl)[0];
Address.LowPart);
Context->ControlBlockMdl[vcpu_id] = Mdl;
-
- Index++;
}
Trace("<====\n");
fail3:
Error("fail3\n");
+ __FreePage(Mdl);
+
fail2:
Error("fail2\n");
- __FreePage(Mdl);
-
fail1:
Error("fail1 (%08x)\n", status);
while (--Index >= 0) {
unsigned int vcpu_id;
- (VOID) SystemProcessorVcpuId(Index, &vcpu_id);
+ status = SystemProcessorVcpuId(Index, &vcpu_id);
+ if (status == STATUS_NOT_SUPPORTED)
+ continue;
+
+ BUG_ON(!NT_SUCCESS(status));
Mdl = Context->ControlBlockMdl[vcpu_id];
Context->ControlBlockMdl[vcpu_id] = NULL;