[PATCH v2 02/11] HV: change INVD vmexit handler to trigger #ud


Yonghua Huang
 

From: Qian Wang <qian1.wang@intel.com>

hv: vmexit: change INVD vmexit handler to trigger #UD

Changed the vmexit handler of INVD instruction from
unhandled_vmexit_handler to undefined_vmexit_handler to meet our design.
Now INVD will trigger an #UD.

Signed-off-by: Qian Wang <qian1.wang@intel.com>
---
hypervisor/arch/x86/guest/vmexit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/arch/x86/guest/vmexit.c b/hypervisor/arch/x86/guest/vmexit.c
index dfab7ff4..7524d4f0 100644
--- a/hypervisor/arch/x86/guest/vmexit.c
+++ b/hypervisor/arch/x86/guest/vmexit.c
@@ -62,7 +62,7 @@ static const struct vm_exit_dispatch dispatch_table[NR_VMX_EXIT_REASONS] = {
[VMX_EXIT_REASON_HLT] = {
.handler = hlt_vmexit_handler},
[VMX_EXIT_REASON_INVD] = {
- .handler = unhandled_vmexit_handler},
+ .handler = undefined_vmexit_handler,},
[VMX_EXIT_REASON_INVLPG] = {
.handler = unhandled_vmexit_handler,},
[VMX_EXIT_REASON_RDPMC] = {
--
2.17.1