vbox: use 'Abi::stack_align()' for exit handler stack

This ensures proper stack alignment for FPU instructions on x86_64.

Fixes #3358
This commit is contained in:
Christian Prochaska 2019-04-18 18:50:26 +02:00 committed by Christian Helmuth
parent 3fa994a7a4
commit f596595c98
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@
/* Genode includes */
#include <base/log.h>
#include <cpu/consts.h>
#include <util/flex_iterator.h>
#include <util/touch.h>
#include <rom_session/connection.h>
@ -167,7 +168,8 @@ class Vcpu_handler : public Vmm::Vcpu_dispatcher<Genode::Thread>,
unsigned long value;
if (!setjmp(_env)) {
_stack_reply = reinterpret_cast<void *>(&value - 1);
_stack_reply = reinterpret_cast<void *>(
Abi::stack_align(reinterpret_cast<Genode::addr_t>(&value)));
Nova::reply(_stack_reply);
}
}