The exitinfo values were plain wrong for the page-walk tests
(including npt_rsvd), or else they were missing bits 32:33.
Expect the right values.

Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
 x86/svm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/x86/svm.c b/x86/svm.c
index 00b3191..c4d6d94 100644
--- a/x86/svm.c
+++ b/x86/svm.c
@@ -703,7 +703,7 @@ static bool npt_nx_check(struct test *test)
     test->vmcb->save.efer |= (1 << 11);
 
     return (test->vmcb->control.exit_code == SVM_EXIT_NPF)
-           && (test->vmcb->control.exit_info_1 == 0x15);
+           && (test->vmcb->control.exit_info_1 == 0x100000015ULL);
 }
 
 static void npt_us_prepare(struct test *test)
@@ -728,7 +728,7 @@ static bool npt_us_check(struct test *test)
     *pte |= (1ULL << 2);
 
     return (test->vmcb->control.exit_code == SVM_EXIT_NPF)
-           && (test->vmcb->control.exit_info_1 == 0x05);
+           && (test->vmcb->control.exit_info_1 == 0x100000005ULL);
 }
 
 static void npt_rsvd_prepare(struct test *test)
@@ -744,7 +744,7 @@ static bool npt_rsvd_check(struct test *test)
     pdpe[0] &= ~(1ULL << 8);
 
     return (test->vmcb->control.exit_code == SVM_EXIT_NPF)
-            && (test->vmcb->control.exit_info_1 == 0x0f);
+            && (test->vmcb->control.exit_info_1 == 0x200000006ULL);
 }
 
 static void npt_rw_prepare(struct test *test)
@@ -772,7 +772,7 @@ static bool npt_rw_check(struct test *test)
     *pte |= (1ULL << 1);
 
     return (test->vmcb->control.exit_code == SVM_EXIT_NPF)
-           && (test->vmcb->control.exit_info_1 == 0x07);
+           && (test->vmcb->control.exit_info_1 == 0x100000007ULL);
 }
 
 static void npt_pfwalk_prepare(struct test *test)
@@ -793,7 +793,7 @@ static bool npt_pfwalk_check(struct test *test)
     *pte |= (1ULL << 1);
 
     return (test->vmcb->control.exit_code == SVM_EXIT_NPF)
-           && (test->vmcb->control.exit_info_1 == 0x7)
+           && (test->vmcb->control.exit_info_1 == 0x200000006ULL)
           && (test->vmcb->control.exit_info_2 == read_cr3());
 }
 
-- 
1.8.3.1


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to