[PATCH v1 2/2] HV: Remove dead code wrapped by #if 0 #if


Kaige Fu
 

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
---
hypervisor/arch/x86/vmexit.c | 21 ---------------------
1 file changed, 21 deletions(-)

diff --git a/hypervisor/arch/x86/vmexit.c b/hypervisor/arch/x86/vmexit.c
index 15b7838..32bf07e 100644
--- a/hypervisor/arch/x86/vmexit.c
+++ b/hypervisor/arch/x86/vmexit.c
@@ -382,12 +382,6 @@ int cr_access_vmexit_handler(struct vcpu *vcpu)
/* mov from cr3 */
read_cr3(vcpu, regptr);
break;
-#if 0
- case 0x14:
- /* mov from cr4 (this should not happen) */
- case 0x10:
- /* mov from cr0 (this should not happen) */
-#endif
case 0x08:
/* mov to cr8 */
vlapic_set_cr8(vcpu->arch_vcpu.vlapic, *regptr);
@@ -410,21 +404,6 @@ int cr_access_vmexit_handler(struct vcpu *vcpu)
return 0;
}

-#if 0
-/*
- * VMX_PROCBASED_CTLS_INVLPG is not enabled in the VM-execution
- * control therefore we don't need it's handler.
- *
- * INVLPG: this instruction Invalidates any translation lookaside buffer
- */
-int invlpg_handler(__unused struct vcpu *vcpu)
-{
- pr_fatal("INVLPG executed");
-
- return 0;
-}
-#endif
-
/*
* XSETBV instruction set's the XCR0 that is used to tell for which
* components states can be saved on a context switch using xsave.
--
2.7.4