Skip to content

Commit

Permalink
Merge pull request #12 from yuandengliang/fix_access_no_pte
Browse files Browse the repository at this point in the history
do not performen check if there is no pte
  • Loading branch information
wenlingz committed Oct 10, 2019
2 parents 1ba40a3 + 5b954be commit 8b8e043
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions guest/x86/access.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,11 @@ static int ac_test_do_access(ac_test_t *at)
"unexpected access");
ac_test_check(at, &success, fault && e != at->expected_error,
"error code %x expected %x", e, at->expected_error);
ac_test_check(at, &success, at->ptep && *at->ptep != at->expected_pte,
if (at->ptep) {
ac_test_check(at, &success, at->ptep && *at->ptep != at->expected_pte,
"pte %x expected %x", *at->ptep, at->expected_pte);
}

ac_test_check(at, &success,
!pt_match(*at->pdep, at->expected_pde, at->ignore_pde),
"pde %x expected %x", *at->pdep, at->expected_pde);
Expand Down Expand Up @@ -1001,7 +1004,6 @@ int main(void)

cpuid_7_ebx = cpuid(7).b;
cpuid_7_ecx = cpuid(7).c;

printf("starting test\n\n");
page_table_levels = 4;
r = ac_test_run();
Expand Down

0 comments on commit 8b8e043

Please sign in to comment.