From: Tamas K Lengyel <tamas@tklengyel.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: wei.liu2@citrix.com, Ian Jackson <ian.jackson@eu.citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tests/xen-access: disable CR4 write events on application exit
Date: Mon, 29 Jan 2018 14:01:45 -0700 [thread overview]
Message-ID: <CABfawh=j6f-WafkaoXWh81zKbTdC-ii=jS-HPgabMdJ772gxgA@mail.gmail.com> (raw)
In-Reply-To: <5b61a735-5988-20de-0f7e-caeb7efed4fe@bitdefender.com>
On Mon, Jan 29, 2018 at 11:03 AM, Razvan Cojocaru
<rcojocaru@bitdefender.com> wrote:
> On 01/29/2018 07:58 PM, Tamas K Lengyel wrote:
>> On Mon, Jan 29, 2018 at 10:10 AM, Razvan Cojocaru
>> <rcojocaru@bitdefender.com> wrote:
>>> 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>
>>> ---
>>> 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.
Just to keep things clean I would appreciate that.
Thanks,
Tamas
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
prev parent reply other threads:[~2018-01-29 21:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 17:10 [PATCH] tests/xen-access: disable CR4 write events on application exit Razvan Cojocaru
2018-01-29 17:58 ` Tamas K Lengyel
2018-01-29 18:03 ` Razvan Cojocaru
2018-01-29 21:01 ` Tamas K Lengyel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABfawh=j6f-WafkaoXWh81zKbTdC-ii=jS-HPgabMdJ772gxgA@mail.gmail.com' \
--to=tamas@tklengyel.com \
--cc=ian.jackson@eu.citrix.com \
--cc=rcojocaru@bitdefender.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).