Kernel KVM-PPC virtualization development
 help / color / mirror / Atom feed
From: ehrhardt@linux.vnet.ibm.com
To: kvm-ppc@vger.kernel.org
Subject: [kvm-ppc-devel] [PATCH] kvmppc: support guest shutdown - guest part
Date: Mon, 07 Apr 2008 12:37:29 +0000	[thread overview]
Message-ID: <12075718522742-git-send-email-ehrhardt@linux.vnet.ibm.com> (raw)

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

This is the guest portion of this patch, it submits a trap with the special
immediate value where the native code would enter a infinite loop with irq's
disabled (no native shutdown available).
This is only a interim solution until the hypercall abi/api is fully
defined. Then we will recode it in according to that specification. 
I would wait for these final hypercall variant before we go to
linuxppc-dev@ozlabs.org with these patch, but for now this patch could stay in
our patch queues because it easens daily usage e.g. scripted testing.
Note - since qemu defaults to reboot the guest on shutdown you might need to
the -no-reboot command line option to qemu to get what is expected.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

[diffstat]
 kernel/setup-common.c |    4 ++++
 kvm/Kconfig           |   11 ++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
---

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -146,6 +146,10 @@ void machine_halt(void)
 #endif
 	printk(KERN_EMERG "System Halted, OK to turn off power\n");
 	local_irq_disable();
+#ifdef CONFIG_KVM_PPC_GUEST
+	/* FIXME port to the proper hypercall API/ABI when defined */
+	__asm__ __volatile__("twi 31,0,1");
+#endif
 	while (1) ;
 }
 
diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
--- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig
@@ -35,7 +35,7 @@ config KVM_POWERPC
 	bool
 
 config KVM_POWERPC_440
-	tristate "KVM guest support for PowerPC 440"
+	tristate "KVM host support for PowerPC 440 guests"
 	depends on KVM && 44x
 	select KVM_POWERPC
 	---help---
@@ -52,5 +52,14 @@ config KVM_PPC_VIRTIO
 # the virtualization menu.
 source drivers/virtio/Kconfig
 
+
+config KVM_PPC_GUEST
+	bool "Paravirt guest extensions for KVM on POWERPC"
+	depends on 44x
+	---help---
+	  This add support of paravirt features for KVM on POWERPC
+
+
+
 endif # VIRTUALIZATION
 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

             reply	other threads:[~2008-04-07 12:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07 12:37 ehrhardt [this message]
2008-04-07 12:37 ` [kvm-ppc-devel] [PATCH] kvmppc: support guest shutdown - host part ehrhardt
2008-04-07 14:13 ` [kvm-ppc-devel] [PATCH] kvmppc: support guest shutdown - guest Jimi Xenidis
2008-04-07 15:23 ` Christian Ehrhardt

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=12075718522742-git-send-email-ehrhardt@linux.vnet.ibm.com \
    --to=ehrhardt@linux.vnet.ibm.com \
    --cc=kvm-ppc@vger.kernel.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