RE: [PATCH 4/6 v2] KVM: PPC: Book3E: Add AltiVec support
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:32 PM To: Caraman Mihai Claudiu-B02008; kvm-...@vger.kernel.org Cc: kvm@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re: [PATCH 4/6 v2] KVM: PPC: Book3E: Add AltiVec support On 30.06.14 17:34, Mihai Caraman wrote: Add KVM Book3E AltiVec support. KVM Book3E FPU support gracefully reuse host infrastructure so follow the same approach for AltiVec. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com Same comment here - I fail to see how we refetch Altivec state after a context switch. See previous comment. I also run my usual Altivec stress test consisting in a guest and host process running affine to a physical core an competing for the same unit's resources using different data sets. -Mike -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/6 v2] KVM: PPC: Book3E: Add AltiVec support
On Mon, 2014-06-30 at 18:34 +0300, Mihai Caraman wrote: Add KVM Book3E AltiVec support. KVM Book3E FPU support gracefully reuse host infrastructure so follow the same approach for AltiVec. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- v2: - integrate Paul's FP/VMX/VSX changes arch/powerpc/kvm/booke.c | 67 ++-- 1 file changed, 65 insertions(+), 2 deletions(-) I had to apply the whole patchset to get proper context for reviewing this, and found some nits: case BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST: if (kvmppc_supports_spe() || kvmppc_supports_altivec()) { kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_SPE_FP_DATA_ALTIVEC_ASSIST); r = RESUME_GUEST; } else { /* * These really should never happen without CONFIG_SPE, * as we should never enable the real MSR[SPE] in the * guest. */ Besides the comment not being updated for Altivec, it's not true on HV, where the guest can enable MSR[VEC] all by itself. For HV, the reason we shouldn't be able to get here is that we disable KVM on e6500 if CONFIG_ALTIVEC is not enabled, and no other HV core supports either SPE or Altivec. pr_crit(%s: unexpected SPE interrupt %u at %08lx\n, __func__, exit_nr, vcpu-arch.pc); Error string will say SPE regardless of what sort of chip you're on. Given that this is explicitly on the no support for Altivec or SPE path, SPE/Altivec phrasing seems appropriate. Of course we have bigger problems than that if we ever reach this code. :-) -Scott -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/6 v2] KVM: PPC: Book3E: Add AltiVec support
On 30.06.14 17:34, Mihai Caraman wrote: Add KVM Book3E AltiVec support. KVM Book3E FPU support gracefully reuse host infrastructure so follow the same approach for AltiVec. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com Same comment here - I fail to see how we refetch Altivec state after a context switch. Alex -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 4/6 v2] KVM: PPC: Book3E: Add AltiVec support
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:32 PM To: Caraman Mihai Claudiu-B02008; kvm-ppc@vger.kernel.org Cc: k...@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re: [PATCH 4/6 v2] KVM: PPC: Book3E: Add AltiVec support On 30.06.14 17:34, Mihai Caraman wrote: Add KVM Book3E AltiVec support. KVM Book3E FPU support gracefully reuse host infrastructure so follow the same approach for AltiVec. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com Same comment here - I fail to see how we refetch Altivec state after a context switch. See previous comment. I also run my usual Altivec stress test consisting in a guest and host process running affine to a physical core an competing for the same unit's resources using different data sets. -Mike -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/6 v2] KVM: PPC: Book3E: Add AltiVec support
On Mon, 2014-06-30 at 18:34 +0300, Mihai Caraman wrote: Add KVM Book3E AltiVec support. KVM Book3E FPU support gracefully reuse host infrastructure so follow the same approach for AltiVec. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- v2: - integrate Paul's FP/VMX/VSX changes arch/powerpc/kvm/booke.c | 67 ++-- 1 file changed, 65 insertions(+), 2 deletions(-) I had to apply the whole patchset to get proper context for reviewing this, and found some nits: case BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST: if (kvmppc_supports_spe() || kvmppc_supports_altivec()) { kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_SPE_FP_DATA_ALTIVEC_ASSIST); r = RESUME_GUEST; } else { /* * These really should never happen without CONFIG_SPE, * as we should never enable the real MSR[SPE] in the * guest. */ Besides the comment not being updated for Altivec, it's not true on HV, where the guest can enable MSR[VEC] all by itself. For HV, the reason we shouldn't be able to get here is that we disable KVM on e6500 if CONFIG_ALTIVEC is not enabled, and no other HV core supports either SPE or Altivec. pr_crit(%s: unexpected SPE interrupt %u at %08lx\n, __func__, exit_nr, vcpu-arch.pc); Error string will say SPE regardless of what sort of chip you're on. Given that this is explicitly on the no support for Altivec or SPE path, SPE/Altivec phrasing seems appropriate. Of course we have bigger problems than that if we ever reach this code. :-) -Scott -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html