All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Mihai Caraman <mihai.caraman@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH 6/6] powerpc/booke64: restore VDSO information on critical exception
Date: Wed, 05 Sep 2012 05:38:32 +0000	[thread overview]
Message-ID: <1346823512.2257.52.camel@pasglop> (raw)
In-Reply-To: <1344259628-31161-7-git-send-email-mihai.caraman@freescale.com>

On Mon, 2012-08-06 at 16:27 +0300, Mihai Caraman wrote:
> Critical exception handler on 64-bit booke uses user-visible SPRG3 as scratch.
> Restore VDSO information in SPRG3 on exception prolog.

Breaks the build on !BOOKE because of :

> diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
> index b67db22..a0b0d08 100644
> --- a/arch/powerpc/kernel/vdso.c
> +++ b/arch/powerpc/kernel/vdso.c
> @@ -725,6 +725,8 @@ int __cpuinit vdso_getcpu_init(void)
>  	mtspr(SPRN_SPRG3, val);
>  #ifdef CONFIG_KVM_BOOK3S_HANDLER
>  	get_paca()->kvm_hstate.sprg3 = val;
> +#elif CONFIG_PPC_BOOK3E
    ^^^^

You can't "#elif" a CONFIG option.

> +	get_paca()->sprg3 = val;
>  #endif
>  
>  	put_cpu();

Now, my suggestion is to actually move the bloody thing out of
kvm_hstate on server as well, just make it a common "sprg3" field
accross the board.

I'm dropping this one patch (the other ones seem fine so far and will
land in next soon unless I find another problem).

Cheers,
Ben.



WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Mihai Caraman <mihai.caraman@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 6/6] powerpc/booke64: restore VDSO information on critical exception
Date: Wed, 05 Sep 2012 15:38:32 +1000	[thread overview]
Message-ID: <1346823512.2257.52.camel@pasglop> (raw)
In-Reply-To: <1344259628-31161-7-git-send-email-mihai.caraman@freescale.com>

On Mon, 2012-08-06 at 16:27 +0300, Mihai Caraman wrote:
> Critical exception handler on 64-bit booke uses user-visible SPRG3 as scratch.
> Restore VDSO information in SPRG3 on exception prolog.

Breaks the build on !BOOKE because of :

> diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
> index b67db22..a0b0d08 100644
> --- a/arch/powerpc/kernel/vdso.c
> +++ b/arch/powerpc/kernel/vdso.c
> @@ -725,6 +725,8 @@ int __cpuinit vdso_getcpu_init(void)
>  	mtspr(SPRN_SPRG3, val);
>  #ifdef CONFIG_KVM_BOOK3S_HANDLER
>  	get_paca()->kvm_hstate.sprg3 = val;
> +#elif CONFIG_PPC_BOOK3E
    ^^^^

You can't "#elif" a CONFIG option.

> +	get_paca()->sprg3 = val;
>  #endif
>  
>  	put_cpu();

Now, my suggestion is to actually move the bloody thing out of
kvm_hstate on server as well, just make it a common "sprg3" field
accross the board.

I'm dropping this one patch (the other ones seem fine so far and will
land in next soon unless I find another problem).

Cheers,
Ben.

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Mihai Caraman <mihai.caraman@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH 6/6] powerpc/booke64: restore VDSO information on critical exception
Date: Wed, 05 Sep 2012 15:38:32 +1000	[thread overview]
Message-ID: <1346823512.2257.52.camel@pasglop> (raw)
In-Reply-To: <1344259628-31161-7-git-send-email-mihai.caraman@freescale.com>

On Mon, 2012-08-06 at 16:27 +0300, Mihai Caraman wrote:
> Critical exception handler on 64-bit booke uses user-visible SPRG3 as scratch.
> Restore VDSO information in SPRG3 on exception prolog.

Breaks the build on !BOOKE because of :

> diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
> index b67db22..a0b0d08 100644
> --- a/arch/powerpc/kernel/vdso.c
> +++ b/arch/powerpc/kernel/vdso.c
> @@ -725,6 +725,8 @@ int __cpuinit vdso_getcpu_init(void)
>  	mtspr(SPRN_SPRG3, val);
>  #ifdef CONFIG_KVM_BOOK3S_HANDLER
>  	get_paca()->kvm_hstate.sprg3 = val;
> +#elif CONFIG_PPC_BOOK3E
    ^^^^

You can't "#elif" a CONFIG option.

> +	get_paca()->sprg3 = val;
>  #endif
>  
>  	put_cpu();

Now, my suggestion is to actually move the bloody thing out of
kvm_hstate on server as well, just make it a common "sprg3" field
accross the board.

I'm dropping this one patch (the other ones seem fine so far and will
land in next soon unless I find another problem).

Cheers,
Ben.

  reply	other threads:[~2012-09-05  5:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06 13:27 [PATCH 0/6] powerpc/booke64: add core support for KVM Mihai Caraman
2012-08-06 13:27 ` Mihai Caraman
2012-08-06 13:27 ` [PATCH 1/6] powerpc/booke64: fix machine check handler to use the right prolog Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27 ` [PATCH 2/6] powerpc/booke64: use GSRR registers in Guest Doorbell interrupts Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27 ` [PATCH 3/6] powerpc/booke64: add DO_KVM kernel hooks Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27 ` [PATCH 4/6] powerpc/booke64: remove mfspr srr1 duplicate in exception prolog Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27 ` [PATCH 5/6] powerpc/booke64: use SPRG0/3 scratch for bolted TLB miss & crit int Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27 ` [PATCH 6/6] powerpc/booke64: restore VDSO information on critical exception Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-08-06 13:27   ` Mihai Caraman
2012-09-05  5:38   ` Benjamin Herrenschmidt [this message]
2012-09-05  5:38     ` Benjamin Herrenschmidt
2012-09-05  5:38     ` Benjamin Herrenschmidt

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=1346823512.2257.52.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mihai.caraman@freescale.com \
    /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.