From 11ce930421ba8b534024f6695dff8fdfd7e47ff0 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 3 Jul 2021 14:41:09 -0700 Subject: support AMD `sev_snp` --- test/long_mode/mod.rs | 8 ++++++++ test/protected_mode/mod.rs | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'test') diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs index 6a45b38..4d44694 100644 --- a/test/long_mode/mod.rs +++ b/test/long_mode/mod.rs @@ -3329,6 +3329,14 @@ fn test_tsxldtrk() { test_display(&[0xf2, 0x0f, 0x01, 0xe9], "xresldtrk"); } +#[test] +fn test_sevsnp() { + test_display(&[0xf3, 0x0f, 0x01, 0xff], "psmash"); + test_display(&[0xf2, 0x0f, 0x01, 0xff], "pvalidate"); + test_display(&[0xf3, 0x0f, 0x01, 0xfe], "rmpadjust"); + test_display(&[0xf2, 0x0f, 0x01, 0xfe], "rmpupdate"); +} + // some test cases are best just lifted from llvm or gcc. #[test] fn from_llvm() { diff --git a/test/protected_mode/mod.rs b/test/protected_mode/mod.rs index 90b53a6..c742516 100644 --- a/test/protected_mode/mod.rs +++ b/test/protected_mode/mod.rs @@ -3026,6 +3026,14 @@ fn test_tsxldtrk() { test_display(&[0xf2, 0x0f, 0x01, 0xe9], "xresldtrk"); } +#[test] +fn test_sevsnp() { + test_display(&[0xf3, 0x0f, 0x01, 0xff], "psmash"); + test_display(&[0xf2, 0x0f, 0x01, 0xff], "pvalidate"); + test_display(&[0xf3, 0x0f, 0x01, 0xfe], "rmpadjust"); + test_display(&[0xf2, 0x0f, 0x01, 0xfe], "rmpupdate"); +} + // some test cases are best just lifted from llvm or gcc. #[test] fn from_llvm() { -- cgit v1.1