All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: kevin.tian@intel.com, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
	eddie.dong@intel.com, tim@xen.org, jun.nakajima@intel.com,
	xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com
Subject: Re: [PATCH RFC V9 4/5] xen, libxc: Request page fault injection via libxc
Date: Tue, 02 Sep 2014 11:08:25 +0100	[thread overview]
Message-ID: <5405B339020000780002FCAE@mail.emea.novell.com> (raw)
In-Reply-To: <5405916A.9000103@bitdefender.com>

>>> On 02.09.14 at 11:44, <rcojocaru@bitdefender.com> wrote:
> On 09/02/2014 12:33 PM, Jan Beulich wrote:
>>>>> On 02.09.14 at 11:18, <rcojocaru@bitdefender.com> wrote:
>>> While we need to set the data per-domain and have whatever VCPU inject
>>> the page fault - _but_only_if_ it's in usermode and its CR3 points to
>>> something interesting.
>> 
>> Right - but none of this is an argument against adding a wildcard
>> specifier for the vCPU passed in the existing interface and -
>> assuming this is a tools only interface - add the additional qualifiers
>> (and perhaps even make the code obey to them when used in a
>> vCPU-centric invocation).
> 
> But adding a wildcard for the VCPU would effectively mean that this part
> of the HVMOP_inject_trap case handling code would need to be modified to
> use per-domain data instead of per-VCPU data (which with a wildcard
> would not make sense):
> 
>         rc = -ENOENT;
>         if ( tr.vcpuid >= d->max_vcpus || (v = d->vcpu[tr.vcpuid]) == NULL )
>             goto param_fail8;
> 
>         if ( v->arch.hvm_vcpu.inject_trap.vector != -1 )
>             rc = -EBUSY;
>         else
>         {
>             v->arch.hvm_vcpu.inject_trap.vector = tr.vector;
>             v->arch.hvm_vcpu.inject_trap.type = tr.type;
>             v->arch.hvm_vcpu.inject_trap.error_code = tr.error_code;
>             v->arch.hvm_vcpu.inject_trap.insn_len = tr.insn_len;
>             v->arch.hvm_vcpu.inject_trap.cr2 = tr.cr2;
>             rc = 0;
>         }
> 
> The alternative would be to set the data to _all_ of the VCPUs for the
> wildcard case, but that could potentially trigger a page fault for every
> VCPU.

No - additionally to having a per-vCPU inject_trap field, you'd also
add a per-domain one.

Jan

  reply	other threads:[~2014-09-02 10:08 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 [this message]
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=5405B339020000780002FCAE@mail.emea.novell.com \
    --to=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=rcojocaru@bitdefender.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.