Skip to contentSkip to conversation

svm: Fixed error code comparison in test npt_rsvd_pfwalk

PATCH Applied Cathy Avery 2 participants 2 messages Oct 3, 2019 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 svm: Fixed error code comparison in test npt_rsvd_pfwalk

According to the AMD64 spec Bit 3 (RSV) in exitinfo1 should be set to 1 if reserved bits were set in the corresponding nested page table entry. Exitinfo1 should be checking against error code 0x20000000eULL not 0x200000006ULL.

---
 x86/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/svm.c +1 -1
index bc74e7c..bb39934 100644
@@ -1066,7 +1066,7 @@ static bool npt_rsvd_pfwalk_check(struct test *test)
     pdpe[0] &= ~(1ULL << 8);
 
     return (test->vmcb->control.exit_code == SVM_EXIT_NPF)
-            && (test->vmcb->control.exit_info_1 == 0x200000006ULL);
+            && (test->vmcb->control.exit_info_1 == 0x20000000eULL);
 }
 
 static void npt_l1mmio_prepare(struct test *test)
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 16 lines · Cathy Avery

According to the AMD64 spec Bit 3 (RSV) in exitinfo1 should be set to 1 if reserved bits were set in the corresponding nested page table entry. Exitinfo1 should be checking against error code 0x20000000eULL not 0x200000006ULL.

---
 x86/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/svm.c +0 -0
index bc74e7c..bb39934 100644

x86/svm.c static bool npt_rsvd_pfwalk_check(struct test *test) · line 1072

Quoted 8 lines
x86/svm.c +1 -1
@@ -1066,7 +1066,7 @@ static bool npt_rsvd_pfwalk_check(struct test *test)
     pdpe[0] &= ~(1ULL << 8);
 
     return (test->vmcb->control.exit_code == SVM_EXIT_NPF)
-            && (test->vmcb->control.exit_info_1 == 0x200000006ULL);
+            && (test->vmcb->control.exit_info_1 == 0x20000000eULL);
 }
 
 static void npt_l1mmio_prepare(struct test *test)

Queued, thanks.

Paolo