Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Razvan Cojocaru <rcojoc...@bitdefender.com> Cc: Tamas K Lengyel <ta...@tklengyel.com> Cc: Ian Jackson <ian.jack...@eu.citrix.com> Cc: Wei Liu <wei.l...@citrix.com> --- tools/tests/xen-access/xen-access.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c index f26e723..ef21d0d 100644 --- a/tools/tests/xen-access/xen-access.c +++ b/tools/tests/xen-access/xen-access.c @@ -333,8 +333,9 @@ void usage(char* progname) { fprintf(stderr, "Usage: %s [-m] <domain_id> write|exec", progname); #if defined(__i386__) || defined(__x86_64__) - fprintf(stderr, "|breakpoint|altp2m_write|altp2m_exec"); + fprintf(stderr, "|breakpoint"); #endif + fprintf(stderr, "|altp2m_write|altp2m_exec"); fprintf(stderr, "\n" "Logs first page writes, execs, or breakpoint traps that occur on the domain.\n" @@ -402,6 +403,7 @@ int main(int argc, char *argv[]) { breakpoint = 1; } +#endif else if ( !strcmp(argv[0], "altp2m_write") ) { default_access = XENMEM_access_rx; @@ -412,7 +414,6 @@ int main(int argc, char *argv[]) default_access = XENMEM_access_rw; altp2m = 1; } -#endif else { usage(argv[0]); @@ -485,12 +486,14 @@ int main(int argc, char *argv[]) goto exit; } +#if defined(__i386__) || defined(__x86_64__) rc = xc_monitor_singlestep( xch, domain_id, 1 ); if ( rc < 0 ) { ERROR("Error %d failed to enable singlestep monitoring!\n", rc); goto exit; } +#endif } if ( !altp2m ) @@ -540,7 +543,9 @@ int main(int argc, char *argv[]) rc = xc_altp2m_switch_to_view( xch, domain_id, 0 ); rc = xc_altp2m_destroy_view(xch, domain_id, altp2m_view_id); rc = xc_altp2m_set_domain_state(xch, domain_id, 0); +#if defined(__i386__) || defined(__x86_64__) rc = xc_monitor_singlestep(xch, domain_id, 0); +#endif } else { rc = xc_set_mem_access(xch, domain_id, XENMEM_access_rwx, ~0ull, 0); rc = xc_set_mem_access(xch, domain_id, XENMEM_access_rwx, START_PFN, @@ -695,9 +700,11 @@ int main(int argc, char *argv[]) exit: if ( altp2m ) { +#if defined(__i386__) || defined(__x86_64__) uint32_t vcpu_id; for ( vcpu_id = 0; vcpu_id<XEN_LEGACY_MAX_VCPUS; vcpu_id++) rc = control_singlestep(xch, domain_id, vcpu_id, 0); +#endif } /* Tear down domain xenaccess */ -- 2.8.3 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel