hv: debug: Add hv console callback to VM-exit event

In some scenarios (e.g., nested) where lapic-pt is enabled for a vcpu
running on a pcpu hosting console timer, the hv console will be
inaccessible.

This patch adds the console callback to every VM-exit event so that the
console can still be somewhat functional under such circumstance.

Since this is VM-exit driven, the VM-exit/second can be low in certain
cases (e.g., idle or running stress workload). In extreme cases where
the guest panics/hangs, there will be no VM-exits at all.

In most cases, the shell is laggy but functional (probably enough for
debugging purpose).

Tracked-On: #6312
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
This commit is contained in:
Yifan Liu
2021-07-16 15:09:00 +08:00
committed by wenlingz
parent e235d68526
commit 69fef2e685
4 changed files with 28 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ void suspend_console(void) {}
void resume_console(void) {}
bool handle_dbg_cmd(__unused const char *cmd, __unused int32_t len) { return false; }
void console_vmexit_callback(__unused struct acrn_vcpu *vcpu) {}
void shell_init(void) {}
void shell_kick(void) {}