Showing results for 
Search instead for 
Did you mean: 

How to handle the OS init-sipi-sipi sequence properly inside a VMM?

I'm experimenting with writing a simple Hypervisor, trying to support the initialization of a multiprocessor during the OS bootstrap (the init-sipi-sipi sequence).

I'm using the Intel FRM hypervisor as a reference, specifically the code here:

The Multiple-Processor (MP) Initialization is documented in Intel SDM Volume 3B Chapter 8.4.

First, I successfully hyperjack the APs before booting the OS by sending my own INIT and SIPI signals and the APs successfully jump to a simple reset-vector. Then the vector sets up a valid GDT and eventually transitions into long-mode where the hyperjacking takes place successfully (vmlaunch succeeds) and the AP is halted with interrupts disabled.

When I try to boot Windows or Ubuntu on the BSP (with overall 2 cores), the halted AP receives the INIT signal as my vm-exit handler is being invoked there. Then I set the AP activity state to the wait-for-sipi state as required by the Intel SDM.

My BSP continues receiving various vm-exits until the AP finally receives the SIPI from the OS in a vm-exit, at that point VMWare Workstation crashes with the following message:

VMware Workstation unrecoverable error: (vcpu-1) vcpu-1:ASSERT vmcore/vmm/private/dt.h:548

There's no further information regarding this assert in the generated vmware.log (with full logging enabled), and I've tried several steps including going through the guest-state and host-state checks performed by VMX (Vol 3B 26.2-26.3) to no avail, as the checks all look fine.

Perhaps I'm demonstrating some basic misunderstanding, because it seems that the state of the AP during the SIPI is invalid (and perhaps specifically because of descriptor tables? i.e `dt.h`).

Is there an Intel guideline that i'm missing or is this a pure VMware problem?

Tags (1)
0 Kudos
1 Reply