All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhushan Bharat-R65777 <R65777@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
	Wood Scott-B07421 <B07421@freescale.com>,
	Yoder Stuart-B08248 <B08248@freescale.com>
Subject: RE: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset
Date: Mon, 15 Jul 2013 15:05:54 +0000	[thread overview]
Message-ID: <6A3DF150A5B70D4F9B66A25E3F7C888D070D27C7@039-SN2MPN1-013.039d.mgd.msft.net> (raw)
In-Reply-To: <7A2C8450-46FF-4160-B045-F2A3F8F3B8B7@suse.de>



> -----Original Message-----
> From: Alexander Graf [mailto:agraf@suse.de]
> Sent: Monday, July 15, 2013 5:20 PM
> To: Bhushan Bharat-R65777
> Cc: kvm@vger.kernel.org; kvm-ppc@vger.kernel.org; Wood Scott-B07421; Yoder
> Stuart-B08248; Bhushan Bharat-R65777
> Subject: Re: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset
> 
> 
> On 15.07.2013, at 13:11, Bharat Bhushan wrote:
> 
> > Detect the availability of the reset hcalls by looking at
> > kvm,has-reset property on the /hypervisor node in the device tree
> > passed to the VM and patches the reset mechanism to use reset hcall.
> >
> > This patch uses the reser hcall when kvm,has-reset is there in
> 
> Your patch description is pretty broken :).
> 
> >
> > Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
> > ---
> > arch/powerpc/kernel/epapr_paravirt.c |   12 ++++++++++++
> > 1 files changed, 12 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/epapr_paravirt.c
> > b/arch/powerpc/kernel/epapr_paravirt.c
> > index d44a571..651d701 100644
> > --- a/arch/powerpc/kernel/epapr_paravirt.c
> > +++ b/arch/powerpc/kernel/epapr_paravirt.c
> > @@ -22,6 +22,8 @@
> > #include <asm/cacheflush.h>
> > #include <asm/code-patching.h>
> > #include <asm/machdep.h>
> > +#include <asm/kvm_para.h>
> > +#include <asm/kvm_host.h>
> 
> Why would we need kvm_host.h? This is guest code.
> 
> >
> > #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) extern
> > void epapr_ev_idle(void); @@ -30,6 +32,14 @@ extern u32
> > epapr_ev_idle_start[];
> >
> > bool epapr_paravirt_enabled;
> >
> > +void epapr_hypercall_reset(char *cmd) {
> > +	long ret;
> > +	ret = kvm_hypercall0(KVM_HC_VM_RESET);
> 
> Is this available without CONFIG_KVM_GUEST? kvm_hypercall() simply returns
> "unimplemented" for everything when that config option is not set.

We are here because we patched the ppc_md.restart to point to new handler.
So I think we should patch the ppc_md.restart only if CONFIG_KVM_GUEST is true. 


> 
> > +	printk("error: system reset returned with error %ld\n", ret);
> 
> So we should fall back to the normal reset handler here.

Do you mean return normally from here, no BUG() etc? 

-Bharat

> 
> 
> Alex
> 
> > +	BUG();
> > +}
> > +
> > static int __init epapr_paravirt_init(void) {
> > 	struct device_node *hyper_node;
> > @@ -58,6 +68,8 @@ static int __init epapr_paravirt_init(void)
> > 	if (of_get_property(hyper_node, "has-idle", NULL))
> > 		ppc_md.power_save = epapr_ev_idle;
> > #endif
> > +	if (of_get_property(hyper_node, "kvm,has-reset", NULL))
> > +		ppc_md.restart = epapr_hypercall_reset;
> >
> > 	epapr_paravirt_enabled = true;
> >
> > --
> > 1.7.0.4
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> > the body of a message to majordomo@vger.kernel.org More majordomo info
> > at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2013-07-15 15:05 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 11:11 [PATCH 0/5] powerpc: implement reset/shutdown hcalls Bharat Bhushan
2013-07-15 11:23 ` Bharat Bhushan
2013-07-15 11:11 ` [PATCH 1/5] powerpc: define ePAPR hcall exit interface Bharat Bhushan
2013-07-15 11:23   ` Bharat Bhushan
2013-07-15 11:21   ` Alexander Graf
2013-07-15 11:21     ` Alexander Graf
2013-07-15 11:32     ` Bhushan Bharat-R65777
2013-07-15 11:11 ` [PATCH 2/5] booke: exit to guest userspace for unimplemented hcalls in kvm Bharat Bhushan
2013-07-15 11:23   ` Bharat Bhushan
2013-07-15 11:31   ` Alexander Graf
2013-07-15 11:31     ` Alexander Graf
2013-07-15 11:38     ` Bhushan Bharat-R65777
2013-07-15 11:38       ` Bhushan Bharat-R65777
2013-07-15 11:46       ` Alexander Graf
2013-07-15 11:46         ` Alexander Graf
2013-07-15 14:50         ` Bhushan Bharat-R65777
2013-07-15 14:56           ` Alexander Graf
2013-07-15 14:56             ` Alexander Graf
2013-07-15 15:13             ` Bhushan Bharat-R65777
2013-07-15 15:29               ` Alexander Graf
2013-07-15 15:29                 ` Alexander Graf
2013-07-15 15:35                 ` Bhushan Bharat-R65777
2013-07-15 15:38                   ` Alexander Graf
2013-07-15 15:38                     ` Alexander Graf
2013-07-15 18:07   ` Scott Wood
2013-07-15 18:07     ` Scott Wood
2013-07-16  4:46     ` Bhushan Bharat-R65777
2013-07-16  4:46       ` Bhushan Bharat-R65777
2013-07-15 11:11 ` [PATCH 3/5] booke: define reset and shutdown hcalls Bharat Bhushan
2013-07-15 11:23   ` Bharat Bhushan
2013-07-15 11:30   ` Gleb Natapov
2013-07-15 11:30     ` Gleb Natapov
2013-07-15 11:44     ` Alexander Graf
2013-07-15 11:44       ` Alexander Graf
2013-07-15 12:15       ` Gleb Natapov
2013-07-15 12:15         ` Gleb Natapov
2013-07-15 12:21         ` Alexander Graf
2013-07-15 12:21           ` Alexander Graf
2013-07-15 12:24           ` Gleb Natapov
2013-07-15 12:24             ` Gleb Natapov
2013-07-15 12:26             ` Alexander Graf
2013-07-15 12:26               ` Alexander Graf
2013-07-15 12:31               ` Gleb Natapov
2013-07-15 12:31                 ` Gleb Natapov
2013-07-15 18:17     ` Scott Wood
2013-07-15 18:17       ` Scott Wood
2013-07-16  6:35       ` Gleb Natapov
2013-07-16  6:35         ` Gleb Natapov
2013-07-16 23:04         ` Scott Wood
2013-07-16 23:04           ` Scott Wood
2013-07-17 11:00           ` Gleb Natapov
2013-07-17 11:00             ` Gleb Natapov
2013-07-17 12:19             ` Alexander Graf
2013-07-17 12:19               ` Alexander Graf
2013-07-17 15:19               ` Yoder Stuart-B08248
2013-07-17 15:21                 ` Alexander Graf
2013-07-17 15:21                   ` Alexander Graf
2013-07-17 15:36                   ` Yoder Stuart-B08248
2013-07-17 15:41                     ` Alexander Graf
2013-07-17 15:41                       ` Alexander Graf
2013-07-17 15:47                       ` Bhushan Bharat-R65777
2013-07-17 15:52                         ` Alexander Graf
2013-07-17 15:52                           ` Alexander Graf
2013-07-17 15:59                           ` Bhushan Bharat-R65777
2013-07-17 16:04                             ` Alexander Graf
2013-07-17 16:04                               ` Alexander Graf
2013-07-17 16:21                               ` Bhushan Bharat-R65777
2013-07-17 16:23                                 ` Alexander Graf
2013-07-17 16:23                                   ` Alexander Graf
2013-07-17 16:59                               ` Scott Wood
2013-07-17 16:59                                 ` Scott Wood
2013-07-17 17:05                                 ` Alexander Graf
2013-07-17 17:05                                   ` Alexander Graf
2013-07-17 17:09                                   ` Scott Wood
2013-07-17 17:09                                     ` Scott Wood
2013-07-15 11:11 ` [PATCH 4/5] powerpc: Resolve KVM_HC_FEATURES compilation dependeny Bharat Bhushan
2013-07-15 11:23   ` Bharat Bhushan
2013-07-15 11:46   ` Alexander Graf
2013-07-15 11:46     ` Alexander Graf
2013-07-15 11:11 ` [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset Bharat Bhushan
2013-07-15 11:23   ` Bharat Bhushan
2013-07-15 11:50   ` Alexander Graf
2013-07-15 11:50     ` Alexander Graf
2013-07-15 15:05     ` Bhushan Bharat-R65777 [this message]
2013-07-15 15:09       ` Alexander Graf
2013-07-15 15:09         ` Alexander Graf
2013-07-15 15:16         ` Bhushan Bharat-R65777
2013-07-15 18:21           ` Scott Wood
2013-07-15 18:21             ` Scott Wood
2013-07-15 20:28             ` Alexander Graf
2013-07-15 20:28               ` Alexander Graf
2013-07-15 20:52               ` Scott Wood
2013-07-15 20:52                 ` Scott Wood
2013-07-15 20:55                 ` Alexander Graf
2013-07-15 20:55                   ` Alexander Graf
2013-07-15 22:23                   ` Scott Wood
2013-07-15 22:23                     ` Scott Wood
2013-07-16 23:21                     ` Alexander Graf
2013-07-16 23:21                       ` Alexander Graf
2013-07-16 23:26                       ` Scott Wood
2013-07-16 23:26                         ` Scott Wood
2013-07-16 23:37                         ` Scott Wood
2013-07-16 23:37                           ` Scott Wood

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=6A3DF150A5B70D4F9B66A25E3F7C888D070D27C7@039-SN2MPN1-013.039d.mgd.msft.net \
    --to=r65777@freescale.com \
    --cc=B07421@freescale.com \
    --cc=B08248@freescale.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.