Architecturally, all 64bit stacks are aligned on a 16 byte boundary before an
exception frame is pushed. The failsafe frame should not special in this
regard.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
struct pv_vcpu *pv = &n->arch.pv_vcpu;
struct cpu_user_regs *regs = guest_cpu_user_regs();
unsigned long *rsp =
- (n->arch.flags & TF_kernel_mode) ?
- (unsigned long *)regs->rsp :
- (unsigned long *)pv->kernel_sp;
+ (unsigned long *)(((n->arch.flags & TF_kernel_mode)
+ ? regs->rsp : pv->kernel_sp) & ~0xf);
unsigned long cs_and_mask, rflags;
/* Fold upcall mask and architectural IOPL into RFLAGS.IF. */