Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-31 Thread Marc Zyngier
On Wed, 31 Mar 2021 16:28:46 +0100, Alexandru Elisei wrote: > > Hello, > > On 3/30/21 12:12 PM, Suzuki K Poulose wrote: > > Hi Marc > > > > On 30/03/2021 11:12, Marc Zyngier wrote: > >> Hi Suzuki, > >> > >> [+ Alex] > >> > >> On Tue, 23 Mar 2021 12:06:35 +, > >> Suzuki K Poulose wrote: >

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-31 Thread Alexandru Elisei
Hello, On 3/30/21 12:12 PM, Suzuki K Poulose wrote: > Hi Marc > > On 30/03/2021 11:12, Marc Zyngier wrote: >> Hi Suzuki, >> >> [+ Alex] >> >> On Tue, 23 Mar 2021 12:06:35 +, >> Suzuki K Poulose wrote: >>> [..] >> >>>   #define MDCR_EL2_TTRF    (1 << 19) >>>   #define MDCR_EL2_TPMS   

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Mathieu Poirier
On Tue, 30 Mar 2021 at 10:47, Greg KH wrote: > > On Tue, Mar 30, 2021 at 10:33:51AM -0600, Mathieu Poirier wrote: > > On Tue, 30 Mar 2021 at 09:35, Greg KH wrote: > > > > > > On Tue, Mar 30, 2021 at 09:23:14AM -0600, Mathieu Poirier wrote: > > > > On Tue, Mar 30, 2021 at 11:38:18AM +0100, Suzuki

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Greg KH
On Tue, Mar 30, 2021 at 10:33:51AM -0600, Mathieu Poirier wrote: > On Tue, 30 Mar 2021 at 09:35, Greg KH wrote: > > > > On Tue, Mar 30, 2021 at 09:23:14AM -0600, Mathieu Poirier wrote: > > > On Tue, Mar 30, 2021 at 11:38:18AM +0100, Suzuki K Poulose wrote: > > > > On 26/03/2021 16:55, Mathieu

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Mathieu Poirier
On Tue, 30 Mar 2021 at 09:35, Greg KH wrote: > > On Tue, Mar 30, 2021 at 09:23:14AM -0600, Mathieu Poirier wrote: > > On Tue, Mar 30, 2021 at 11:38:18AM +0100, Suzuki K Poulose wrote: > > > On 26/03/2021 16:55, Mathieu Poirier wrote: > > > > On Tue, Mar 23, 2021 at 12:06:35PM +, Suzuki K

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Greg KH
On Tue, Mar 30, 2021 at 09:23:14AM -0600, Mathieu Poirier wrote: > On Tue, Mar 30, 2021 at 11:38:18AM +0100, Suzuki K Poulose wrote: > > On 26/03/2021 16:55, Mathieu Poirier wrote: > > > On Tue, Mar 23, 2021 at 12:06:35PM +, Suzuki K Poulose wrote: > > > > For a nvhe host, the EL2 must allow

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Marc Zyngier
On Tue, 30 Mar 2021 16:23:14 +0100, Mathieu Poirier wrote: > > On Tue, Mar 30, 2021 at 11:38:18AM +0100, Suzuki K Poulose wrote: > > On 26/03/2021 16:55, Mathieu Poirier wrote: > > > On Tue, Mar 23, 2021 at 12:06:35PM +, Suzuki K Poulose wrote: > > > > For a nvhe host, the EL2 must allow the

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Mathieu Poirier
On Tue, Mar 30, 2021 at 11:38:18AM +0100, Suzuki K Poulose wrote: > On 26/03/2021 16:55, Mathieu Poirier wrote: > > On Tue, Mar 23, 2021 at 12:06:35PM +, Suzuki K Poulose wrote: > > > For a nvhe host, the EL2 must allow the EL1&0 translation > > > regime for TraceBuffer (MDCR_EL2.E2TB ==

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Marc Zyngier
On Tue, 30 Mar 2021 14:34:23 +0100, Suzuki K Poulose wrote: > > On 30/03/2021 13:15, Marc Zyngier wrote: > > On Tue, 30 Mar 2021 12:12:49 +0100, > > Suzuki K Poulose wrote: [...] > >> May be we could do this check at kvm_arch_vcpu_load()/put() ? > > > > That would extend the tracing blackout

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Suzuki K Poulose
On 30/03/2021 13:15, Marc Zyngier wrote: On Tue, 30 Mar 2021 12:12:49 +0100, Suzuki K Poulose wrote: Hi Marc On 30/03/2021 11:12, Marc Zyngier wrote: Hi Suzuki, [+ Alex] On Tue, 23 Mar 2021 12:06:35 +, Suzuki K Poulose wrote: For a nvhe host, the EL2 must allow the EL1&0

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Marc Zyngier
On Tue, 30 Mar 2021 12:12:49 +0100, Suzuki K Poulose wrote: > > Hi Marc > > On 30/03/2021 11:12, Marc Zyngier wrote: > > Hi Suzuki, > > > > [+ Alex] > > > > On Tue, 23 Mar 2021 12:06:35 +, > > Suzuki K Poulose wrote: > >> > >> For a nvhe host, the EL2 must allow the EL1&0 translation >

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Suzuki K Poulose
Hi Marc On 30/03/2021 11:12, Marc Zyngier wrote: Hi Suzuki, [+ Alex] On Tue, 23 Mar 2021 12:06:35 +, Suzuki K Poulose wrote: For a nvhe host, the EL2 must allow the EL1&0 translation regime for TraceBuffer (MDCR_EL2.E2TB == 0b11). This must be saved/restored over a trip to the guest.

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Suzuki K Poulose
On 26/03/2021 16:55, Mathieu Poirier wrote: On Tue, Mar 23, 2021 at 12:06:35PM +, Suzuki K Poulose wrote: For a nvhe host, the EL2 must allow the EL1&0 translation regime for TraceBuffer (MDCR_EL2.E2TB == 0b11). This must be saved/restored over a trip to the guest. Also, before entering the

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Marc Zyngier
Hi Mathieu, On Fri, 26 Mar 2021 16:55:50 +, Mathieu Poirier wrote: > > On Tue, Mar 23, 2021 at 12:06:35PM +, Suzuki K Poulose wrote: > > For a nvhe host, the EL2 must allow the EL1&0 translation > > regime for TraceBuffer (MDCR_EL2.E2TB == 0b11). This must > > be saved/restored over a

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-30 Thread Marc Zyngier
Hi Suzuki, [+ Alex] On Tue, 23 Mar 2021 12:06:35 +, Suzuki K Poulose wrote: > > For a nvhe host, the EL2 must allow the EL1&0 translation > regime for TraceBuffer (MDCR_EL2.E2TB == 0b11). This must > be saved/restored over a trip to the guest. Also, before > entering the guest, we must

Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-26 Thread Mathieu Poirier
On Tue, Mar 23, 2021 at 12:06:35PM +, Suzuki K Poulose wrote: > For a nvhe host, the EL2 must allow the EL1&0 translation > regime for TraceBuffer (MDCR_EL2.E2TB == 0b11). This must > be saved/restored over a trip to the guest. Also, before > entering the guest, we must flush any trace data if

[PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host

2021-03-23 Thread Suzuki K Poulose
For a nvhe host, the EL2 must allow the EL1&0 translation regime for TraceBuffer (MDCR_EL2.E2TB == 0b11). This must be saved/restored over a trip to the guest. Also, before entering the guest, we must flush any trace data if the TRBE was enabled. And we must prohibit the generation of trace while