diff --git a/cokernel/smp/arm64/bootparam.h b/cokernel/smp/arm64/bootparam.h index 28990dcd..ae0b0827 100644 --- a/cokernel/smp/arm64/bootparam.h +++ b/cokernel/smp/arm64/bootparam.h @@ -55,9 +55,6 @@ 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; @@ -65,6 +62,12 @@ struct ihk_dump_page_set { 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: diff --git a/cokernel/smp/x86_64/bootparam.h b/cokernel/smp/x86_64/bootparam.h index d0568c25..f907c25c 100644 --- a/cokernel/smp/x86_64/bootparam.h +++ b/cokernel/smp/x86_64/bootparam.h @@ -60,9 +60,6 @@ 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; @@ -70,6 +67,11 @@ struct ihk_dump_page_set { 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: diff --git a/linux/driver/smp/arch/arm64/smp-arch-driver.c b/linux/driver/smp/arch/arm64/smp-arch-driver.c index a6d9b2e5..63758add 100644 --- a/linux/driver/smp/arch/arm64/smp-arch-driver.c +++ b/linux/driver/smp/arch/arm64/smp-arch-driver.c @@ -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; diff --git a/linux/driver/smp/arch/x86_64/smp-arch-driver.c b/linux/driver/smp/arch/x86_64/smp-arch-driver.c index 6317f0d6..0aff5849 100644 --- a/linux/driver/smp/arch/x86_64/smp-arch-driver.c +++ b/linux/driver/smp/arch/x86_64/smp-arch-driver.c @@ -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); diff --git a/linux/include/ihk/ihk_host_user.h b/linux/include/ihk/ihk_host_user.h index 65a14b78..51256a9f 100644 --- a/linux/include/ihk/ihk_host_user.h +++ b/linux/include/ihk/ihk_host_user.h @@ -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