Skip to content

Commit c167df0

Browse files
author
Jinrong Liang
committed
KVM: x86/PVM: Provide exit reason for PVM VM entry fails
Extend pvm_get_exit_info() to provide the exit reason when PVM VM entry fails. This change improves handling of failed VM entry scenarios, thus increasing overall robustness and reliability of virtual machines. Suggested-by: Lai Jiangshan <jiangshan.ljs@antgroup.com> Signed-off-by: Jinrong Liang <cloudliang@tencent.com>
1 parent 7443b05 commit c167df0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/x86/kvm/pvm/pvm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,6 +2481,8 @@ static void pvm_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason, u64 *info1, u6
24812481
else if (pvm->exit_vector >= FIRST_EXTERNAL_VECTOR &&
24822482
pvm->exit_vector < NR_VECTORS)
24832483
*reason = PVM_EXIT_REASONS_INTERRUPT;
2484+
else if (pvm->exit_vector == SWITCH_EXIT_REASONS_FAILED_VMETNRY)
2485+
*reason = PVM_FAILED_VMENTRY_VECTOR;
24842486
else
24852487
*reason = pvm->exit_vector;
24862488
*info1 = pvm->exit_vector;

0 commit comments

Comments
 (0)