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>
master commit:
cbcaccb5e991155a4ae85a032e990614c3dc6960
master date: 2017-05-09 19:00:20 +0100
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;
if ( is_pv_32bit_vcpu(n) )