From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Cc: mdontu@bitdefender.com, tim@xen.org, JBeulich@suse.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH RFC V2 5/6] xen, libxc: Request page fault injection via libxc
Date: Thu, 17 Jul 2014 15:07:41 +0300 [thread overview]
Message-ID: <53C7BC8D.5080407@bitdefender.com> (raw)
In-Reply-To: <1405598011.29996.23.camel@kazak.uk.xensource.com>
On 07/17/2014 02:53 PM, Ian Campbell wrote:
> On Fri, 2014-07-11 at 19:06 +0100, Andrew Cooper wrote:
>> On 11/07/14 16:43, Razvan Cojocaru wrote:
>>> Added new XEN_DOMCTL_set_pagefault_info hypercall, used by libxc's
>>> new xc_domain_set_pagefault_info() function to set per-domain page
>>> fault injection information. All a call does is set per-domain info,
>>> and nothing actually happens until VMENTRY time, and then only if
>>> all conditions are met (the guest is in user mode, the set value
>>> matches CR3, and there are no other pending traps).
>>> This mechanism allows bringing in swapped-out pages for inspection.
>>>
>>> Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
>>
>> For the record, I still think this is a bad idea to be working against a
>> guest OS paging algorithm, and I am uneasy about whether it is sensible
>> to introduce abilities like that into the Xen API.
>
> Indeed.
>
> From the tools side the new libxc function is a correct wrapping of the
> underlying hypercall, so if/when the hypervisor maintainers are happy
> with the interface it's fine by me, with one minor comment.
Thanks for the review!
>>> +int xc_domain_set_pagefault_info(xc_interface *xch,
>>> + uint32_t domid,
>>> + xen_domctl_set_pagefault_info_t *info)
>>> +{
>>> + DECLARE_DOMCTL;
>>> +
>>> + if (info == NULL)
>>> + return -1;
>>> +
>>> + domctl.cmd = XEN_DOMCTL_set_pagefault_info;
>>> + domctl.domain = (domid_t)domid;
>>> + domctl.u.set_pagefault_info.address_space = info->address_space;
>>> + domctl.u.set_pagefault_info.virtual_address = info->virtual_address;
>>> + domctl.u.set_pagefault_info.write_access = info->write_access;
>
> Aren't these three lines just "domctl.u.set_pagefault_info = *info;"?
Yes, they are. I'll change that to the reader-friendlier one-liner.
Thanks,
Razvan Cojocaru
next prev parent reply other threads:[~2014-07-17 12:07 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 15:43 [PATCH RFC V2 1/6] xen: Emulate with no writes Razvan Cojocaru
2014-07-11 15:43 ` [PATCH RFC V2 2/6] xen: Optimize introspection access to guest state Razvan Cojocaru
2014-07-11 16:54 ` Andrew Cooper
2014-07-11 16:57 ` Andrew Cooper
2014-07-11 18:03 ` Razvan Cojocaru
2014-07-11 18:09 ` Andrew Cooper
2014-07-11 15:43 ` [PATCH RFC V2 3/6] xen: Force-enable relevant MSR events; optimize the number of sent MSR events Razvan Cojocaru
2014-07-11 17:03 ` Andrew Cooper
2014-07-11 18:09 ` Razvan Cojocaru
[not found] ` <CAGU+ausrcu=L7Kf30gZJXRnnxrKe7EMYXTGByOY4agwoK0nXeA@mail.gmail.com>
2014-07-11 18:18 ` Aravindh Puthiyaparambil (aravindp)
2014-07-11 18:19 ` Andrew Cooper
2014-07-11 18:22 ` Razvan Cojocaru
2014-07-11 18:29 ` Andrew Cooper
2014-07-11 15:43 ` [PATCH RFC V2 4/6] xen: Support for VMCALL mem_events Razvan Cojocaru
2014-07-11 17:23 ` Andrew Cooper
2014-07-11 18:15 ` Razvan Cojocaru
2015-03-17 13:50 ` Razvan Cojocaru
2015-03-17 13:58 ` Jan Beulich
2015-03-17 14:07 ` Razvan Cojocaru
2015-03-17 14:20 ` Jan Beulich
2015-03-17 14:33 ` Razvan Cojocaru
2014-07-11 15:43 ` [PATCH RFC V2 5/6] xen, libxc: Request page fault injection via libxc Razvan Cojocaru
2014-07-11 18:06 ` Andrew Cooper
2014-07-17 11:53 ` Ian Campbell
2014-07-17 12:07 ` Razvan Cojocaru [this message]
2014-07-17 12:22 ` Razvan Cojocaru
2014-07-17 12:38 ` Andrew Cooper
2014-07-11 15:43 ` [PATCH RFC V2 6/6] xen: Handle resumed instruction based on previous mem_event reply Razvan Cojocaru
2014-07-11 18:36 ` Andrew Cooper
2014-07-11 18:41 ` Razvan Cojocaru
2014-07-11 19:12 ` Andrew Cooper
2014-07-11 16:23 ` [PATCH RFC V2 1/6] xen: Emulate with no writes Andrew Cooper
2014-07-11 18:00 ` Razvan Cojocaru
2014-07-14 8:37 ` Razvan Cojocaru
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=53C7BC8D.5080407@bitdefender.com \
--to=rcojocaru@bitdefender.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=mdontu@bitdefender.com \
--cc=tim@xen.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.