[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] tests/xen-access: disable CR4 write events on application exit



On 01/29/2018 07:58 PM, Tamas K Lengyel wrote:
> On Mon, Jan 29, 2018 at 10:10 AM, Razvan Cojocaru
> <rcojocaru@xxxxxxxxxxxxxxx> wrote:
>> On exit, xen-access did not unsubscribe from CR4 write vm_events,
>> potentially leaving the guest stuck.
>>
>> Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
>> ---
>>  tools/tests/xen-access/xen-access.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/tools/tests/xen-access/xen-access.c 
>> b/tools/tests/xen-access/xen-access.c
>> index 9d960e2..c572550 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, 1, 0, 1);
> 
> Any reason for the sync and onchangeonly parts to be set to 1 here? I
> don't think it has any effect when you are disabling an event.

Nope, they don't matter at all. I've just copied the "enable" line,
removed the mask so that the line would not go beyond 80 columns and
kept the rest as it was.

If the parameter after the index (VM_EVENT_X86_CR4) is 0, the others
don't matter.

But I can set them all to 0 if you prefer.


Thanks,
Razvan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.