diff for duplicates of <1370385365.748.19@snotra> diff --git a/a/1.txt b/N1/1.txt index 7a92c00..15ee20e 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,25 +1,25 @@ On 06/03/2013 03:54:26 PM, Mihai Caraman wrote: -> KVM Book3E FPU support gracefully reuse host infrastructure so we do +> KVM Book3E FPU support gracefully reuse host infrastructure so we do =20 > the -> same for AltiVec. To keep AltiVec lazy call +> same for AltiVec. To keep AltiVec lazy call =20 > kvmppc_load_guest_altivec() > just when returning to guest instead of each sched in. -> +>=20 > Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> > --- -> arch/powerpc/kvm/booke.c | 74 +> arch/powerpc/kvm/booke.c | 74 =20 > +++++++++++++++++++++++++++++++++++++++++++- > arch/powerpc/kvm/e500mc.c | 8 +++++ > 2 files changed, 80 insertions(+), 2 deletions(-) -> +>=20 > diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c > index c08b04b..01eb635 100644 > --- a/arch/powerpc/kvm/booke.c > +++ b/arch/powerpc/kvm/booke.c -> @@ -134,6 +134,23 @@ static void kvmppc_vcpu_sync_fpu(struct kvm_vcpu +> @@ -134,6 +134,23 @@ static void kvmppc_vcpu_sync_fpu(struct kvm_vcpu =20 > *vcpu) > } -> +>=20 > /* > + * Simulate AltiVec unavailable fault to load guest state > + * from thread to AltiVec unit. @@ -31,12 +31,12 @@ On 06/03/2013 03:54:26 PM, Mihai Caraman wrote: > + if (cpu_has_feature(CPU_FTR_ALTIVEC)) { > + if (!(current->thread.regs->msr & MSR_VEC)) { > + load_up_altivec(NULL); -> + current->thread.regs->msr |= MSR_VEC; +> + current->thread.regs->msr |=3D MSR_VEC; > + } > + } > +#endif -Why not use kvmppc_supports_altivec()? In fact, there's nothing +Why not use kvmppc_supports_altivec()? In fact, there's nothing =20 KVM-specific about these functions... > +/* @@ -57,47 +57,47 @@ Whitespace > static inline bool kvmppc_supports_spe(void) > { > #ifdef CONFIG_SPE -> @@ -947,7 +1016,7 @@ int kvmppc_handle_exit(struct kvm_run *run, +> @@ -947,7 +1016,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20 > struct kvm_vcpu *vcpu, > */ -> bool handled = false; -> +> bool handled =3D false; +>=20 > - if (kvmppc_supports_spe()) { -> + if (kvmppc_supports_altivec() || kvmppc_supports_spe()) +> + if (kvmppc_supports_altivec() || kvmppc_supports_spe()) =20 > { > #ifdef CONFIG_SPE > if (cpu_has_feature(CPU_FTR_SPE)) > if (vcpu->arch.shared->msr & MSR_SPE) { -> @@ -976,7 +1045,7 @@ int kvmppc_handle_exit(struct kvm_run *run, +> @@ -976,7 +1045,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20 > struct kvm_vcpu *vcpu, -> * The interrupt is shared, KVM support for the +> * The interrupt is shared, KVM support for the =20 > featured unit > * is detected at run-time. > */ > - if (kvmppc_supports_spe()) { -> + if (kvmppc_supports_altivec() || kvmppc_supports_spe()) +> + if (kvmppc_supports_altivec() || kvmppc_supports_spe()) =20 > { > kvmppc_booke_queue_irqprio(vcpu, -> +> =20 > BOOKE_IRQPRIO_SPE_FP_DATA_ALTIVEC_ASSIST); -> r = RESUME_GUEST; +> r =3D RESUME_GUEST; -The distinction between how you're handling SPE and Altivec here -doesn't really have anything to do with SPE versus Altivec -- it's +The distinction between how you're handling SPE and Altivec here =20 +doesn't really have anything to do with SPE versus Altivec -- it's =20 PR-mode versus HV-mode. -> @@ -1188,6 +1257,7 @@ int kvmppc_handle_exit(struct kvm_run *run, +> @@ -1188,6 +1257,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20 > struct kvm_vcpu *vcpu, -> r = (s << 2) | RESUME_HOST | (r & +> r =3D (s << 2) | RESUME_HOST | (r & =20 > RESUME_FLAG_NV); > } else { > kvmppc_lazy_ee_enable(); > + kvmppc_load_guest_altivec(vcpu); > } > } -> +>=20 -Why do you need to call an Altivec function here if we don't need to +Why do you need to call an Altivec function here if we don't need to =20 call an ordinary FPU function here? --Scott +-Scott= diff --git a/a/content_digest b/N1/content_digest index f65c86d..1e155fd 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,36 +1,36 @@ "ref\01370292868-2697-5-git-send-email-mihai.caraman@freescale.com\0" "From\0Scott Wood <scottwood@freescale.com>\0" "Subject\0Re: [RFC PATCH 4/6] KVM: PPC: Book3E: Add AltiVec support\0" - "Date\0Tue, 04 Jun 2013 22:36:05 +0000\0" + "Date\0Tue, 4 Jun 2013 17:36:05 -0500\0" "To\0Mihai Caraman <mihai.caraman@freescale.com>\0" - "Cc\0kvm-ppc@vger.kernel.org" - kvm@vger.kernel.org + "Cc\0Mihai Caraman <mihai.caraman@freescale.com>" linuxppc-dev@lists.ozlabs.org - " Mihai Caraman <mihai.caraman@freescale.com>\0" + kvm@vger.kernel.org + " kvm-ppc@vger.kernel.org\0" "\00:1\0" "b\0" "On 06/03/2013 03:54:26 PM, Mihai Caraman wrote:\n" - "> KVM Book3E FPU support gracefully reuse host infrastructure so we do \n" + "> KVM Book3E FPU support gracefully reuse host infrastructure so we do =20\n" "> the\n" - "> same for AltiVec. To keep AltiVec lazy call \n" + "> same for AltiVec. To keep AltiVec lazy call =20\n" "> kvmppc_load_guest_altivec()\n" "> just when returning to guest instead of each sched in.\n" - "> \n" + ">=20\n" "> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>\n" "> ---\n" - "> arch/powerpc/kvm/booke.c | 74 \n" + "> arch/powerpc/kvm/booke.c | 74 =20\n" "> +++++++++++++++++++++++++++++++++++++++++++-\n" "> arch/powerpc/kvm/e500mc.c | 8 +++++\n" "> 2 files changed, 80 insertions(+), 2 deletions(-)\n" - "> \n" + ">=20\n" "> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c\n" "> index c08b04b..01eb635 100644\n" "> --- a/arch/powerpc/kvm/booke.c\n" "> +++ b/arch/powerpc/kvm/booke.c\n" - "> @@ -134,6 +134,23 @@ static void kvmppc_vcpu_sync_fpu(struct kvm_vcpu \n" + "> @@ -134,6 +134,23 @@ static void kvmppc_vcpu_sync_fpu(struct kvm_vcpu =20\n" "> *vcpu)\n" "> }\n" - "> \n" + ">=20\n" "> /*\n" "> + * Simulate AltiVec unavailable fault to load guest state\n" "> + * from thread to AltiVec unit.\n" @@ -42,12 +42,12 @@ "> +\tif (cpu_has_feature(CPU_FTR_ALTIVEC)) {\n" "> +\t\tif (!(current->thread.regs->msr & MSR_VEC)) {\n" "> +\t\t\tload_up_altivec(NULL);\n" - "> +\t\t\tcurrent->thread.regs->msr |= MSR_VEC;\n" + "> +\t\t\tcurrent->thread.regs->msr |=3D MSR_VEC;\n" "> +\t\t}\n" "> +\t}\n" "> +#endif\n" "\n" - "Why not use kvmppc_supports_altivec()? In fact, there's nothing \n" + "Why not use kvmppc_supports_altivec()? In fact, there's nothing =20\n" "KVM-specific about these functions...\n" "\n" "> +/*\n" @@ -68,49 +68,49 @@ "> static inline bool kvmppc_supports_spe(void)\n" "> {\n" "> #ifdef CONFIG_SPE\n" - "> @@ -947,7 +1016,7 @@ int kvmppc_handle_exit(struct kvm_run *run, \n" + "> @@ -947,7 +1016,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20\n" "> struct kvm_vcpu *vcpu,\n" "> \t\t */\n" - "> \t\tbool handled = false;\n" - "> \n" + "> \t\tbool handled =3D false;\n" + ">=20\n" "> -\t\tif (kvmppc_supports_spe()) {\n" - "> +\t\tif (kvmppc_supports_altivec() || kvmppc_supports_spe()) \n" + "> +\t\tif (kvmppc_supports_altivec() || kvmppc_supports_spe()) =20\n" "> {\n" "> #ifdef CONFIG_SPE\n" "> \t\t\tif (cpu_has_feature(CPU_FTR_SPE))\n" "> \t\t\t\tif (vcpu->arch.shared->msr & MSR_SPE) {\n" - "> @@ -976,7 +1045,7 @@ int kvmppc_handle_exit(struct kvm_run *run, \n" + "> @@ -976,7 +1045,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20\n" "> struct kvm_vcpu *vcpu,\n" - "> \t\t * The interrupt is shared, KVM support for the \n" + "> \t\t * The interrupt is shared, KVM support for the =20\n" "> featured unit\n" "> \t\t * is detected at run-time.\n" "> \t\t */\n" "> -\t\tif (kvmppc_supports_spe()) {\n" - "> +\t\tif (kvmppc_supports_altivec() || kvmppc_supports_spe()) \n" + "> +\t\tif (kvmppc_supports_altivec() || kvmppc_supports_spe()) =20\n" "> {\n" "> \t\t\tkvmppc_booke_queue_irqprio(vcpu,\n" - "> \t\t\t\t \n" + "> \t\t\t\t=20\n" "> BOOKE_IRQPRIO_SPE_FP_DATA_ALTIVEC_ASSIST);\n" - "> \t\t\tr = RESUME_GUEST;\n" + "> \t\t\tr =3D RESUME_GUEST;\n" "\n" - "The distinction between how you're handling SPE and Altivec here \n" - "doesn't really have anything to do with SPE versus Altivec -- it's \n" + "The distinction between how you're handling SPE and Altivec here =20\n" + "doesn't really have anything to do with SPE versus Altivec -- it's =20\n" "PR-mode versus HV-mode.\n" "\n" - "> @@ -1188,6 +1257,7 @@ int kvmppc_handle_exit(struct kvm_run *run, \n" + "> @@ -1188,6 +1257,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20\n" "> struct kvm_vcpu *vcpu,\n" - "> \t\t\tr = (s << 2) | RESUME_HOST | (r & \n" + "> \t\t\tr =3D (s << 2) | RESUME_HOST | (r & =20\n" "> RESUME_FLAG_NV);\n" "> \t\t} else {\n" "> \t\t\tkvmppc_lazy_ee_enable();\n" "> +\t\t\tkvmppc_load_guest_altivec(vcpu);\n" "> \t\t}\n" "> \t}\n" - "> \n" + ">=20\n" "\n" - "Why do you need to call an Altivec function here if we don't need to \n" + "Why do you need to call an Altivec function here if we don't need to =20\n" "call an ordinary FPU function here?\n" "\n" - -Scott + -Scott= -e8dc498edd03bd33e9a08be0227e8fb874c64d77ef83c7b759826b950579f1da +b3245a81bbfc707555cbacd75105f593a166d8c505ed735cc2d7ba8df7079794
diff --git a/a/content_digest b/N2/content_digest index f65c86d..cc122c9 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,11 +1,11 @@ "ref\01370292868-2697-5-git-send-email-mihai.caraman@freescale.com\0" "From\0Scott Wood <scottwood@freescale.com>\0" "Subject\0Re: [RFC PATCH 4/6] KVM: PPC: Book3E: Add AltiVec support\0" - "Date\0Tue, 04 Jun 2013 22:36:05 +0000\0" + "Date\0Tue, 4 Jun 2013 17:36:05 -0500\0" "To\0Mihai Caraman <mihai.caraman@freescale.com>\0" - "Cc\0kvm-ppc@vger.kernel.org" - kvm@vger.kernel.org - linuxppc-dev@lists.ozlabs.org + "Cc\0<kvm-ppc@vger.kernel.org>" + <kvm@vger.kernel.org> + <linuxppc-dev@lists.ozlabs.org> " Mihai Caraman <mihai.caraman@freescale.com>\0" "\00:1\0" "b\0" @@ -113,4 +113,4 @@ "\n" -Scott -e8dc498edd03bd33e9a08be0227e8fb874c64d77ef83c7b759826b950579f1da +0ec2536bbd8f638390075d63821942a10ece2a5b1fe328bd517e7babfd24ba66
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.