From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Date: Mon, 07 Apr 2008 15:23:52 +0000 Subject: Re: [kvm-ppc-devel] [PATCH] kvmppc: support guest shutdown - guest Message-Id: <47FA3C88.3030402@linux.vnet.ibm.com> List-Id: References: <12075718522742-git-send-email-ehrhardt@linux.vnet.ibm.com> In-Reply-To: <12075718522742-git-send-email-ehrhardt@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: kvm-ppc@vger.kernel.org Jimi Xenidis wrote: >=20 > On Apr 7, 2008, at 8:37 AM, ehrhardt@linux.vnet.ibm.com wrote: >> From: Christian Ehrhardt >> >> This is the guest portion of this patch, it submits a trap with the=20 >> special >> immediate value where the native code would enter a infinite loop with=20 >> 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=20 >> 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=20 >> need to >> the -no-reboot command line option to qemu to get what is expected. >> >> Signed-off-by: Christian Ehrhardt >> >> [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=20 >> 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(); >=20 > hmm.. shouldn't you just be defining ppc_md.halt in your setup so it can = > be called in this function above this line? I'll look into that - thx Jimi > Functionally I would assume this "zombies" the guest rather then=20 > completely destroys it? > This is important if I want to externally debug said state. hmmm ... I started with the demand to get it destroyed on halt. > You may also want to consider defining ppc_md.power_off as well which=20 > would automatically and completely destroy the guest. > >> +#ifdef CONFIG_KVM_PPC_GUEST >> + /* FIXME port to the proper hypercall API/ABI when defined */ >> + __asm__ __volatile__("twi 31,0,1"); >> +#endif >=20 > Have you considered using mtmsr(MSR_WE) which puts you in wait with no=20 > hope of coming back, unless forced by probe. atm I want it dead ;-). But you'r right - eventually we should implement the differences between ha= lt, poweroff, ... in the final version >> 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/j= avaone=20 >> >> _______________________________________________ >> kvm-ppc-devel mailing list >> kvm-ppc-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel >=20 --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference=20 Register now and save $200. Hurry, offer ends at 11:59 p.m.,=20 Monday, April 7! Use priority code J8TLD2.=20 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java= one _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel