Skip to content

Commit 7491b83

Browse files
KaigeFulijinxia
authored andcommitted
HV: Remove dead code wrapped by #if 0
Signed-off-by: Kaige Fu <kaige.fu@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
1 parent 39cce18 commit 7491b83

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

hypervisor/arch/x86/vmexit.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,6 @@ int cr_access_vmexit_handler(struct vcpu *vcpu)
296296
/* mov to cr4 */
297297
vmx_write_cr4(vcpu, *regptr);
298298
break;
299-
#if 0
300-
case 0x14:
301-
/* mov from cr4 (this should not happen) */
302-
case 0x10:
303-
/* mov from cr0 (this should not happen) */
304-
#endif
305299
case 0x08:
306300
/* mov to cr8 */
307301
vlapic_set_cr8(vcpu->arch_vcpu.vlapic, *regptr);
@@ -324,21 +318,6 @@ int cr_access_vmexit_handler(struct vcpu *vcpu)
324318
return 0;
325319
}
326320

327-
#if 0
328-
/*
329-
* VMX_PROCBASED_CTLS_INVLPG is not enabled in the VM-execution
330-
* control therefore we don't need it's handler.
331-
*
332-
* INVLPG: this instruction Invalidates any translation lookaside buffer
333-
*/
334-
int invlpg_handler(__unused struct vcpu *vcpu)
335-
{
336-
pr_fatal("INVLPG executed");
337-
338-
return 0;
339-
}
340-
#endif
341-
342321
/*
343322
* XSETBV instruction set's the XCR0 that is used to tell for which
344323
* components states can be saved on a context switch using xsave.

0 commit comments

Comments
 (0)