From 22a1bd6948f022e2855cba5999c7693dc459f471 Mon Sep 17 00:00:00 2001 From: Sainath Grandhi Date: Fri, 25 Oct 2019 16:08:51 -0700 Subject: [PATCH] hv: Fix the definition of struct representing interrupt hw frame In 64-bit mode, processor pushes SS and RSP onto stack unconditionally. Also when dumping the exception info, it makes more sense to dump the RSP at the point of interrupt, rather than the RSP after pushing context (including GPRs) Tracked-On: #4102 Signed-off-by: Sainath Grandhi Reviewed-by: Jason Chen CJ Acked-by: Eddie Dong --- hypervisor/debug/dump.c | 2 +- hypervisor/include/arch/x86/irq.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hypervisor/debug/dump.c b/hypervisor/debug/dump.c index ef64c6020..4c739afca 100644 --- a/hypervisor/debug/dump.c +++ b/hypervisor/debug/dump.c @@ -264,7 +264,7 @@ void dump_intr_excp_frame(const struct intr_excp_ctx *ctx) pr_acrnlog("= RDX=0x%016llX RDI=0x%016llX RSI=0x%016llX\n", ctx->gp_regs.rdx, ctx->gp_regs.rdi, ctx->gp_regs.rsi); pr_acrnlog("= RSP=0x%016llX RBP=0x%016llX RBX=0x%016llX\n", - ctx->gp_regs.rsp, ctx->gp_regs.rbp, ctx->gp_regs.rbx); + ctx->rsp, ctx->gp_regs.rbp, ctx->gp_regs.rbx); pr_acrnlog("= R8=0x%016llX R9=0x%016llX R10=0x%016llX\n", ctx->gp_regs.r8, ctx->gp_regs.r9, ctx->gp_regs.r10); pr_acrnlog("= R11=0x%016llX R12=0x%016llX R13=0x%016llX\n", diff --git a/hypervisor/include/arch/x86/irq.h b/hypervisor/include/arch/x86/irq.h index d31b3fcea..8f8f39679 100644 --- a/hypervisor/include/arch/x86/irq.h +++ b/hypervisor/include/arch/x86/irq.h @@ -76,6 +76,7 @@ struct intr_excp_ctx { uint64_t rip; uint64_t cs; uint64_t rflags; + uint64_t rsp; uint64_t ss; };