virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>,
	Virtualization Mailing List <virtualization@lists.osdl.org>
Subject: Re: rough sketch of revised patching infrastructure
Date: Thu, 22 Feb 2007 14:43:23 +1100	[thread overview]
Message-ID: <1172115803.13378.63.camel@localhost.localdomain> (raw)
In-Reply-To: <45DCFB6E.2010806@goop.org>

On Wed, 2007-02-21 at 18:09 -0800, Jeremy Fitzhardinge wrote:
> Here's the new patching patch.  It compiles, but it doesn't, you know,
> boot, as such.

OK, there are several separate things here.
(1) Get rid of the PARAVIRT_IRQ_DISABLE etc constants in favour of
offsetof within the structure.
(2) Change (almost) all the paravirt hooks to be patchable.
(3) Genericise the infrastructure to table-driven.

These should probably become separate patches, in fact.

I'm sold on the first two, not on the last one.  Perhaps the difference
is as simple as using an explicit fn pointer rather than an enum, and
exposing functions like "paravirt_nop_patch", "paravirt_no_patch",
paravirt_jmp_patch, paravirt_call_patch, and indeed,
paravirt_default_patch (which would call jmp or call) and even
paravirt_native_patch.

BTW, here are the top 10 paravirt functions on native after a kernel
compile on my setup (patched-out functions not included):

64895231: make_pte
39780056: set_pte_at
29604260: pgd_val
24518952: flush_tlb_kernel
23992028: set_pte
11385663: pte_val
8221901: read_cr2
7106629: read_tsc
6093958: nop
1858134: save_fl (presumably before patching)

Cheers!
Rusty.

  reply	other threads:[~2007-02-22  3:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22  2:09 rough sketch of revised patching infrastructure Jeremy Fitzhardinge
2007-02-22  3:43 ` Rusty Russell [this message]
2007-02-22 10:22   ` Jeremy Fitzhardinge
2007-02-22 10:55     ` Rusty Russell
2007-02-22 18:13       ` Jeremy Fitzhardinge
2007-02-22 22:14         ` Zachary Amsden
2007-02-22 22:49           ` Jeremy Fitzhardinge
2007-02-22 22:51         ` Ian Campbell
2007-02-22 22:54           ` Jeremy Fitzhardinge

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=1172115803.13378.63.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=chrisw@sous-sol.org \
    --cc=jeremy@goop.org \
    --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).