aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tests/mem-sharing/memshrtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tests/mem-sharing/memshrtool.c')
-rw-r--r--tools/tests/mem-sharing/memshrtool.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/tests/mem-sharing/memshrtool.c b/tools/tests/mem-sharing/memshrtool.c
index a5dfc24f94..db44294230 100644
--- a/tools/tests/mem-sharing/memshrtool.c
+++ b/tools/tests/mem-sharing/memshrtool.c
@@ -27,6 +27,7 @@ static int usage(const char* prog)
printf(" add-to-physmap <domid> <gfn> <source> <source-gfn> <source-handle>\n");
printf(" - Populate a page in a domain with a shared page.\n");
printf(" debug-gfn <domid> <gfn> - Debug a particular domain and gfn.\n");
+ printf(" audit - Audit the sharing subsytem in Xen.\n");
return 1;
}
@@ -160,6 +161,16 @@ int main(int argc, const char** argv)
gfn = strtol(argv[3], NULL, 0);
R(xc_memshr_debug_gfn(xch, domid, gfn));
}
+ else if( !strcasecmp(cmd, "audit") )
+ {
+ int rc = xc_memshr_audit(xch);
+ if ( rc < 0 )
+ {
+ printf("error executing xc_memshr_audit: %s\n", strerror(errno));
+ return rc;
+ }
+ printf("Audit returned %d errors.\n", rc);
+ }
return 0;
}