mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 00:38:28 +00:00
hv:Replace dynamic memory with static for sbuf
--Config LOG_BUF_SIZE 256KB for per cpu --Replace 'calloc' with static array for sbuf --Rename 'alloc_earlylog_sbuf' to 'init_earlylog_sbuf' --Remove deadcode sbuf_free v2-->v3: -- put the buffer into per_cpu data structure v1-->v2: -- add 'is_early_logbuf' in percpu data structure used for check if need to do 'do_copy_earlylog' Tracked-On: #861 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Yan, Like <like.yan@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -24,6 +24,9 @@ struct per_cpu_region {
|
||||
uint8_t vmxon_region[CPU_PAGE_SIZE];
|
||||
#ifdef HV_DEBUG
|
||||
uint64_t *sbuf[ACRN_SBUF_ID_MAX];
|
||||
char logbuf[LOG_MESSAGE_MAX_SIZE];
|
||||
bool is_early_logbuf;
|
||||
char early_logbuf[CONFIG_LOG_BUF_SIZE];
|
||||
uint64_t vmexit_cnt[64];
|
||||
uint64_t vmexit_time[64];
|
||||
uint32_t npk_log_ref;
|
||||
@@ -31,7 +34,6 @@ struct per_cpu_region {
|
||||
uint64_t irq_count[NR_IRQS];
|
||||
uint64_t softirq_pending;
|
||||
uint64_t spurious;
|
||||
struct shared_buf *earlylog_sbuf;
|
||||
void *vcpu;
|
||||
void *ever_run_vcpu;
|
||||
#ifdef STACK_PROTECTOR
|
||||
@@ -47,7 +49,6 @@ struct per_cpu_region {
|
||||
uint8_t df_stack[CONFIG_STACK_SIZE] __aligned(16);
|
||||
uint8_t sf_stack[CONFIG_STACK_SIZE] __aligned(16);
|
||||
uint8_t stack[CONFIG_STACK_SIZE] __aligned(16);
|
||||
char logbuf[LOG_MESSAGE_MAX_SIZE];
|
||||
uint32_t lapic_id;
|
||||
uint32_t lapic_ldr;
|
||||
struct smp_call_info_data smp_call_info;
|
||||
|
Reference in New Issue
Block a user