Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-08 Thread Peter Maydell
On Thu, 31 Aug 2023 at 20:01, Colton Lewis wrote: > > Due to recent KVM changes, QEMU is setting a ptimer offset resulting > in unintended trap and emulate access and a consequent performance > hit. Filter out the PTIMER_CNT register to restore trapless ptimer > access. > > Quoting Andrew Jones: >

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-08 Thread Peter Maydell
On Thu, 7 Sept 2023 at 20:31, Michael Tokarev wrote: > > 31.08.2023 22:00, Colton Lewis wrote: > > Due to recent KVM changes, QEMU is setting a ptimer offset resulting > > in unintended trap and emulate access and a consequent performance > > hit. Filter out the PTIMER_CNT register to restore trap

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-08 Thread Andrew Jones
On Thu, Sep 07, 2023 at 10:31:20PM +0300, Michael Tokarev wrote: > 31.08.2023 22:00, Colton Lewis wrote: > > Due to recent KVM changes, QEMU is setting a ptimer offset resulting > > in unintended trap and emulate access and a consequent performance > > hit. Filter out the PTIMER_CNT register to res

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-07 Thread Michael Tokarev
31.08.2023 22:00, Colton Lewis wrote: Due to recent KVM changes, QEMU is setting a ptimer offset resulting in unintended trap and emulate access and a consequent performance hit. Filter out the PTIMER_CNT register to restore trapless ptimer access. Quoting Andrew Jones: Simply reading the CNT r

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-04 Thread Claudio Fontana
On 9/4/23 13:07, Andrew Jones wrote: > On Mon, Sep 04, 2023 at 10:18:05AM +0200, Claudio Fontana wrote: >> Hi, >> >> I think this discussion from ~2015 could potentially be be historically >> relevant for context, >> at the time we had the problem with CNTVOFF IIRC so KVM_REG_ARM_TIMER_CNT >> bei

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-04 Thread Andrew Jones
On Mon, Sep 04, 2023 at 10:18:05AM +0200, Claudio Fontana wrote: > Hi, > > I think this discussion from ~2015 could potentially be be historically > relevant for context, > at the time we had the problem with CNTVOFF IIRC so KVM_REG_ARM_TIMER_CNT > being read and rewritten causing time warps in

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-04 Thread Claudio Fontana
Hi, I think this discussion from ~2015 could potentially be be historically relevant for context, at the time we had the problem with CNTVOFF IIRC so KVM_REG_ARM_TIMER_CNT being read and rewritten causing time warps in the guest: https://patchwork.kernel.org/project/linux-arm-kernel/patch/14351

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-01 Thread Colton Lewis
On Fri, Sep 01, 2023 at 09:35:47AM +0200, Andrew Jones wrote: > On Thu, Aug 31, 2023 at 07:00:52PM +, Colton Lewis wrote: > > Due to recent KVM changes, QEMU is setting a ptimer offset resulting > > in unintended trap and emulate access and a consequent performance > > hit. Filter out the PTIME

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-01 Thread Andrew Jones
On Thu, Aug 31, 2023 at 07:00:52PM +, Colton Lewis wrote: > Due to recent KVM changes, QEMU is setting a ptimer offset resulting > in unintended trap and emulate access and a consequent performance > hit. Filter out the PTIMER_CNT register to restore trapless ptimer > access. > > Quoting Andre

Re: [PATCH] arm64: Restore trapless ptimer access

2023-08-31 Thread Richard Henderson
On 8/31/23 12:00, Colton Lewis wrote: Due to recent KVM changes, QEMU is setting a ptimer offset resulting in unintended trap and emulate access and a consequent performance hit. Filter out the PTIMER_CNT register to restore trapless ptimer access. Quoting Andrew Jones: Simply reading the CNT r

[PATCH] arm64: Restore trapless ptimer access

2023-08-31 Thread Colton Lewis
Due to recent KVM changes, QEMU is setting a ptimer offset resulting in unintended trap and emulate access and a consequent performance hit. Filter out the PTIMER_CNT register to restore trapless ptimer access. Quoting Andrew Jones: Simply reading the CNT register and writing back the same value