Searched hist:"342 db9a1d3b9a7fc359862e8e2e233be06b70e78" (Results 1 – 1 of 1) sorted by relevance
/kvm-unit-tests/x86/ |
H A D | vmx.c | 342db9a1d3b9a7fc359862e8e2e233be06b70e78 Tue Dec 14 01:18:21 UTC 2021 Aaron Lewis <aaronlewis@google.com> x86: Align L2's stacks
Setting the stack to PAGE_SIZE - 1 sets the stack to being 1-byte aligned, which fails in usermode with alignment checks enabled (ie: with flags cr0.am set and eflags.ac set). This was causing an #AC in usermode.c when preparing to call the callback in run_in_user(). Aligning the stack fixes the issue.
For the purposes of fixing the #AC in usermode.c the stack has to be aligned to at least an 8-byte boundary. Setting it to a page aligned boundary ensures any stack alignment requirements are met as x86_64 stacks generally want to be 16-byte aligned.
Signed-off-by: Aaron Lewis <aaronlewis@google.com> Message-Id: <20211214011823.3277011-3-aaronlewis@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|