From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, "Dong, Eddie" <eddie.dong@intel.com>,
Jan Beulich <JBeulich@suse.com>,
Tamas K Lengyel <tamas.lengyel@zentific.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH RFC V9 4/5] xen, libxc: Request page fault injection via libxc
Date: Wed, 10 Sep 2014 13:49:20 +0300 [thread overview]
Message-ID: <54102CB0.30907@bitdefender.com> (raw)
In-Reply-To: <CAFLBxZY+vL8qndwgYjw35GcXNYbZRSTi8voOCed3GXqZH6io5g@mail.gmail.com>
On 09/10/14 13:39, George Dunlap wrote:
> On Wed, Sep 10, 2014 at 9:55 AM, Razvan Cojocaru
> <rcojocaru@bitdefender.com> wrote:
>> On 09/10/2014 11:48 AM, Andrew Cooper wrote:
>>> On 10/09/2014 09:09, Razvan Cojocaru wrote:
>>>> On 09/09/2014 09:38 PM, Tamas K Lengyel wrote:
>>>>> > But ultimately, as Tim said, you're basically just *hoping* that it
>>>>> > won't take too long to happen to be at the hypervisor when the proper
>>>>> > condition happens. If the process in question isn't getting many
>>>>> > interrupts, or is spending the vast majority of its time in the
>>>>> > kernel, you may end up waiting an unbounded amount of time to be able
>>>>> > to "catch" it in user mode. It seems like it would be better to find
>>>>> > a reliable way to trap on the return into user mode, in which case you
>>>>> > wouldn't need to have a special "wait for this complicated event to
>>>>> > happen" call at all, would you?
>>>>>
>>>>> Indeed, but it is assumed that the trap injection request is being made
>>>>> by the caller in the proper context (when it knows that the condition
>>>>> will be true sooner rather than later).
>>>>>
>>>>>
>>>>> How is it known that the condition will be true soon? Some more
>>>>> information on what you consider 'proper context' would be valuable.
>>>> It's actually pretty simple for us: the application always requests an
>>>> injection when the guest is already in the address space of the
>>>> interesting application, and in user mode.
>>>
>>> Does this mean that you always request a pagefault as a direct result of
>>> a mem_event, when the vcpu is in blocked the correct context?
>>
>> Yes, exactly.
>>
>>> If so, how about extending the mem_event response mechanism with
>>> trap/fault information?
>>
>> For this particular case, that is indeed a very good suggestion -
>> however, things may change. From what I understand, it is likely that in
>> the future we (or somebody else doing memory introspection) will need to
>> request a page fault injection in other cases. The risks described above
>> will of course exist in that case, but they are acceptable.
>
> Sorry -- do you mean that you don't actually need this functionality
> right now, but you think that maybe someone else might need it, or you
> may need it in the future? That doesn't sound very promising; at the
> moment it sounds like you're not actually even testing this mechanism
> to make sure that it works the way you hope it does.
No. The functionality _is_ being tested, but currently it's only being
used in the case where we do know that the injection will work immediately.
Also, it's not that someone else might need it. We know our application
will need to fully use it soon. It's not "may", but "will". :)
Thanks,
Razvan Cojocaru
next prev parent reply other threads:[~2014-09-10 10:49 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 11:47 [PATCH RFC V9 1/5] xen: Emulate with no writes Razvan Cojocaru
2014-08-28 11:47 ` [PATCH RFC V9 2/5] xen: Optimize introspection access to guest state Razvan Cojocaru
2014-08-28 11:48 ` [PATCH RFC V9 3/5] xen, libxc: Force-enable relevant MSR events Razvan Cojocaru
2014-08-28 11:48 ` [PATCH RFC V9 4/5] xen, libxc: Request page fault injection via libxc Razvan Cojocaru
2014-08-28 12:03 ` Jan Beulich
2014-08-28 12:08 ` Razvan Cojocaru
2014-08-28 12:11 ` Jan Beulich
2014-08-28 12:23 ` Razvan Cojocaru
2014-08-28 12:37 ` Razvan Cojocaru
2014-08-29 7:44 ` Razvan Cojocaru
2014-08-29 9:27 ` Jan Beulich
2014-09-01 7:36 ` Razvan Cojocaru
2014-09-01 9:08 ` Jan Beulich
2014-09-01 11:54 ` Razvan Cojocaru
2014-09-01 12:05 ` Jan Beulich
2014-09-02 9:18 ` Razvan Cojocaru
2014-09-02 9:33 ` Jan Beulich
2014-09-02 9:44 ` Razvan Cojocaru
2014-09-02 10:08 ` Jan Beulich
2014-09-02 13:24 ` Tim Deegan
2014-09-09 16:57 ` George Dunlap
2014-09-09 17:39 ` Razvan Cojocaru
2014-09-09 18:38 ` Tamas K Lengyel
2014-09-10 8:09 ` Razvan Cojocaru
2014-09-10 8:48 ` Andrew Cooper
2014-09-10 8:55 ` Razvan Cojocaru
2014-09-10 9:34 ` Andrew Cooper
2014-09-10 10:39 ` George Dunlap
2014-09-10 10:49 ` Razvan Cojocaru [this message]
2014-09-09 20:14 ` Tim Deegan
2014-09-10 9:30 ` Razvan Cojocaru
2014-09-10 9:59 ` Tamas K Lengyel
2014-09-10 10:44 ` Tim Deegan
2014-08-28 11:48 ` [PATCH RFC V9 5/5] xen: Handle resumed instruction based on previous mem_event reply Razvan Cojocaru
2014-08-28 12:09 ` Jan Beulich
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=54102CB0.30907@bitdefender.com \
--to=rcojocaru@bitdefender.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=eddie.dong@intel.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tamas.lengyel@zentific.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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.