From: Razvan Cojocaru Date: Mon, 29 Jan 2018 21:48:24 +0000 (+0200) Subject: tests/xen-access: disable CR4 write events on application exit X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~624 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d87cfb59b42832920f4cf3392dccfa5b8736b699;p=xen.git tests/xen-access: disable CR4 write events on application exit On exit, xen-access did not unsubscribe from CR4 write vm_events, potentially leaving the guest stuck. Signed-off-by: Razvan Cojocaru Acked-by: Tamas K Lengyel --- diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c index 9d960e2109..a081168dea 100644 --- a/tools/tests/xen-access/xen-access.c +++ b/tools/tests/xen-access/xen-access.c @@ -654,6 +654,8 @@ int main(int argc, char *argv[]) rc = xc_monitor_cpuid(xch, domain_id, 0); if ( desc_access ) rc = xc_monitor_descriptor_access(xch, domain_id, 0); + if ( write_ctrlreg_cr4 ) + rc = xc_monitor_write_ctrlreg(xch, domain_id, VM_EVENT_X86_CR4, 0, 0, 0, 0); if ( privcall ) rc = xc_monitor_privileged_call(xch, domain_id, 0);