mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-21 16:39:39 +00:00
vm/x86: support extended fpu state transfer
Extend Genode's vCPU FPU state and adjust all users to copy at most FPU data they actually support. Issue #5314
This commit is contained in:
committed by
Norman Feske
parent
5993fa9c7f
commit
ff506b0375
@ -400,6 +400,7 @@ struct Foc_vcpu : Thread, Noncopyable
|
||||
if (state.fpu.charged()) {
|
||||
state.fpu.charge([&] (Vcpu_state::Fpu::State &fpu) {
|
||||
asm volatile ("fxrstor %0" : : "m" (fpu) : "memory");
|
||||
return 512;
|
||||
});
|
||||
} else
|
||||
asm volatile ("fxrstor %0" : : "m" (_fpu_vcpu) : "memory");
|
||||
@ -412,6 +413,7 @@ struct Foc_vcpu : Thread, Noncopyable
|
||||
state.fpu.charge([&] (Vcpu_state::Fpu::State &fpu) {
|
||||
asm volatile ("fxsave %0" : "=m" (fpu) :: "memory");
|
||||
asm volatile ("fxsave %0" : "=m" (_fpu_vcpu) :: "memory");
|
||||
return 512;
|
||||
});
|
||||
asm volatile ("fxrstor %0" : : "m" (_fpu_ep) : "memory");
|
||||
|
||||
|
Reference in New Issue
Block a user