]> xenbits.xensource.com Git - people/larsk/xen.git/commitdiff
x86/HVM: ignore guest INVD uses
authorJan Beulich <jbeulich@suse.com>
Tue, 3 Sep 2019 12:49:20 +0000 (14:49 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Sep 2019 12:49:20 +0000 (14:49 +0200)
The only place we'd expect the insn to be sensibly used is in
(virtualization unaware) firmware.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/emulate.c

index b61faf704b4a315787cfa0c25e463fdf820be3d5..7cd727ab97410ee984e44a634441ea1c518f3eb9 100644 (file)
@@ -2210,11 +2210,18 @@ static int hvmemul_cache_op(
 
         hvmemul_unmap_linear_addr(mapping, addr, 0, hvmemul_ctxt);
         /* fall through */
-    case x86emul_invd:
     case x86emul_wbinvd:
     case x86emul_wbnoinvd:
         alternative_vcall(hvm_funcs.wbinvd_intercept);
         break;
+
+    case x86emul_invd:
+        /*
+         * Deliberately ignored: We mustn't issue INVD, and issuing WBINVD
+         * wouldn't match the request. And the only place we'd expect the insn
+         * to be sensibly used is in (virtualization unaware) firmware.
+         */
+        break;
     }
 
     return X86EMUL_OKAY;