vmware_vmss: make vmss global

It will allow to initialize and to use vmss from outside.
Also move some useful macros to vmware_vmss.h file.

This is a preparation for the following commit to extend vmss
functionality.

Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
This commit is contained in:
Alexey Makhalov 2020-10-12 12:37:50 -07:00 committed by Kazuhito Hagio
parent a5e1aeb864
commit e50c006dcc
2 changed files with 9 additions and 7 deletions

View File

@ -23,13 +23,7 @@
#define LOGPRX "vmw: " #define LOGPRX "vmw: "
/* VMware only supports X86/X86_64 virtual machines. */ vmssdata vmss = { 0 };
#define VMW_PAGE_SIZE (4096)
#define VMW_PAGE_SHIFT (12)
#define MAX_BLOCK_DUMP (128)
static vmssdata vmss = { 0 };
int int
is_vmware_vmss(char *filename) is_vmware_vmss(char *filename)

View File

@ -165,6 +165,14 @@ struct vmssdata {
}; };
typedef struct vmssdata vmssdata; typedef struct vmssdata vmssdata;
/* VMware only supports X86/X86_64 virtual machines. */
#define VMW_PAGE_SIZE (4096)
#define VMW_PAGE_SHIFT (12)
#define MAX_BLOCK_DUMP (128)
extern vmssdata vmss;
#define DEBUG_PARSE_PRINT(x) \ #define DEBUG_PARSE_PRINT(x) \
do { \ do { \
if (CRASHDEBUG(1)) { \ if (CRASHDEBUG(1)) { \