From: Sean Christopherson <seanjc@google.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, jmattson@google.com
Subject: Re: [kvm-unit-tests PATCH v2 2/4] x86: Align L2's stacks
Date: Wed, 12 Jan 2022 19:38:40 +0000 [thread overview]
Message-ID: <Yd8uQLYAhSppgW74@google.com> (raw)
In-Reply-To: <20211214011823.3277011-3-aaronlewis@google.com>
On Tue, Dec 14, 2021, Aaron Lewis wrote:
> 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>
> ---
Reviewed-by: Sean Christopherson <seanjc@google.com>
next prev parent reply other threads:[~2022-01-12 19:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 1:18 [kvm-unit-tests PATCH v2 0/4] Add additional testing for routing L2 exceptions Aaron Lewis
2021-12-14 1:18 ` [kvm-unit-tests PATCH v2 1/4] x86: Fix a #GP from occurring in usermode library's exception handlers Aaron Lewis
2021-12-14 1:18 ` [kvm-unit-tests PATCH v2 2/4] x86: Align L2's stacks Aaron Lewis
2022-01-12 19:38 ` Sean Christopherson [this message]
2021-12-14 1:18 ` [kvm-unit-tests PATCH v2 3/4] x86: Add a test framework for nested_vmx_reflect_vmexit() testing Aaron Lewis
2022-01-12 20:48 ` Sean Christopherson
2022-01-19 16:57 ` Aaron Lewis
2022-01-20 0:46 ` Sean Christopherson
2021-12-14 1:18 ` [kvm-unit-tests PATCH v2 4/4] x86: Add test coverage " Aaron Lewis
2021-12-14 12:19 ` [kvm-unit-tests PATCH v2 0/4] Add additional testing for routing L2 exceptions Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yd8uQLYAhSppgW74@google.com \
--to=seanjc@google.com \
--cc=aaronlewis@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.