From 2c43415903c4932b479dfd91a4227100e873bcf6 Mon Sep 17 00:00:00 2001 From: Liu Long Date: Tue, 24 Aug 2021 15:58:05 +0800 Subject: [PATCH] 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 Acked-by: Eddie Dong --- hypervisor/debug/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hypervisor/debug/shell.c b/hypervisor/debug/shell.c index d360507b0..ad34191d1 100644 --- a/hypervisor/debug/shell.c +++ b/hypervisor/debug/shell.c @@ -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;