All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/12] powerpc: Disable HFSCR:TM if TM not supported
@ 2017-03-20  6:49 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 38+ messages in thread
From: Benjamin Herrenschmidt @ 2017-03-20  6:49 UTC (permalink / raw)
  To: linuxppc-dev, kvm-ppc

Otherwise KVM guests might mess with it even when told not
to causing bad thing interrupts in the host

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/setup_64.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 9cfaa8b..b372b23 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -236,6 +236,16 @@ static void cpu_ready_for_interrupts(void)
 		mtspr(SPRN_LPCR, lpcr | LPCR_AIL_3);
 	}
 
+	/*
+	 * Fixup HFSCR:TM based on CPU features. The bit is set by our
+	 * early asm init because at that point we haven't updated our
+	 * CPU features from firmware and device-tree. Here we have,
+	 * so let's do it
+	 */
+	if (early_cpu_has_feature(CPU_FTR_HVMODE) &&
+	    !early_cpu_has_feature(CPU_FTR_TM_COMP))
+		mtspr(SPRN_HFSCR, mfspr(SPRN_HFSCR) & ~HFSCR_TM);
+
 	/* Set IR and DR in PACA MSR */
 	get_paca()->kernel_msr = MSR_KERNEL;
 }
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2017-04-04 14:12 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20  6:49 [PATCH 01/12] powerpc: Disable HFSCR:TM if TM not supported Benjamin Herrenschmidt
2017-03-20  6:49 ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 02/12] powerpc: Sync opal-api.h Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-04-04 12:20   ` Michael Ellerman
2017-04-04 12:20     ` Michael Ellerman
2017-04-04 13:47     ` Benjamin Herrenschmidt
2017-04-04 13:47       ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 03/12] powerpc: Add more PPC bit conversion macros Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 04/12] powerpc: Add optional smp_ops->prepare_cpu SMP callback Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 05/12] powerpc/smp: Remove migrate_irq() custom implementation Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 06/12] powerpc/xive: Native exploitation of the XIVE interrupt controller Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-24  5:22   ` Paul Mackerras
2017-03-24  5:22     ` Paul Mackerras
2017-04-04 13:03   ` Michael Ellerman
2017-04-04 13:03     ` Michael Ellerman
2017-04-04 14:12     ` Benjamin Herrenschmidt
2017-04-04 14:12       ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 07/12] powerpc/kvm: Massage order of #include Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 08/12] powerpc/kvm: Make kvmppc_xics_create_icp static Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 09/12] powerpc/kvm: Remove obsolete kvm_vm_ioctl_xics_irq declaration Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 10/12] powerpc: Consolidate variants of real-mode MMIOs Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 11/12] powerpc: Fixup LPCR:PECE and HEIC setting on POWER9 Benjamin Herrenschmidt
2017-03-20  6:49   ` Benjamin Herrenschmidt
2017-03-20  6:49 ` [PATCH 12/12] powerpc/kvm: Native usage of the XIVE interrupt controller Benjamin Herrenschmidt
2017-03-28  5:26   ` Paul Mackerras
2017-04-03  2:25     ` Benjamin Herrenschmidt
2017-04-03  2:25       ` Benjamin Herrenschmidt
2017-03-31 12:35 ` [01/12] powerpc: Disable HFSCR:TM if TM not supported Michael Ellerman
2017-03-31 12:35   ` Michael Ellerman

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.