Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-27 Thread Kumar Gala
On Jun 14, 2011, at 6:04 PM, Timur Tabi wrote: The Freescale hypervisor does not allow guests to write to the timebase registers (virtualizing the timebase register was deemed too complicated), so don't try to synchronize the timebase registers when we're running under the hypervisor.

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-24 Thread Scott Wood
On Thu, 23 Jun 2011 21:38:58 -0500 Tabi Timur-B04825 b04...@freescale.com wrote: Segher Boessenkool wrote: v2.06 III-E 9.2.1: Writing the Time Base is hypervisor privileged. v2.06 III-E 2.1: If a hypervisor-privileged register is accessed in the guest supervisor state (MSR[GS PR] =

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-24 Thread Benjamin Herrenschmidt
On Wed, 2011-06-22 at 06:44 -0500, Kumar Gala wrote: Any ETA on Paul's intro of the FTR bit? If not I'll pull this into my 'next' tree and we can clean up later. His latest KVM patch set has that. Cheers, Ben. ___ Linuxppc-dev mailing list

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-23 Thread Scott Wood
On Wed, 22 Jun 2011 09:55:36 -0500 Timur Tabi ti...@freescale.com wrote: Kumar Gala wrote: Well, not exactly. Paul wants to break that up since we're adding some primitive support for 201 HV mode too (for 970's). Last we discussed, the plan was to go for a generic HV mode bit and a

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-23 Thread Timur Tabi
Scott Wood wrote: From Power ISA 2.06B, book III-E, section 9.2.1: Virtualized Implementation Note: In virtualized implementations, TBU and TBL are read-only. But does that mean that a guest should never be allowed to modify a virtualized timebase register, even if the hypervisor can

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-23 Thread Scott Wood
On Thu, 23 Jun 2011 12:33:40 -0500 Timur Tabi ti...@freescale.com wrote: Scott Wood wrote: From Power ISA 2.06B, book III-E, section 9.2.1: Virtualized Implementation Note: In virtualized implementations, TBU and TBL are read-only. But does that mean that a guest should never be

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-23 Thread Tabi Timur-B04825
Segher Boessenkool wrote: v2.06 III-E 9.2.1: Writing the Time Base is hypervisor privileged. v2.06 III-E 2.1: If a hypervisor-privileged register is accessed in the guest supervisor state (MSR[GS PR] = 0b10), an Embedded Hypervisor Privilege exception occurs. (v2.06 III-E 5.4.1, the big

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-23 Thread Segher Boessenkool
(context put back:) But does that mean that a guest should never be allowed to modify a virtualized timebase register, even if the hypervisor can support it? The book3e mtspr writeup doesn't appear to specify the behavior when writing to a read-only SPR, so perhaps you could argue that

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-22 Thread Kumar Gala
On Jun 14, 2011, at 9:33 PM, Benjamin Herrenschmidt wrote: On Wed, 2011-06-15 at 02:10 +, Tabi Timur-B04825 wrote: Benjamin Herrenschmidt wrote: We might want to generically have a CPU feature bit indicating we are running in guest vs. HV mode. I know Paulus is planning to introduce one

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-22 Thread Timur Tabi
Kumar Gala wrote: Well, not exactly. Paul wants to break that up since we're adding some primitive support for 201 HV mode too (for 970's). Last we discussed, the plan was to go for a generic HV mode bit and a separate bit for the version. Cheers, Ben. Any ETA on Paul's intro

[PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-14 Thread Timur Tabi
The Freescale hypervisor does not allow guests to write to the timebase registers (virtualizing the timebase register was deemed too complicated), so don't try to synchronize the timebase registers when we're running under the hypervisor. This typically happens when kexec support is enabled.

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-14 Thread Scott Wood
On Tue, 14 Jun 2011 18:04:33 -0500 Timur Tabi ti...@freescale.com wrote: The Freescale hypervisor does not allow guests to write to the timebase registers (virtualizing the timebase register was deemed too complicated), so don't try to synchronize the timebase registers when we're running

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-14 Thread Timur Tabi
Scott Wood wrote: FWIW, it's not supported under KVM either -- though we don't support an SMP guest under KVM yet, and KVM silently ignores it rather than logs errors as the FSL HV does. Does KVM set the root compatible to fsl,P4080DS-hv? -- Timur Tabi Linux kernel developer at Freescale

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-14 Thread Scott Wood
On Tue, 14 Jun 2011 18:15:26 -0500 Timur Tabi ti...@freescale.com wrote: Scott Wood wrote: FWIW, it's not supported under KVM either -- though we don't support an SMP guest under KVM yet, and KVM silently ignores it rather than logs errors as the FSL HV does. Does KVM set the root

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-14 Thread Benjamin Herrenschmidt
On Tue, 2011-06-14 at 18:25 -0500, Scott Wood wrote: On Tue, 14 Jun 2011 18:15:26 -0500 Timur Tabi ti...@freescale.com wrote: Scott Wood wrote: FWIW, it's not supported under KVM either -- though we don't support an SMP guest under KVM yet, and KVM silently ignores it rather than

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-14 Thread Tabi Timur-B04825
Benjamin Herrenschmidt wrote: We might want to generically have a CPU feature bit indicating we are running in guest vs. HV mode. I know Paulus is planning to introduce one so you may want to sync with him. Are you talking about CPU_FTR_HVMODE_206? -- Timur Tabi Linux kernel developer at

Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor

2011-06-14 Thread Benjamin Herrenschmidt
On Wed, 2011-06-15 at 02:10 +, Tabi Timur-B04825 wrote: Benjamin Herrenschmidt wrote: We might want to generically have a CPU feature bit indicating we are running in guest vs. HV mode. I know Paulus is planning to introduce one so you may want to sync with him. Are you talking about