From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, eddie.dong@intel.com,
stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
tim@xen.org, jun.nakajima@intel.com,
xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com,
ian.campbell@citrix.com
Subject: Re: [PATCH RFC V9 4/5] xen, libxc: Request page fault injection via libxc
Date: Fri, 29 Aug 2014 10:44:03 +0300 [thread overview]
Message-ID: <54002F43.4070802@bitdefender.com> (raw)
In-Reply-To: <53FF38A6020000780002EB2B@mail.emea.novell.com>
On 08/28/2014 03:11 PM, Jan Beulich wrote:
>>>> On 28.08.14 at 14:08, <rcojocaru@bitdefender.com> wrote:
>> On 08/28/2014 03:03 PM, Jan Beulich wrote:
>>>>>> On 28.08.14 at 13:48, <rcojocaru@bitdefender.com> wrote:
>>>> + case XEN_DOMCTL_request_pagefault:
>>>> + {
>>>> + unsigned int vcpu = op->u.vcpucontext.vcpu;
>>>
>>> So you're using two different structures of the union - how can
>>> that possibly work? You've got a 32-bi padding field, which you can
>>> easily use to indicate the desired vCPU. Apart from that I'm not
>>> seeing how your intended "any vCPU" is now getting handled.
>>
>> Sorry about that, started from a copy / paste bug from another domctl
>> case. I'll add the vcpu field to our struct and use that.
>>
>> Not sure I follow the second part of your comment. Assuming the union
>> problem is fixed, is this not what you meant about handling the page
>> fault injection VCPU-based vs domain-based?
>
> It is, but you said you want an "I don't care on which vCPU"
> special case. In fact with your previous explanations I could
> see you getting into trouble if on a large guest you'd have to
> wait for one particular CPU to get to carry out the desired
> swap-in.
I've double-checked what the memory introspection engine requires, and
(thank you for the comment!) it looks like indeed having the PF
injection info per-VCPU is not only suboptimal, but possibly useless for
our purpose (at least when using it with a particular VCPU - such as
VCPU 0), precisely for the reasons you've indicated: because VCPU 0
might actually never run code in the destination virtual space.
Having the PF injection information per-domain ensures that at least one
VCPU ends up triggering the actual page fault. To answer Kevin's
question, whether more than one VCPU ends up doing that occasionally is
not a problem from the memory introspection engine's point of view, and
AFAIK it should not be a problem for a guest OS.
So I've gotten a bit ahead of myself with the change in V9, and this is
why I've reverted back to the original behaviour in V10.
I do understand the preference for a VCPU-based mechanism from a
concurrency point of view, but that would simply potentially fail for
us, hence defeating the purpose of the patch. I'm also not sure how that
would be useful in the general case either, since the same problem that
applies to us would seem to apply to the general case as well.
Thanks,
Razvan Cojocaru
next prev parent reply other threads:[~2014-08-29 7:43 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 [this message]
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
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=54002F43.4070802@bitdefender.com \
--to=rcojocaru@bitdefender.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=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.