From: Ingo Molnar <mingo@elte.hu>
To: Glauber Costa <gcosta@redhat.com>
Cc: kvm-devel@lists.sourceforge.net, Avi Kivity <avi@qumranet.com>
Subject: Re: [PATCH 1/2] [PATCH] allow machine_crash_shutdown to be replaced
Date: Mon, 10 Mar 2008 08:16:16 +0100 [thread overview]
Message-ID: <20080310071616.GB7428@elte.hu> (raw)
In-Reply-To: <47D19A94.1070804@redhat.com>
* Glauber Costa <gcosta@redhat.com> wrote:
> It'd be kvm.git with the machine_ops non-static functions patch.
> However, as it turned out, we only used one of the functions, instead
> of all of them. If ingo prefers, we can revert that patch, and come up
> with a new one that just exposes the function we're actually using. I
> can then route it through kvm.git entirely, instead of x86.
yeah, please do it minimally. I've pulled the patch below from x86.git,
you've got my Acked-by for the smaller one as well:
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
----------->
Subject: x86: export native versions of machine_ops functions
From: Glauber Costa <gcosta@redhat.com>
Date: Wed, 5 Mar 2008 14:44:00 -0300
People overriding machine_ops provided functions may want to
call the native version after its pre-processing. It already
happens for the smp_ops functions, so I don't see a reason
for avoiding it here.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/reboot.c | 10 +++++-----
include/asm-x86/reboot.h | 5 +++++
2 files changed, 10 insertions(+), 5 deletions(-)
Index: linux-x86.q/arch/x86/kernel/reboot.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/reboot.c
+++ linux-x86.q/arch/x86/kernel/reboot.c
@@ -330,7 +330,7 @@ void __attribute__((weak)) mach_reboot_f
{
}
-static void native_machine_emergency_restart(void)
+void native_machine_emergency_restart(void)
{
int i;
@@ -382,7 +382,7 @@ static void native_machine_emergency_res
}
}
-static void native_machine_shutdown(void)
+void native_machine_shutdown(void)
{
/* Stop the cpus and apics */
#ifdef CONFIG_SMP
@@ -438,7 +438,7 @@ static void native_machine_shutdown(void
#endif
}
-static void native_machine_restart(char *__unused)
+void native_machine_restart(char *__unused)
{
printk("machine restart\n");
@@ -447,11 +447,11 @@ static void native_machine_restart(char
machine_emergency_restart();
}
-static void native_machine_halt(void)
+void native_machine_halt(void)
{
}
-static void native_machine_power_off(void)
+void native_machine_power_off(void)
{
if (pm_power_off) {
if (!reboot_force)
Index: linux-x86.q/include/asm-x86/reboot.h
===================================================================
--- linux-x86.q.orig/include/asm-x86/reboot.h
+++ linux-x86.q/include/asm-x86/reboot.h
@@ -16,5 +16,10 @@ struct machine_ops
extern struct machine_ops machine_ops;
void machine_real_restart(unsigned char *code, int length);
+void native_machine_emergency_restart(void);
+void native_machine_shutdown(void);
+void native_machine_restart(char *__unused);
+void native_machine_halt(void);
+void native_machine_power_off(void);
#endif /* _ASM_REBOOT_H */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
prev parent reply other threads:[~2008-03-10 7:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-07 15:55 [PATCH 0/2] prevent memory corruption across reboots Glauber Costa
2008-03-07 15:55 ` [PATCH 1/2] [PATCH] allow machine_crash_shutdown to be replaced Glauber Costa
2008-03-07 15:55 ` [PATCH 2/2] [PATCH] disable clock before rebooting Glauber Costa
2008-03-07 19:11 ` [PATCH 1/2] [PATCH] allow machine_crash_shutdown to be replaced Avi Kivity
2008-03-07 19:42 ` Glauber Costa
2008-03-10 7:16 ` Ingo Molnar [this message]
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=20080310071616.GB7428@elte.hu \
--to=mingo@elte.hu \
--cc=avi@qumranet.com \
--cc=gcosta@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
/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