From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, keir@xen.org, 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 V4 4/5] xen, libxc: Request page fault injection via libxc
Date: Mon, 08 Sep 2014 19:21:39 +0300 [thread overview]
Message-ID: <540DD793.9060101@bitdefender.com> (raw)
In-Reply-To: <540DEB9702000078000322A5@mail.emea.novell.com>
On 09/08/14 18:47, Jan Beulich wrote:
>>>> On 05.09.14 at 12:01, <rcojocaru@bitdefender.com> wrote:
>> + {
>> + hvm_inject_trap(&d->arch.hvm_domain.inject_trap);
>> + d->arch.hvm_domain.inject_trap.vector = -1;
>> + }
>
> And this is clearly lacking serialization (or a comment saying why
> serialization isn't needed here).
If I understood this correctly, this is what Kevin has recommended: that
only one HVMOP_trap_request should be pending at a time. Or have I
misunderstood your comment?
>> --- a/xen/include/public/hvm/hvm_op.h
>> +++ b/xen/include/public/hvm/hvm_op.h
>> @@ -197,6 +197,13 @@ struct xen_hvm_inject_trap {
>> uint32_t insn_len;
>> /* CR2 for page faults */
>> uint64_aligned_t cr2;
>> + /*
>> + * Only used if vcpuid == ~0 (wildcard for any VCPU).
>> + * In that case, injection data is set per-domain, and any VCPU
>> + * running a process with matching CR3 in user mode will inject
>> + * the trap.
>> + */
>> + uint64_aligned_t cr3;
>
> The comment should say "Currently only used ...", and the code
> should then check this (returning the usual -EOPNOTSUPP). Or
> alternatively implement it right away (which may be the better
> route taking into consideration the first of the comments above).
I will gladly change the comment, but I'm not sure for what CR3 value I
should return -EOPNOTSUPP. Should I enforce that cr3 == 0 for the
VCPU-specific case and for traps that are not page faults? Could you
please elaborate on what the alternative is?
Thanks,
Razvan Cojocaru
next prev parent reply other threads:[~2014-09-08 16:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 10:01 [PATCH V4 0/5] Basic guest memory introspection support Razvan Cojocaru
2014-09-05 10:01 ` [PATCH V4 1/5] xen: Emulate with no writes Razvan Cojocaru
2014-09-05 10:01 ` [PATCH V4 2/5] xen: Optimize introspection access to guest state Razvan Cojocaru
2014-09-05 10:01 ` [PATCH V4 3/5] xen, libxc: Force-enable relevant MSR events Razvan Cojocaru
2014-09-05 10:01 ` [PATCH V4 4/5] xen, libxc: Request page fault injection via libxc Razvan Cojocaru
2014-09-05 16:46 ` Tian, Kevin
2014-09-08 15:47 ` Jan Beulich
2014-09-08 16:21 ` Razvan Cojocaru [this message]
2014-09-09 9:08 ` Jan Beulich
2014-09-09 10:31 ` Razvan Cojocaru
2014-09-05 10:01 ` [PATCH V4 5/5] xen: Handle resumed instruction based on previous mem_event reply Razvan Cojocaru
2014-09-08 15:50 ` Jan Beulich
2014-09-08 15:53 ` 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=540DD793.9060101@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=keir@xen.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).