From a9ee6da0d92fa4d9a619793f254c3a357bae39ce Mon Sep 17 00:00:00 2001 From: Jason Chen CJ Date: Tue, 22 May 2018 15:34:32 +0800 Subject: [PATCH] vm: remove current_vcpu from vm structure current_vcpu is not correct when there are multi vcpus in one VM, using it is in-correct, so remove it. Signed-off-by: Jason Chen CJ --- hypervisor/arch/x86/vmexit.c | 3 --- hypervisor/include/arch/x86/guest/vm.h | 1 - 2 files changed, 4 deletions(-) diff --git a/hypervisor/arch/x86/vmexit.c b/hypervisor/arch/x86/vmexit.c index f5b47121e..7fc22f8fd 100644 --- a/hypervisor/arch/x86/vmexit.c +++ b/hypervisor/arch/x86/vmexit.c @@ -186,9 +186,6 @@ int vmexit_handler(struct vcpu *vcpu) exec_vmread(VMX_EXIT_QUALIFICATION); } - /* Update current vcpu in VM that caused vm exit */ - vcpu->vm->current_vcpu = vcpu; - /* exit dispatch handling */ if (basic_exit_reason == VMX_EXIT_REASON_EXTERNAL_INTERRUPT) { /* Handling external_interrupt diff --git a/hypervisor/include/arch/x86/guest/vm.h b/hypervisor/include/arch/x86/guest/vm.h index b84e3710f..ca4b7da40 100644 --- a/hypervisor/include/arch/x86/guest/vm.h +++ b/hypervisor/include/arch/x86/guest/vm.h @@ -132,7 +132,6 @@ struct vm { struct vm_pm_info pm; /* Reference to this VM's arch information */ struct vm_arch arch_vm; /* Reference to this VM's arch information */ enum vm_state state; /* VM state */ - struct vcpu *current_vcpu; /* VCPU that caused vm exit */ void *vuart; /* Virtual UART */ struct vpic *vpic; /* Virtual PIC */ uint32_t vpic_wire_mode;