Skip to content

Commit

Permalink
IHK: support DUMP_NMI_CONT for live-debug
Browse files Browse the repository at this point in the history
Change-Id: I87dde6e4cc484eada894bbee4475a307986ca664
  • Loading branch information
bgerofi authored and masamichitakagi committed Feb 10, 2020
1 parent b053576 commit f0ef7f6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
9 changes: 6 additions & 3 deletions cokernel/smp/arm64/bootparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,19 @@ struct ihk_dump_page {
unsigned long map[0];
};

#define IHK_DUMP_PAGE_SET_INCOMPLETE 0
#define IHK_DUMP_PAGE_SET_COMPLETED 1

struct ihk_dump_page_set {
volatile unsigned int completion_flag;
unsigned int count;
unsigned long page_size;
unsigned long phy_page;
};

#define IHK_DUMP_PAGE_SET_INCOMPLETE 0
#define IHK_DUMP_PAGE_SET_COMPLETED 1
#define DUMP_LEVEL_ALL 0
#define DUMP_LEVEL_USER_UNUSED_EXCLUDE 24


/*
* smp_boot_param holds various boot time arguments.
* The layout in the memory is the following:
Expand Down
8 changes: 5 additions & 3 deletions cokernel/smp/x86_64/bootparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,18 @@ struct ihk_dump_page {
unsigned long map[0];
};

#define IHK_DUMP_PAGE_SET_INCOMPLETE 0
#define IHK_DUMP_PAGE_SET_COMPLETED 1

struct ihk_dump_page_set {
volatile unsigned int completion_flag;
unsigned int count;
unsigned long page_size;
unsigned long phy_page;
};

#define IHK_DUMP_PAGE_SET_INCOMPLETE 0
#define IHK_DUMP_PAGE_SET_COMPLETED 1
#define DUMP_LEVEL_ALL 0
#define DUMP_LEVEL_USER_UNUSED_EXCLUDE 24

/*
* smp_boot_param holds various boot time arguments.
* The layout in the memory is the following:
Expand Down
7 changes: 7 additions & 0 deletions linux/driver/smp/arch/arm64/smp-arch-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,13 @@ int smp_ihk_os_dump(ihk_os_t ihk_os, void *priv, dumpargs_t *args)
}
break;

case DUMP_NMI_CONT:
if (os->param->dump_page_set.completion_flag ==
IHK_DUMP_PAGE_SET_COMPLETED) {
smp_ihk_os_send_nmi(ihk_os, priv, 4);
}
break;

case DUMP_QUERY_NUM_MEM_AREAS:
args->size = get_dump_num_mem_areas(os);
break;
Expand Down
7 changes: 7 additions & 0 deletions linux/driver/smp/arch/x86_64/smp-arch-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,13 @@ int smp_ihk_os_dump(ihk_os_t ihk_os, void *priv, dumpargs_t *args)
}
break;

case DUMP_NMI_CONT:
if (os->param->dump_page_set.completion_flag ==
IHK_DUMP_PAGE_SET_COMPLETED) {
smp_ihk_os_send_nmi(ihk_os, priv, 4);
}
break;

case DUMP_QUERY_NUM_MEM_AREAS:
args->size = get_dump_num_mem_areas(os);

Expand Down
1 change: 1 addition & 0 deletions linux/include/ihk/ihk_host_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ typedef struct dumpargs_s {
#define DUMP_QUERY_NUM_MEM_AREAS 7
#define DUMP_QUERY_MEM_AREAS 8
#define DUMP_QUERY_PHYS_START 9
#define DUMP_NMI_CONT 10
unsigned int level;
#define DUMP_LEVEL_ALL 0
#define DUMP_LEVEL_USER_UNUSED_EXCLUDE 24
Expand Down

0 comments on commit f0ef7f6

Please sign in to comment.