From: Andi Kleen <ak@muc.de>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@osdl.org>, Chris Wright <chrisw@sous-sol.org>,
virtualization <virtualization@lists.osdl.org>
Subject: Re: [PATCH 2/2] paravirt inline patching
Date: Tue, 22 Aug 2006 11:14:48 +0200 [thread overview]
Message-ID: <20060822111448.a9cdfe68.ak@muc.de> (raw)
In-Reply-To: <1156227152.26898.11.camel@localhost.localdomain>
On Tue, 22 Aug 2006 16:12:32 +1000
Rusty Russell <rusty@rustcorp.com.au> wrote:
> It turns out that the most called ops, by several orders of magnitude,
> are the interrupt manipulation ops. These are obvious candidates for
> patching, so mark them up and create infrastructure for it.
>
> The method used is that the ops structure has a patch function, which
> is called for each place which needs to be patched: this returns a
> number of instructions (the rest are NOP-padded).
>
> Usually we can spare a register (%eax) for the binary patched code to
> use, but in a couple of critical places in entry.S we can't: we make
> the clobbers explicit at the call site, and manually clobber the
> allowed registers in debug mode as an extra check.
Looks good to me.
> +
> + /* Sync in case we patched this coming "sti" last. */
> + sync_core();
I guess this needs more comments -- in particular that it is
only safe because the other CPUs are not executing any of this
yet and preempt does synchronize anyways.
-Andi
next prev parent reply other threads:[~2006-08-22 9:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-22 5:55 [PATCH 1/2] paravirt.h header Rusty Russell
2006-08-22 6:12 ` [PATCH 2/2] paravirt inline patching Rusty Russell
2006-08-22 9:14 ` Andi Kleen [this message]
2006-08-22 6:43 ` [PATCH 1/2] paravirt.h header Rusty Russell
2006-08-22 9:06 ` Andi Kleen
2006-08-23 1:20 ` Rusty Russell
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=20060822111448.a9cdfe68.ak@muc.de \
--to=ak@muc.de \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.osdl.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).