aboutsummaryrefslogtreecommitdiff
path: root/test/protected_mode/mod.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-05-19 05:36:55 +0000
committeriximeow <me@iximeow.net>2026-05-25 01:37:15 +0000
commite9b3973cbf689eac2ea11c2dacf6f2d8c2ce01c5 (patch)
tree1148265454a1d3a2fedf65a94e23137a1b64b0b4 /test/protected_mode/mod.rs
parent485851c914695e0884609c68e318d22fee1db9b8 (diff)
invept precision
Diffstat (limited to 'test/protected_mode/mod.rs')
-rw-r--r--test/protected_mode/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/protected_mode/mod.rs b/test/protected_mode/mod.rs
index 681184c..0ee8696 100644
--- a/test/protected_mode/mod.rs
+++ b/test/protected_mode/mod.rs
@@ -2628,6 +2628,12 @@ fn test_sha() {
#[test]
fn test_vmx() {
+ fn test_display_vmx(bytes: &[u8], text: &'static str) {
+ test_display_under(&InstDecoder::minimal().with_vmx(), bytes, text);
+ test_display_under(&InstDecoder::default(), bytes, text);
+ test_invalid_under(&InstDecoder::minimal(), bytes);
+ }
+
test_display(&[0x0f, 0xc7, 0x3f], "vmptrst qword [edi]");
test_display(&[0x0f, 0xc7, 0x37], "vmptrld qword [edi]");
test_display(&[0xf3, 0x0f, 0xc7, 0x37], "vmxon qword [edi]");
@@ -2638,6 +2644,10 @@ fn test_vmx() {
// test_invalid(&[0x66, 0x0f, 0xc7, 0x03]);
test_display(&[0x66, 0x0f, 0xc7, 0x33], "vmclear qword [ebx]");
test_display(&[0xf3, 0x0f, 0xc7, 0x33], "vmxon qword [ebx]");
+
+ // these need vmx and invept features
+ test_display_vmx(&[0x66, 0x0f, 0x38, 0x80, 0x01], "invept eax, xmmword [ecx]");
+ test_display_vmx(&[0x66, 0x0f, 0x38, 0x81, 0x01], "invvpid eax, xmmword [ecx]");
}
#[test]