All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
	eddie.dong@intel.com, xen-devel@lists.xen.org,
	jun.nakajima@intel.com, ian.jackson@eu.citrix.com
Subject: Re: [PATCH RFC V7 4/5] xen, libxc: Request page fault injection via libxc
Date: Thu, 28 Aug 2014 16:19:43 +0300	[thread overview]
Message-ID: <53FF2C6F.60208@bitdefender.com> (raw)
In-Reply-To: <20140828131506.GA79861@deinos.phlegethon.org>

On 08/28/2014 04:15 PM, Tim Deegan wrote:
> At 16:49 +0100 on 26 Aug (1409068141), Jan Beulich wrote:
>>>>> On 26.08.14 at 16:56, <rcojocaru@bitdefender.com> wrote:
>>> On 08/26/2014 05:44 PM, Jan Beulich wrote:
>>>>>>> On 26.08.14 at 16:24, <rcojocaru@bitdefender.com> wrote:
>>>>> On 08/26/2014 05:13 PM, Jan Beulich wrote:
>>>>>>>>> On 13.08.14 at 17:28, <rcojocaru@bitdefender.com> wrote:
>>>>>>> --- a/xen/include/asm-x86/hvm/domain.h
>>>>>>> +++ b/xen/include/asm-x86/hvm/domain.h
>>>>>>> @@ -141,6 +141,14 @@ struct hvm_domain {
>>>>>>>       */
>>>>>>>      uint64_t sync_tsc;
>>>>>>>  
>>>>>>> +    /* Memory introspection page fault injection data. */
>>>>>>> +    struct {
>>>>>>> +        uint64_t address_space;
>>>>>>> +        uint64_t virtual_address;
>>>>>>> +        uint32_t errcode;
>>>>>>> +        bool_t valid;
>>>>>>> +    } fault_info;
>>>>>>
>>>>>> Sorry for noticing this only now, but how can this be a per-domain
>>>>>> thing rather than a per-vCPU one?
>>>>>
>>>>> The requirement for our introspection application has simply been to
>>>>> bring back in a swapped-out page, regardless of what VCPU ends up
>>>>> actually doing it.
>>>>
>>>> But please remember that what you add to the public code base
>>>> shouldn't be tied to specific needs of your application, it should
>>>> be coded in a generally useful way.
>>>
>>> Of course, perhaps I should have written "the scenario we're working
>>> with" rather than "the requirement for our application". I'm just trying
>>> to understand all the usual cases for this.
>>>
>>>> Furthermore, how would this work if you have 2 vCPU-s hit such
>>>> a condition, and you need to bring in 2 pages in parallel?
>>>
>>> Since this is all happening in the context of processing mem_events,
>>> it's not really possible for two VCPUs to need to do this in parallel,
>>> since processing mem_events is being done sequentially. A VCPU needs to
>>> put a mem_event in the ring buffer and pause before this hypercall can
>>> be called from userspace.
>>
>> I'd certainly want to hear Tim's opinion here before settling on
>> either model.
> 
> Yes, I think it's much better to have this be a per-vcpu operation; I
> see that's the way it's going already in later versions.

I've just reverted that change in V10 after discussing it with Jan. :)

I'll check into more detail if it can be done per-VCPU with no
ill-effects on our side, and if so I'll come back to the per-VCPU
implementation.


Thanks,
Razvan Cojocaru

  reply	other threads:[~2014-08-28 13:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 15:28 [PATCH RFC V7 1/5] xen: Emulate with no writes Razvan Cojocaru
2014-08-13 15:28 ` [PATCH RFC V7 2/5] xen: Optimize introspection access to guest state Razvan Cojocaru
2014-08-13 15:28 ` [PATCH RFC V7 3/5] xen, libxc: Force-enable relevant MSR events Razvan Cojocaru
2014-08-26 14:05   ` Jan Beulich
2014-08-13 15:28 ` [PATCH RFC V7 4/5] xen, libxc: Request page fault injection via libxc Razvan Cojocaru
2014-08-26 14:13   ` Jan Beulich
2014-08-26 14:24     ` Razvan Cojocaru
2014-08-26 14:44       ` Jan Beulich
2014-08-26 14:56         ` Razvan Cojocaru
2014-08-26 15:49           ` Jan Beulich
2014-08-26 16:59             ` Razvan Cojocaru
2014-08-27  0:54               ` Tian, Kevin
2014-08-27  6:58                 ` Jan Beulich
2014-08-28 13:15             ` Tim Deegan
2014-08-28 13:19               ` Razvan Cojocaru [this message]
2014-08-27 11:54     ` Razvan Cojocaru
2014-08-27 12:10       ` Jan Beulich
2014-08-27 12:15         ` Razvan Cojocaru
2014-08-13 15:28 ` [PATCH RFC V7 5/5] xen: Handle resumed instruction based on previous mem_event reply Razvan Cojocaru
2014-08-26 13:56 ` [PATCH RFC V7 1/5] xen: Emulate with no writes Jan Beulich
2014-08-26 14:01   ` Razvan Cojocaru
2014-08-26 14:19     ` Jan Beulich
2014-08-26 14:30       ` Razvan Cojocaru
2014-08-26 14:40         ` Jan Beulich
2014-08-26 14:45           ` 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=53FF2C6F.60208@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.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.