HV: fix bug "vmexit" cmd cause HV console hung

on KBL-NUC when input "vmexit" in hypervisor console,
the console or HV/SOS could be hung, the root cause is:
the log buffer is overflow for 8 CPU cores info.

to resolve the issue:
1. increase the shell log buffer size according to the
physical CPU max number
2. check the snprintf return value, if no buffer left,
just return.

Tracked-On: #1587
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Minggui Cao
2018-10-31 11:38:07 +08:00
committed by lijinxia
parent 0255e62798
commit b048835c45
3 changed files with 31 additions and 12 deletions

View File

@@ -245,7 +245,7 @@ struct vcpu {
struct vcpu_dump {
struct vcpu *vcpu;
char *str;
int str_max;
uint32_t str_max;
};
static inline bool is_vcpu_bsp(const struct vcpu *vcpu)