mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 06:51:49 +00:00
hv: fix ramdump regression
this patch change type of global variable for saving registers on execption. global variable 'crash_ctx' should not be set to static. crash_ctx is for offline analysis when system crashed, not for runtime usage. as crash_ctx is only be set without being read, compiler will regard crash_ctx as an useless variable if it is set to static, and will not generate code for it. Tracked-On: #1295 Signed-off-by: zhouji3x <jianfengx.zhou@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
52ee615428
commit
2908f09f88
@ -44,8 +44,15 @@ static const char *const excp_names[32] = {
|
|||||||
[31] = "Intel Reserved"
|
[31] = "Intel Reserved"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Global variable for save registers on exception */
|
/*
|
||||||
static struct intr_excp_ctx *crash_ctx;
|
* Global variable for save registers on exception.
|
||||||
|
* don't change crash_ctx to static.
|
||||||
|
* crash_ctx is for offline analysis when system crashed, not for runtime usage.
|
||||||
|
* as crash_ctx is only be set without being read, compiler will regard
|
||||||
|
* crash_ctx as an useless variable if it is set to static, and will not
|
||||||
|
* generate code for it.
|
||||||
|
*/
|
||||||
|
struct intr_excp_ctx *crash_ctx;
|
||||||
|
|
||||||
static void dump_guest_reg(struct vcpu *vcpu)
|
static void dump_guest_reg(struct vcpu *vcpu)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user