From: Razvan Cojocaru <rzvncj@gmail.com>
To: Tim Deegan <tim@xen.org>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: hvm_emulate_one() usage
Date: Thu, 10 Jan 2013 16:10:33 +0200 [thread overview]
Message-ID: <50EECBD9.2020406@gmail.com> (raw)
In-Reply-To: <20130110131650.GE99373@ocelot.phlegethon.org>
> Hi,
Hello Tim, thank you for your answer!
> How about (from your user-space tool):
> - use XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_ON to enable single-stepping.
> - respond to the mem_event that you're handling, causing the vcpu to be
> unpaused.
> Then when the vcpu is scheduled, it will single-step in its own context,
> and you'll get another mem_event (assuming you've set
> HVM_PARAM_MEMORY_EVENT_SINGLE_STEP). Once that happens:
> - use XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_OFF to disable single-stepping.
> - respond to that event to unpause the vcpu.
>
> I guess if you're tyring to have some special case in the single-step
> handler that allows it to write to a page that it normally coudn't you
> might need to add an interface for controlling that.
Thanks, looks like something like that is the only way this would
theoretically work. The problem is, for each allowed (emulated) write -
which is the 'normal' case - there would be 3 dom0 <-> hypervisor
roundtrips (2 fault mem_events and 1 single step mem_event). Since
writes that need to be allowed do happen quite a lot, the domU would
become very slow.
I was very much hoping to be able to do this with only one (page fault)
mem_event per emulated write instruction.
Thanks,
Razvan Cojocaru
next prev parent reply other threads:[~2013-01-10 14:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-28 14:34 hvm_emulate_one() usage Razvan Cojocaru
2012-12-28 22:27 ` Andrew Cooper
2012-12-28 23:29 ` Razvan Cojocaru
2013-01-10 13:16 ` Tim Deegan
2013-01-10 14:10 ` Razvan Cojocaru [this message]
2013-01-10 14:23 ` Tim Deegan
2013-01-10 14:31 ` Razvan Cojocaru
2013-01-10 14:58 ` Tim Deegan
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=50EECBD9.2020406@gmail.com \
--to=rzvncj@gmail.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 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).