Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx> --- x86/asyncpf.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/x86/asyncpf.c b/x86/asyncpf.c index 5d269f7346159..304d015888cfd 100644 --- a/x86/asyncpf.c +++ b/x86/asyncpf.c @@ -37,7 +37,6 @@ volatile uint32_t apf_reason __attribute__((aligned(64))); char *buf; volatile uint64_t i; volatile uint64_t phys; -bool fail; static inline uint32_t get_apf_reason(void) { @@ -53,21 +52,21 @@ static void pf_isr(struct ex_regs *r) switch (reason) { case 0: - printf("unexpected #PF at %p\n", read_cr2()); - fail = true; + report("unexpected #PF at %p\n", false, read_cr2()); break; case KVM_PV_REASON_PAGE_NOT_PRESENT: phys = virt_to_phys_cr3(virt); install_pte(phys_to_virt(read_cr3()), 1, virt, phys, 0); write_cr3(read_cr3()); - printf("Got not present #PF token %x virt addr %p phys addr %p\n", read_cr2(), virt, phys); + report("Got not present #PF token %x virt addr %p phys addr %p\n", + true, read_cr2(), virt, phys); while(phys) { safe_halt(); /* enables irq */ irq_disable(); } break; case KVM_PV_REASON_PAGE_READY: - printf("Got present #PF token %x\n", read_cr2()); + report("Got present #PF token %x\n", true, read_cr2()); if ((uint32_t)read_cr2() == ~0) break; install_pte(phys_to_virt(read_cr3()), 1, virt, phys | PTE_PRESENT | PTE_WRITE, 0); @@ -75,8 +74,7 @@ static void pf_isr(struct ex_regs *r) phys = 0; break; default: - printf("unexpected async pf reason %d\n", reason); - fail = true; + report("unexpected async pf reason %d\n", false, reason); break; } } @@ -107,6 +105,5 @@ int main(int ac, char **av) } irq_disable(); - printf("%s\n", fail ? "FAIL" : "PASS"); - return fail; + return report_summary(); } -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html