ACRN:hv: Fix vcpu_dumpreg command hang issue

In ACRN RT VM if the lapic is passthrough to the guest, the ipi can't
trigger VM_EXIT and the vNMI is just for notification, it can't handle
the smp_call function. Modify vcpu_dumpreg function prompt user switch
to vLAPIC mode for vCPU register dump.

Tracked-On: #6473
Signed-off-by: Liu Long <long.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Liu Long 2021-08-24 15:58:05 +08:00 committed by wenlingz
parent 0980420aea
commit 31598ae895
1 changed files with 6 additions and 0 deletions

View File

@ -834,6 +834,12 @@ static int32_t shell_vcpu_dumpreg(int32_t argc, char **argv)
goto out;
}
if (is_lapic_pt_enabled(vcpu)) {
shell_puts("Please switch to vlapic mode for vcpu register dump!\r\n");
status = 0;
goto out;
}
pcpu_id = pcpuid_from_vcpu(vcpu);
dump.vcpu = vcpu;
dump.str = shell_log_buf;