After f93e23934b, we no longer call vmsave, thus will also not find the
right FS base there. This caused sporadic crashes of "jailhouse disable"
on return to userspace.
Fix it by loading the value from the corresponding MSR.
Signed-off-by: Jan Kiszka <
jan.k...@siemens.com>
---
hypervisor/arch/x86/svm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hypervisor/arch/x86/svm.c b/hypervisor/arch/x86/svm.c
index 18fb688..e911e30 100644
--- a/hypervisor/arch/x86/svm.c
+++ b/hypervisor/arch/x86/svm.c
@@ -468,7 +468,7 @@ void __attribute__((noreturn)) vcpu_deactivate_vmm(void)
asm volatile("str %0" : "=m" (cpu_data->linux_tss.selector));
cpu_data->linux_efer = vmcb->efer & (~EFER_SVME);
- cpu_data->linux_fs.base = vmcb->fs.base;
+ cpu_data->linux_fs.base = read_msr(MSR_FS_BASE);
cpu_data->linux_gs.base = vmcb->gs.base;
cpu_data->linux_ds.selector = vmcb->ds.selector;
--
2.1.4