From: Scott Wood <scottwood@freescale.com>
To: Mihai Caraman <mihai.caraman@freescale.com>
Cc: Mihai Caraman <mihai.caraman@freescale.com>,
linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness
Date: Wed, 03 Jul 2013 18:37:18 +0000 [thread overview]
Message-ID: <1372876638.8183.138@snotra> (raw)
In-Reply-To: <1372855359-13452-4-git-send-email-mihai.caraman@freescale.com> (from mihai.caraman@freescale.com on Wed Jul 3 07:42:36 2013)
On 07/03/2013 07:42:36 AM, Mihai Caraman wrote:
> Increase FPU laziness by calling kvmppc_load_guest_fp() just before
> returning to guest instead of each sched in. Without this improvement
> an interrupt may also claim floting point corrupting guest state.
>
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> ---
> arch/powerpc/kvm/booke.c | 1 +
> arch/powerpc/kvm/e500mc.c | 2 --
> 2 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 113961f..3cae2e3 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -1204,6 +1204,7 @@ int kvmppc_handle_exit(struct kvm_run *run,
> struct kvm_vcpu *vcpu,
> r = (s << 2) | RESUME_HOST | (r &
> RESUME_FLAG_NV);
> } else {
> kvmppc_lazy_ee_enable();
> + kvmppc_load_guest_fp(vcpu);
> }
> }
>
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 19c8379..09da1ac 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -143,8 +143,6 @@ void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu,
> int cpu)
> kvmppc_e500_tlbil_all(vcpu_e500);
> __get_cpu_var(last_vcpu_on_cpu) = vcpu;
> }
> -
> - kvmppc_load_guest_fp(vcpu);
> }
>
> void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu)
Can we now remove vcpu->fpu_active, and the comment that says "Kernel
usage of FP (via
enable_kernel_fp()) in this thread must not occur while
vcpu->fpu_active is set."?
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Mihai Caraman <mihai.caraman@freescale.com>
Cc: Mihai Caraman <mihai.caraman@freescale.com>,
linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness
Date: Wed, 3 Jul 2013 13:37:18 -0500 [thread overview]
Message-ID: <1372876638.8183.138@snotra> (raw)
In-Reply-To: <1372855359-13452-4-git-send-email-mihai.caraman@freescale.com> (from mihai.caraman@freescale.com on Wed Jul 3 07:42:36 2013)
On 07/03/2013 07:42:36 AM, Mihai Caraman wrote:
> Increase FPU laziness by calling kvmppc_load_guest_fp() just before
> returning to guest instead of each sched in. Without this improvement
> an interrupt may also claim floting point corrupting guest state.
>=20
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> ---
> arch/powerpc/kvm/booke.c | 1 +
> arch/powerpc/kvm/e500mc.c | 2 --
> 2 files changed, 1 insertions(+), 2 deletions(-)
>=20
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 113961f..3cae2e3 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -1204,6 +1204,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20
> struct kvm_vcpu *vcpu,
> r =3D (s << 2) | RESUME_HOST | (r & =20
> RESUME_FLAG_NV);
> } else {
> kvmppc_lazy_ee_enable();
> + kvmppc_load_guest_fp(vcpu);
> }
> }
>=20
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 19c8379..09da1ac 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -143,8 +143,6 @@ void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu, =20
> int cpu)
> kvmppc_e500_tlbil_all(vcpu_e500);
> __get_cpu_var(last_vcpu_on_cpu) =3D vcpu;
> }
> -
> - kvmppc_load_guest_fp(vcpu);
> }
>=20
> void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu)
Can we now remove vcpu->fpu_active, and the comment that says "Kernel =20
usage of FP (via
enable_kernel_fp()) in this thread must not occur while =20
vcpu->fpu_active is set."?
-Scott=
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Mihai Caraman <mihai.caraman@freescale.com>
Cc: Mihai Caraman <mihai.caraman@freescale.com>,
linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness
Date: Wed, 3 Jul 2013 13:37:18 -0500 [thread overview]
Message-ID: <1372876638.8183.138@snotra> (raw)
In-Reply-To: <1372855359-13452-4-git-send-email-mihai.caraman@freescale.com> (from mihai.caraman@freescale.com on Wed Jul 3 07:42:36 2013)
On 07/03/2013 07:42:36 AM, Mihai Caraman wrote:
> Increase FPU laziness by calling kvmppc_load_guest_fp() just before
> returning to guest instead of each sched in. Without this improvement
> an interrupt may also claim floting point corrupting guest state.
>
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> ---
> arch/powerpc/kvm/booke.c | 1 +
> arch/powerpc/kvm/e500mc.c | 2 --
> 2 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 113961f..3cae2e3 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -1204,6 +1204,7 @@ int kvmppc_handle_exit(struct kvm_run *run,
> struct kvm_vcpu *vcpu,
> r = (s << 2) | RESUME_HOST | (r &
> RESUME_FLAG_NV);
> } else {
> kvmppc_lazy_ee_enable();
> + kvmppc_load_guest_fp(vcpu);
> }
> }
>
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 19c8379..09da1ac 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -143,8 +143,6 @@ void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu,
> int cpu)
> kvmppc_e500_tlbil_all(vcpu_e500);
> __get_cpu_var(last_vcpu_on_cpu) = vcpu;
> }
> -
> - kvmppc_load_guest_fp(vcpu);
> }
>
> void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu)
Can we now remove vcpu->fpu_active, and the comment that says "Kernel
usage of FP (via
enable_kernel_fp()) in this thread must not occur while
vcpu->fpu_active is set."?
-Scott
next prev parent reply other threads:[~2013-07-03 18:37 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 12:42 [PATCH 0/6] KVM: PPC: Book3E: AltiVec support Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` [PATCH 1/6] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` [PATCH 2/6] KVM: PPC: Book3E: Refactor SPE/FP exit handling Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 13:30 ` Alexander Graf
2013-07-03 13:30 ` Alexander Graf
2013-07-03 13:30 ` Alexander Graf
2013-07-03 13:53 ` Caraman Mihai Claudiu-B02008
2013-07-03 13:53 ` Caraman Mihai Claudiu-B02008
2013-07-03 13:53 ` Caraman Mihai Claudiu-B02008
2013-07-03 15:13 ` Alexander Graf
2013-07-03 15:13 ` Alexander Graf
2013-07-03 15:13 ` Alexander Graf
2013-07-03 18:28 ` Scott Wood
2013-07-03 18:28 ` Scott Wood
2013-07-03 18:28 ` Scott Wood
2013-07-03 18:42 ` Alexander Graf
2013-07-03 18:42 ` Alexander Graf
2013-07-03 18:42 ` Alexander Graf
2013-07-03 18:44 ` Scott Wood
2013-07-03 18:44 ` Scott Wood
2013-07-03 18:44 ` Scott Wood
2013-07-03 12:42 ` [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 13:45 ` Alexander Graf
2013-07-03 13:45 ` Alexander Graf
2013-07-03 13:45 ` Alexander Graf
2013-07-03 13:55 ` Caraman Mihai Claudiu-B02008
2013-07-03 13:55 ` Caraman Mihai Claudiu-B02008
2013-07-03 13:55 ` Caraman Mihai Claudiu-B02008
2013-07-03 15:11 ` Alexander Graf
2013-07-03 15:11 ` Alexander Graf
2013-07-03 15:11 ` Alexander Graf
2013-07-03 15:41 ` Caraman Mihai Claudiu-B02008
2013-07-03 15:41 ` Caraman Mihai Claudiu-B02008
2013-07-03 15:41 ` Caraman Mihai Claudiu-B02008
2013-07-03 16:59 ` Alexander Graf
2013-07-03 16:59 ` Alexander Graf
2013-07-03 16:59 ` Alexander Graf
2013-07-03 17:17 ` Scott Wood
2013-07-03 17:17 ` Scott Wood
2013-07-03 17:17 ` Scott Wood
2013-07-03 17:22 ` Alexander Graf
2013-07-03 17:22 ` Alexander Graf
2013-07-03 17:22 ` Alexander Graf
2013-07-03 17:07 ` Scott Wood
2013-07-03 17:07 ` Scott Wood
2013-07-03 17:07 ` Scott Wood
2013-07-03 17:08 ` Alexander Graf
2013-07-03 17:08 ` Alexander Graf
2013-07-03 17:08 ` Alexander Graf
2013-07-03 17:18 ` Scott Wood
2013-07-03 17:18 ` Scott Wood
2013-07-03 17:18 ` Scott Wood
2013-07-03 17:23 ` Alexander Graf
2013-07-03 17:23 ` Alexander Graf
2013-07-03 17:23 ` Alexander Graf
2013-07-03 17:44 ` Scott Wood
2013-07-03 17:44 ` Scott Wood
2013-07-03 17:44 ` Scott Wood
2013-07-03 18:39 ` Alexander Graf
2013-07-03 18:39 ` Alexander Graf
2013-07-03 18:39 ` Alexander Graf
2013-07-03 18:37 ` Scott Wood [this message]
2013-07-03 18:37 ` Scott Wood
2013-07-03 18:37 ` Scott Wood
2013-07-03 18:40 ` Alexander Graf
2013-07-03 18:40 ` Alexander Graf
2013-07-03 18:40 ` Alexander Graf
2013-07-04 6:50 ` Caraman Mihai Claudiu-B02008
2013-07-04 6:50 ` Caraman Mihai Claudiu-B02008
2013-07-04 6:50 ` Caraman Mihai Claudiu-B02008
2013-07-03 12:42 ` [PATCH 4/6] KVM: PPC: Book3E: Add AltiVec support Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 15:17 ` Alexander Graf
2013-07-03 15:17 ` Alexander Graf
2013-07-03 15:17 ` Alexander Graf
2013-07-03 16:09 ` Caraman Mihai Claudiu-B02008
2013-07-03 16:09 ` Caraman Mihai Claudiu-B02008
2013-07-03 16:09 ` Caraman Mihai Claudiu-B02008
2013-07-03 16:43 ` Alexander Graf
2013-07-03 16:43 ` Alexander Graf
2013-07-03 16:43 ` Alexander Graf
2013-07-03 16:49 ` Caraman Mihai Claudiu-B02008
2013-07-03 16:49 ` Caraman Mihai Claudiu-B02008
2013-07-03 16:49 ` Caraman Mihai Claudiu-B02008
2013-07-03 17:07 ` Alexander Graf
2013-07-03 17:07 ` Alexander Graf
2013-07-03 17:07 ` Alexander Graf
2013-07-03 18:36 ` Scott Wood
2013-07-03 18:36 ` Scott Wood
2013-07-03 18:36 ` Scott Wood
2013-07-03 18:45 ` Alexander Graf
2013-07-03 18:45 ` Alexander Graf
2013-07-03 18:45 ` Alexander Graf
2013-07-03 18:38 ` Scott Wood
2013-07-03 18:38 ` Scott Wood
2013-07-03 18:38 ` Scott Wood
2013-07-03 12:42 ` [PATCH 5/6] KVM: PPC: Book3E: Add ONE_REG " Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` [PATCH 6/6] KVM: PPC: Book3E: Enable e6500 core Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
2013-07-03 12:42 ` Mihai Caraman
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=1372876638.8183.138@snotra \
--to=scottwood@freescale.com \
--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.