From: Mike Kravetz <kravetz@us.ibm.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: Instrument Hypervisor Calls
Date: Fri, 25 Aug 2006 11:52:40 -0700 [thread overview]
Message-ID: <20060825185240.GA1619@w-mikek2.ibm.com> (raw)
In-Reply-To: <17645.19790.527223.207556@cargo.ozlabs.ibm.com>
On Thu, Aug 24, 2006 at 04:55:10PM +1000, Paul Mackerras wrote:
> > + /* calculate address of stat structure */ \
> > + ld r4,STK_PARM(r3)(r1); /* use opcode as */ \
> > + rldicl r4,r4,62,2; /* index into array */ \
> > + mulli r4,r4,HCALL_STAT_SIZE; \
>
> It's a pity our multiplies are slow (6 cycles). The rldicl would I
> think be more clearly expressed as srdi r4,r4,2. We could use a shift
> and add instead of the multiply if we put a big fat comment in the
> header that defines the structure warning people to adjust the
> assembly if they change the structure. Might not be worth it though.
I would rather keep the multiply and minimal safety it provides when
people change the structure.
> BTW are we going to die horribly if someone uses an hcall greater than
> MAX_HCALL_OPCODES? The hcall functions are available to modules, so
> it would be quite possible for a module to come along and try to use
> some new hcalls that weren't known about when the kernel was built.
Yes, bad things would happen. This is/was a bad assumption on my part
that all callers would pass in valid opcodes. I'll put in a simple check
for that.
--
Mike
next prev parent reply other threads:[~2006-08-25 18:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-16 16:04 [PATCH] powerpc: Instrument Hypervisor Calls Mike Kravetz
2006-08-24 6:55 ` Paul Mackerras
2006-08-25 18:52 ` Mike Kravetz [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-06 23:23 Mike Kravetz
2006-09-07 0:34 ` Paul Mackerras
2006-08-14 23:21 Mike Kravetz
2006-08-14 23:35 ` Geoff Levand
2006-08-14 23:41 ` Mike Kravetz
2006-08-15 2:01 ` Geoff Levand
2006-08-15 2:34 ` Mike Kravetz
2006-08-15 1:03 ` Stephen Rothwell
2006-08-15 2:32 ` Mike Kravetz
2006-08-15 3:12 ` Stephen Rothwell
2006-08-15 3:32 ` Dave Boutcher
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=20060825185240.GA1619@w-mikek2.ibm.com \
--to=kravetz@us.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).