x86, HYP: Cleanup VCPU FPU state
Otherwise ksActiveFPUState may point to freed memory after a vcpu with active FPU state gets deleted. Signed-off-by: Indan Zupancic <indan@nul.nu>
This commit is contained in:
parent
296638287a
commit
e00f2e2148
1 changed files with 3 additions and 0 deletions
|
|
@ -122,6 +122,9 @@ void clearCurrentVCPU(void)
|
|||
vmclear(vcpu);
|
||||
vcpu->launched = false;
|
||||
ARCH_NODE_STATE(x86KSCurrentVCPU) = NULL;
|
||||
if (&vcpu->fpuState == NODE_STATE(ksActiveFPUState)) {
|
||||
switchLocalFpuOwner(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue