]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
tests/xen-access: disable CR4 write events on application exit
authorRazvan Cojocaru <rcojocaru@bitdefender.com>
Mon, 29 Jan 2018 21:48:24 +0000 (23:48 +0200)
committerWei Liu <wei.liu2@citrix.com>
Tue, 6 Feb 2018 16:45:40 +0000 (16:45 +0000)
On exit, xen-access did not unsubscribe from CR4 write vm_events,
potentially leaving the guest stuck.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
tools/tests/xen-access/xen-access.c

index 9d960e21092cee91e62e63b71b2a9397639ad847..a081168dea8588552816c31a3425b5853d12fb37 100644 (file)
@@ -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);