mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 07:35:31 +00:00
dump vcpu registers on correct vcpu
after updated cpu context get/set method, the vcpu_dumreg cmd is not correct anymore as the registers may read from VMCS but meantime hv shell may not be running on target vcpu. this patch take use of smp_call_function for vcpu dumpreg and make the dump always come from correct vcpu. v2: - use str pointer to get vcpu_dumpreg context instead of print out directly in notify handler. Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -248,6 +248,12 @@ struct vcpu {
|
||||
uint64_t reg_updated;
|
||||
};
|
||||
|
||||
struct vcpu_dump {
|
||||
struct vcpu *vcpu;
|
||||
char *str;
|
||||
int str_max;
|
||||
};
|
||||
|
||||
#define is_vcpu_bsp(vcpu) ((vcpu)->vcpu_id == BOOT_CPU_ID)
|
||||
/* do not update Guest RIP for next VM Enter */
|
||||
static inline void vcpu_retain_rip(struct vcpu *vcpu)
|
||||
@@ -289,6 +295,7 @@ int prepare_vcpu(struct vm *vm, uint16_t pcpu_id);
|
||||
|
||||
void request_vcpu_pre_work(struct vcpu *vcpu, uint16_t pre_work_id);
|
||||
|
||||
void vcpu_dumpreg(void *data);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user