[PATCH] drm/panfrost: Don't corrupt the queue mutex on open/close

2020-10-29 Thread Steven Price
it belongs. Fixes: 1a11a88cfd9a ("drm/panfrost: Fix job timeout handling") Signed-off-by: Steven Price Reviewed-by: Boris Brezillon --- drivers/gpu/drm/panfrost/panfrost_job.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfros

[PATCH v4 1/2] arm64: kvm: Save/restore MTE registers

2020-10-26 Thread Steven Price
Define the new system registers that MTE introduces and context switch them. The MTE feature is still hidden from the ID register as it isn't supported in a VM yet. Signed-off-by: Steven Price Reviewed-by: Andrew Jones --- arch/arm64/include/asm/kvm_host.h | 4 arch/arm64

[PATCH v4 0/2] MTE support for KVM guest

2020-10-26 Thread Steven Price
to expose the KVM_CAP before everything is ready. Steven Price (2): arm64: kvm: Save/restore MTE registers arm64: kvm: Introduce MTE VCPU feature arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h | 7 +++ arch/arm64/include/asm/sysreg.h

[PATCH v4 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-10-26 Thread Steven Price
are correctly saved/restored across swap. Signed-off-by: Steven Price Reviewed-by: Andrew Jones --- arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h| 3 +++ arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/mmu.c | 20

Re: [PATCH] drm/panfrost: increase readl_relaxed_poll_timeout values

2020-10-09 Thread Steven Price
: Add initial panfrost driver") Suggested-by: Steven Price Signed-off-by: Christian Hewitt Reviewed-by: Steven Price I'll push this to drm-misc-next-fixes so it should coincide with the Bifrost support already in drm-misc-next. Steve --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 4 ++-

Re: [PATCH v3 0/2] MTE support for KVM guest

2020-10-02 Thread Steven Price
On 02/10/2020 15:36, Andrew Jones wrote: On Fri, Sep 25, 2020 at 10:36:05AM +0100, Steven Price wrote: Version 3 of adding MTE support for KVM guests. See the previous (v2) posting for background: https://lore.kernel.org/r/20200904160018.29481-1-steven.price%40arm.com These patches add

Re: [PATCH v3 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-10-02 Thread Steven Price
On 02/10/2020 15:30, Andrew Jones wrote: On Fri, Sep 25, 2020 at 10:36:07AM +0100, Steven Price wrote: Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging for a VM. This exposes the feature to the guest and automatically tags memory pages touched by the VM as PG_mte_tagged

Re: [PATCH -next] drm/panfrost: simplify the return expression of panfrost_devfreq_target()

2020-10-01 Thread Steven Price
On 01/10/2020 12:25, Daniel Vetter wrote: On Thu, Oct 1, 2020 at 12:58 PM Steven Price wrote: On 21/09/2020 14:10, Qinglang Miao wrote: Simplify the return expression. Signed-off-by: Qinglang Miao Reviewed-by: Steven Price As committer/maintainer for this please indicate whether

Re: [PATCH -next] drm/panfrost: simplify the return expression of cz_ih_hw_init()

2020-10-01 Thread Steven Price
On 21/09/2020 14:10, Qinglang Miao wrote: Simplify the return expression. Signed-off-by: Qinglang Miao Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_device.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panfrost

Re: [PATCH -next] drm/panfrost: simplify the return expression of panfrost_devfreq_target()

2020-10-01 Thread Steven Price
On 21/09/2020 14:10, Qinglang Miao wrote: Simplify the return expression. Signed-off-by: Qinglang Miao Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panfrost

[PATCH v3 0/2] MTE support for KVM guest

2020-09-25 Thread Steven Price
accesses have been performed. [1] https://lore.kernel.org/r/20200904103029.32083-1-catalin.mari...@arm.com Steven Price (2): arm64: kvm: Save/restore MTE registers arm64: kvm: Introduce MTE VCPU feature arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h

[PATCH v3 1/2] arm64: kvm: Save/restore MTE registers

2020-09-25 Thread Steven Price
Define the new system registers that MTE introduces and context switch them. The MTE feature is still hidden from the ID register as it isn't supported in a VM yet. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_host.h | 4 arch/arm64/include/asm/sysreg.h

[PATCH v3 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-09-25 Thread Steven Price
are correctly saved/restored across swap. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h| 3 +++ arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/mmu.c | 15 +++ arch/arm64/kvm/sys_regs.c

Re: [PATCH v2 0/3] drm/panfrost: add Amlogic integration quirks

2020-09-21 Thread Steven Price
On 21/09/2020 08:52, Neil Armstrong wrote: Hi Steven, Rob, Should I send a v3 with the commit log fixes ? No need, I've fixed it up and pushed to drm-misc-next. Thanks, Steve

Re: [PATCH v2 2/3] drm/panfrost: add amlogic reset quirk callback

2020-09-17 Thread Steven Price
the SoC is not publicly documented we do not know what does these values, but they permit having a fully functional GPU running with Panfrost. Signed-off-by: Neil Armstrong Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 11 +++ drivers/gpu/drm/panfrost/panfro

Re: [PATCH v2 3/3] drm/panfrost: add Amlogic GPU integration quirks

2020-09-17 Thread Steven Price
On 16/09/2020 16:01, Neil Armstrong wrote: This adds the required GPU quirks, including the quirk in the PWR registers at the GPU reset time and the IOMMU quirk for shareability issues observed on G52 in Amlogic G12B SoCs. Signed-off-by: Neil Armstrong Reviewed-by: Steven Price

Re: [PATCH v2 1/3] drm/panfrost: add support for vendor quirk

2020-09-17 Thread Steven Price
f permit this. Signed-off-by: Neil Armstrong Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_device.h | 3 +++ drivers/gpu/drm/panfrost/panfrost_gpu.c| 4 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/

Re: [PATCH] drm/panfrost: Ensure GPU quirks are always initialised

2020-09-10 Thread Steven Price
On 09/09/2020 13:29, Steven Price wrote: The GPU 'CONFIG' registers used to work around hardware issues are cleared on reset so need to be programmed every time the GPU is reset. However panfrost_device_reset() failed to do this. To avoid this in future instead move the call

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Steven Price
On 10/09/2020 14:56, Andrew Jones wrote: On Thu, Sep 10, 2020 at 10:21:04AM +0100, Steven Price wrote: On 10/09/2020 07:29, Andrew Jones wrote: But if userspace created the memslots with memory already set with PROT_MTE, then this wouldn't be necessary, right? And, as long as there's still

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Steven Price
On 10/09/2020 01:33, Richard Henderson wrote: On 9/4/20 9:00 AM, Steven Price wrote: 3. Doesn't provide any new methods for the VMM to access the tags on memory. ... (3) may be problematic and I'd welcome input from those familiar with VMMs. User space cannot access tags unless

Re: [PATCH v2 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-09-10 Thread Steven Price
On 09/09/2020 16:48, Andrew Jones wrote: On Fri, Sep 04, 2020 at 05:00:18PM +0100, Steven Price wrote: Add a new VCPU features 'KVM_ARM_VCPU_MTE' which enables memory tagging on a VCPU. When enabled on any VCPU in the virtual machine this causes all pages that are faulted into the VM to have

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Steven Price
On 10/09/2020 07:29, Andrew Jones wrote: On Wed, Sep 09, 2020 at 05:04:15PM +0100, Steven Price wrote: On 09/09/2020 16:25, Andrew Jones wrote: On Fri, Sep 04, 2020 at 05:00:16PM +0100, Steven Price wrote: 2. Automatically promotes (normal host) memory given to the guest to be tag

Re: [PATCH] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-09-10 Thread Steven Price
Rajagopalan Cc: Catalin Marinas Cc: Will Deacon Cc: Anshuman Khandual Cc: Mark Rutland Cc: Logan Gunthorpe Cc: David Hildenbrand Cc: Andrew Morton Cc: Steven Price --- arch/arm64/mm/mmu.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/mmu.c

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Steven Price
On 09/09/2020 16:25, Andrew Jones wrote: On Fri, Sep 04, 2020 at 05:00:16PM +0100, Steven Price wrote: Arm's Memory Tagging Extension (MTE) adds 4 bits of tag data to every 16 bytes of memory in the system. This along with stashing a tag within the high bit of virtual addresses allows runtime

[PATCH] drm/panfrost: Ensure GPU quirks are always initialised

2020-09-09 Thread Steven Price
that the regsiters are always programmed just before the cores are powered. Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Signed-off-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drive

Re: [PATCH 2/5] drm/panfrost: add support specifying pgtbl quirks

2020-09-09 Thread Steven Price
On 08/09/2020 16:18, Neil Armstrong wrote: Add a pgtbl_quirks entry in the compatible specific table to permit specyfying IOMMU quirks for platforms. Signed-off-by: Neil Armstrong Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_device.h | 3 +++ drivers/gpu/drm

Re: [PATCH 3/5] drm/panfrost: add support for reset quirk

2020-09-09 Thread Steven Price
On 08/09/2020 16:18, Neil Armstrong wrote: The T820, G31 & G52 GPUs integratewd by Amlogic in the respective GXM, G12A/SM1 & G12B SoCs needs a quirk in the PWR registers at the GPU reset time. This adds a callback in the device compatible struct of permit this. Signed-off-by: Neil Armstrong

Re: [PATCH 1/5] iommu/io-pgtable-arm: Add BROKEN_NS quirk to disable shareability on ARM LPAE

2020-09-09 Thread Steven Price
Subject: s/BROKEN_NS/BROKEN_SH/ Steve On 08/09/2020 16:18, Neil Armstrong wrote: The coherency integration of the IOMMU in the Mali-G52 found in the Amlogic G12B SoCs is broken and leads to constant and random faults from the IOMMU. Disabling shareability completely fixes the issue.

Re: [PATCH 4/5] drm/panfrost: add amlogic reset quirk callback

2020-09-09 Thread Steven Price
On 08/09/2020 16:18, Neil Armstrong wrote: The T820, G31 & G52 GPUs integratewd by Amlogic in the respective GXM, G12A/SM1 & G12B SoCs needs a quirk in the PWR registers at the GPU reset time. Since the documentation of the GPU cores are not public, we do not know what does these values, but

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Steven Price
On 07/09/2020 16:28, Dr. David Alan Gilbert wrote: (cc'ing in Eric Auger) * Steven Price (steven.pr...@arm.com) wrote: Arm's Memory Tagging Extension (MTE) adds 4 bits of tag data to every 16 bytes of memory in the system. This along with stashing a tag within the high bit of virtual addresses

[PATCH v2 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-09-04 Thread Steven Price
Add a new VCPU features 'KVM_ARM_VCPU_MTE' which enables memory tagging on a VCPU. When enabled on any VCPU in the virtual machine this causes all pages that are faulted into the VM to have the PG_mte_tagged flag set (and the tag storage cleared if this is the first use). Signed-off-by: Steven

[PATCH v2 0/2] MTE support for KVM guest

2020-09-04 Thread Steven Price
-steven.price%40arm.com Steven Price (2): arm64: kvm: Save/restore MTE registers arm64: kvm: Introduce MTE VCPU feature arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h | 9 - arch/arm64/include/asm/sysreg.h| 3 ++- arch/arm64/include

[PATCH v2 1/2] arm64: kvm: Save/restore MTE registers

2020-09-04 Thread Steven Price
Define the new system registers that MTE introduces and context switch them. The MTE feature is still hidden from the ID register as it isn't supported in a VM yet. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_host.h | 4 arch/arm64/include/asm/sysreg.h

Re: [PATCH] arm64/mm/ptdump: Add address markers for BPF regions

2020-09-04 Thread Steven Price
rename arch/arm64/mm/dump.c which sounds bit ambiguous, as arch/arm64/mm/ptdump.c instead. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Steven Price Cc: Andrew Morton Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual LGTM

Re: [RFC PATCH 0/5] KVM: arm64: Add pvtime LPT support

2020-09-02 Thread Steven Price
Hi Marc, Sorry for the slow response, I've been on holiday. On 22/08/2020 11:31, Marc Zyngier wrote: Hi Steven, On Wed, 19 Aug 2020 09:54:40 +0100, Steven Price wrote: On 18/08/2020 15:41, Marc Zyngier wrote: On 2020-08-17 09:41, Keqian Zhu wrote: [...] Things need concern: 1. https

Re: [RFC PATCH 0/5] KVM: arm64: Add pvtime LPT support

2020-08-19 Thread Steven Price
On 18/08/2020 15:41, Marc Zyngier wrote: On 2020-08-17 09:41, Keqian Zhu wrote: Hi all, This patch series picks up the LPT pvtime feature originally developed by Steven Price: https://patchwork.kernel.org/cover/10726499/ Backgroud: There is demand for cross-platform migration, which means we

Re: [PATCH v4 3/3] mm: proc: smaps_rollup: do not stall write attempts on mmap_lock

2020-08-19 Thread Steven Price
://lore.kernel.org/lkml/bf40676e-b14b-44cd-75ce-419c70194...@arm.com/ [2] https://lore.kernel.org/lkml/cann689ftcsc71cjajs0gpspohgo_hrj+diwsou1wr98ypkt...@mail.gmail.com/ [3] https://lore.kernel.org/lkml/db0d40e2-72f3-09d5-c162-9c49218f1...@arm.com/ Signed-off-by: Chinwen Chang CC: Steven Price CC: Michel

Re: [PATCH 3/3] KVM: arm64: Use kvm_write_guest_lock when init stolen time

2020-08-17 Thread Steven Price
On 17/08/2020 04:37, Keqian Zhu wrote: There is a lock version kvm_write_guest. Use it to simplify code. Signed-off-by: Keqian Zhu Reviewed-by: Steven Price --- arch/arm64/kvm/pvtime.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm64/kvm/pvtime.c b

Re: [PATCH 2/3] KVM: uapi: Remove KVM_DEV_TYPE_ARM_PV_TIME in kvm_device_type

2020-08-17 Thread Steven Price
On 17/08/2020 09:43, zhukeqian wrote: Hi Marc, On 2020/8/17 15:39, Marc Zyngier wrote: On 2020-08-17 04:37, Keqian Zhu wrote: ARM64 PV-time ST is configured by userspace through vCPU attribute, and KVM_DEV_TYPE_ARM_PV_TIME is unused. Signed-off-by: Keqian Zhu --- include/uapi/linux/kvm.h

Re: [PATCH 1/3] KVM: arm64: Some fixes of PV-time interface document

2020-08-17 Thread Steven Price
On 17/08/2020 04:37, Keqian Zhu wrote: Rename PV_FEATURES tp PV_TIME_FEATURES ^^ Typos are sadly far too easy in documentation... Signed-off-by: Keqian Zhu Reviewed-by: Steven Price --- Documentation/virt/kvm/arm/pvtime.rst | 6 +++--- 1 file changed, 3

Re: [PATCH v3 2/3] mm: smaps*: extend smap_gather_stats to support specified beginning

2020-08-17 Thread Steven Price
Lespinasse CC: Steven Price LGTM Reviewed-by: Steven Price Steve --- fs/proc/task_mmu.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index dbda449..76e623a 100644 --- a/fs/proc/task_mmu.c +++ b/fs

Re: [PATCH v3 3/3] mm: proc: smaps_rollup: do not stall write attempts on mmap_lock

2020-08-17 Thread Steven Price
-by: Chinwen Chang CC: Steven Price CC: Michel Lespinasse Reviewed-by: Steven Price --- fs/proc/task_mmu.c | 73 +++--- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 76e623a

Re: [PATCH v2 1/2] mmap locking API: add mmap_lock_is_contended()

2020-08-13 Thread Steven Price
On 13/08/2020 03:13, Chinwen Chang wrote: Add new API to query if someone wants to acquire mmap_lock for write attempts. Using this instead of rwsem_is_contended makes it more tolerant of future changes to the lock type. Signed-off-by: Chinwen Chang Reviewed-by: Steven Price

Re: [PATCH v2 2/2] mm: proc: smaps_rollup: do not stall write attempts on mmap_lock

2020-08-13 Thread Steven Price
-by: Chinwen Chang Reviewed-by: Steven Price --- fs/proc/task_mmu.c | 56 +- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index dbda449..23b3a447 100644 --- a/fs/proc/task_mmu.c +++ b/fs

Re: [PATCH 2/2] mm: proc: smaps_rollup: do not stall write attempts on mmap_lock

2020-08-12 Thread Steven Price
On 11/08/2020 05:42, Chinwen Chang wrote: smaps_rollup will try to grab mmap_lock and go through the whole vma list until it finishes the iterating. When encountering large processes, the mmap_lock will be held for a longer time, which may block other write requests like mmap and munmap from

Re: [patch V5 00/15] entry, x86, kvm: Generic entry/exit functionality for host and guest

2020-07-29 Thread Steven Price
On 24/07/2020 21:51, Thomas Gleixner wrote: Thomas Gleixner writes: This is the 5th version of generic entry/exit functionality for host and guest. I've merged the pile in two steps. Patch 1-5, i.e. the generic code is here: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git

Re: [PATCH 0/9] arm64: Stolen time support

2020-07-27 Thread Steven Price
On 21/07/2020 04:26, zhukeqian wrote: Hi Steven, Hi Keqian, On 2019/8/2 22:50, Steven Price wrote: This series add support for paravirtualized time for arm64 guests and KVM hosts following the specification in Arm's document DEN 0057A: https://developer.arm.com/docs/den0057

Re: [PATCH V5 1/4] mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features

2020-07-16 Thread Steven Price
On 13/07/2020 04:23, Anshuman Khandual wrote: This adds new tests validating arch page table helpers for these following core memory features. These tests create and test specific mapping types at various page table levels. 1. SPECIAL mapping 2. PROTNONE mapping 3. DEVMAP mapping 4. SOFTDIRTY

Re: [PATCH 2/3] firmware: arm_scmi: Remove unneeded __packed attribute

2020-07-15 Thread Steven Price
On 13/07/2020 14:07, Cristian Marussi wrote: Hi Steven thanks for the review. On Mon, Jul 13, 2020 at 12:20:43PM +0100, Steven Price wrote: On 10/07/2020 14:39, Cristian Marussi wrote: Remove __packed attribute from struct scmi_event_header. Signed-off-by: Cristian Marussi A drive

Re: [PATCH 2/3] firmware: arm_scmi: Remove unneeded __packed attribute

2020-07-13 Thread Steven Price
On 10/07/2020 14:39, Cristian Marussi wrote: Remove __packed attribute from struct scmi_event_header. Signed-off-by: Cristian Marussi A drive-by review. But this doesn't look safe to me. sizeof(struct scmi_event_header) is used in several places and this change will modify that from 13 to

Re: [PATCH 2/3] firmware: arm_scmi: Remove unneeded __packed attribute

2020-07-13 Thread Steven Price
On 10/07/2020 14:39, Cristian Marussi wrote: Remove __packed attribute from struct scmi_event_header. Signed-off-by: Cristian Marussi A drive-by review. But this doesn't look safe to me. sizeof(struct scmi_event_header) is used in several places and this change will modify that from 13 to

[PATCH 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-07-13 Thread Steven Price
Add a new VCPU features 'KVM_ARM_VCPU_MTE' which enables memory tagging on a VCPU. When enabled on any VCPU in the virtual machine this causes all pages that are faulted into the VM to have the PG_mte_tagged flag set (and the tag storage cleared if this is the first use). Signed-off-by: Steven

[PATCH 1/2] arm64: kvm: Save/restore MTE registers

2020-07-13 Thread Steven Price
Define the new system registers that MTE introduces and context switch them. Also hide the MTE feature from the ID register as it isn't supported in a VM yet. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_host.h | 7 +++ arch/arm64/include/asm/sysreg.h | 3 ++- arch/arm64

[PATCH 0/2] MTE support for KVM guest

2020-07-13 Thread Steven Price
with rebasing [1] https://lore.kernel.org/r/20200703153718.16973-1-catalin.mari...@arm.com [2] https://lore.kernel.org/r/20200617123844.29960-1-steven.pr...@arm.com Steven Price (2): arm64: kvm: Save/restore MTE registers arm64: kvm: Introduce MTE VCPU feature arch/arm64/include/asm

Re: [PATCH v3 07/14] drm/panfrost: rename error labels in device_init

2020-07-10 Thread Steven Price
On 09/07/2020 15:03, Clément Péron wrote: Rename goto labels in device_init it will be easier to maintain. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Nice clean up, thanks. As you noted this needs rebasing as the "regulator init" message has gone. Reviewed-

Re: [PATCH v3 08/14] drm/panfrost: move devfreq_init()/fini() in device

2020-07-10 Thread Steven Price
not totally illogic to move the devfreq_init() and devfreq_fini() here. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_device.c | 12 +++- drivers/gpu/drm/panfrost/panfrost_drv.c| 15

Re: [PATCH] drm/panfrost: fix ref count leak in panfrost_job_hw_submit

2020-07-09 Thread Steven Price
On 09/07/2020 16:44, Rob Herring wrote: On Sun, Jun 14, 2020 at 12:27 AM Navid Emamdoost wrote: in panfrost_job_hw_submit, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before

Re: [PATCH 03/12] KVM: arm64: Report hardware dirty status of stage2 PTE if coverred

2020-07-01 Thread Steven Price
Hi, On 16/06/2020 10:35, Keqian Zhu wrote: kvm_set_pte is called to replace a target PTE with a desired one. We always do this without changing the desired one, but if dirty status set by hardware is coverred, let caller know it. Signed-off-by: Keqian Zhu --- arch/arm64/kvm/mmu.c | 36

Re: [RFC PATCH 0/2] MTE support for KVM guest

2020-06-24 Thread Steven Price
On 24/06/2020 15:21, Catalin Marinas wrote: On Wed, Jun 24, 2020 at 12:16:28PM +0100, Steven Price wrote: On 23/06/2020 18:48, Catalin Marinas wrote: On Wed, Jun 17, 2020 at 01:38:42PM +0100, Steven Price wrote: These patches add support to KVM to enable MTE within a guest. It is based

Re: [RFC PATCH 0/2] MTE support for KVM guest

2020-06-24 Thread Steven Price
On 24/06/2020 12:09, Catalin Marinas wrote: On Wed, Jun 24, 2020 at 12:03:35PM +0100, Steven Price wrote: On 24/06/2020 11:34, Dave Martin wrote: On Wed, Jun 24, 2020 at 10:38:48AM +0100, Catalin Marinas wrote: On Tue, Jun 23, 2020 at 07:05:07PM +0100, Peter Maydell wrote: On Wed, 17 Jun

Re: [RFC PATCH 0/2] MTE support for KVM guest

2020-06-24 Thread Steven Price
On 23/06/2020 18:48, Catalin Marinas wrote: Hi Steven, On Wed, Jun 17, 2020 at 01:38:42PM +0100, Steven Price wrote: These patches add support to KVM to enable MTE within a guest. It is based on Catalin's v4 MTE user space series[1]. [1] http://lkml.kernel.org/r/20200515171612.1020-1

Re: [RFC PATCH 0/2] MTE support for KVM guest

2020-06-24 Thread Steven Price
On 24/06/2020 11:34, Dave Martin wrote: On Wed, Jun 24, 2020 at 10:38:48AM +0100, Catalin Marinas wrote: On Tue, Jun 23, 2020 at 07:05:07PM +0100, Peter Maydell wrote: On Wed, 17 Jun 2020 at 13:39, Steven Price wrote: These patches add support to KVM to enable MTE within a guest. It is based

Re: [RFC PATCH v13 7/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-06-22 Thread Steven Price
On 22/06/2020 03:25, Jianyong Wu wrote: Hi Steven, Hi Jianyong [...] diff --git a/arch/arm64/kvm/hypercalls.c b/arch/arm64/kvm/hypercalls.c index db6dce3d0e23..366b0646c360 100644 --- a/arch/arm64/kvm/hypercalls.c +++ b/arch/arm64/kvm/hypercalls.c @@ -3,6 +3,7 @@ #include #include

Re: [RFC PATCH v13 7/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-06-19 Thread Steven Price
On 19/06/2020 10:30, Jianyong Wu wrote: ptp_kvm will get this service through smccc call. The service offers wall time and counter cycle of host for guest. caller must explicitly determines which cycle of virtual counter or physical counter to return if it needs counter cycle. Signed-off-by:

Re: [PATCH 2/2] panfrost: Add compatible string for bifrost

2020-06-19 Thread Steven Price
On 11/06/2020 09:58, Tomeu Vizoso wrote: Mesa now supports some Bifrost devices, so enable it. Signed-off-by: Tomeu Vizoso Reviewed-by: Steven Price I've also dug out my Hikey960 (from the box it's been in since lock down started), so I'll see if I can get things running

Re: [PATCH 1/2] panfrost: Make sure GPU is powered on when reading GPU_LATEST_FLUSH_ID

2020-06-19 Thread Steven Price
Vizoso Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c index f2c1ddc41a9b..e0f190e43813 100644

Re: [RFC PATCH 1/2] arm64: kvm: Save/restore MTE registers

2020-06-18 Thread Steven Price
On 17/06/2020 15:05, Catalin Marinas wrote: On Wed, Jun 17, 2020 at 01:38:43PM +0100, Steven Price wrote: diff --git a/arch/arm64/kvm/hyp/sysreg-sr.c b/arch/arm64/kvm/hyp/sysreg-sr.c index 75b1925763f1..6ecee1528566 100644 --- a/arch/arm64/kvm/hyp/sysreg-sr.c +++ b/arch/arm64/kvm/hyp/sysreg

Re: [PATCH v3] drm/panfrost: Reduce the amount of logs on deferred probe

2020-06-18 Thread Steven Price
On 17/06/2020 20:57, Rob Herring wrote: On Wed, Jun 17, 2020 at 8:36 AM Steven Price wrote: On 17/06/2020 15:15, Krzysztof Kozlowski wrote: On Wed, May 27, 2020 at 04:43:34PM -0400, Alyssa Rosenzweig wrote: Reviewed-by: Alyssa Rosenzweig On Wed, May 27, 2020 at 10:05:44PM +0200, Krzysztof

Re: [RFC PATCH 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-06-17 Thread Steven Price
On 17/06/2020 15:38, Catalin Marinas wrote: On Wed, Jun 17, 2020 at 01:38:44PM +0100, Steven Price wrote: diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index e3b9ee268823..040a7fffaa93 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -1783,6 +1783,17 @@ static int

Re: [PATCH v3] drm/panfrost: Reduce the amount of logs on deferred probe

2020-06-17 Thread Steven Price
) as an error. Also there is no need to print regulator errors twice. In case of multiple probe tries this would pollute the dmesg. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Steven Price --- Changes since v2: 1. Rebase 2. Add Steven's review Changes since v1: 1. Remove second error

Re: [PATCH v2] firmware: smccc: Add ARCH_SOC_ID support

2020-06-17 Thread Steven Price
. There are various ways in which it can be represented in shortened form for efficiency and ease of parsing for userspace. The chosen form is described in the ABI document. Cc: Steven Price Cc: Etienne Carriere Signed-off-by: Sudeep Holla --- Documentation/ABI/testing/sysfs-devices-soc | 30 ++ drivers

[RFC PATCH 0/2] MTE support for KVM guest

2020-06-17 Thread Steven Price
gotchas with save/restore, however this would also extend to memory that you might not expect to have PROT_MTE (e.g. a shared frame buffer for an emulated graphics card). Comments on the approach (or ideas for alternative approaches) are very welcome. Steven Price (2): arm64: kvm: Save/restore MTE

[RFC PATCH 1/2] arm64: kvm: Save/restore MTE registers

2020-06-17 Thread Steven Price
Define the new system registers that MTE introduces and context switch them. Also hide the MTE feature from the ID register as it isn't supported in a VM yet. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_host.h | 7 +++ arch/arm64/kvm/hyp/sysreg-sr.c| 12

[RFC PATCH 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-06-17 Thread Steven Price
Add a new VCPU features 'KVM_ARM_VCPU_MTE' which enables memory tagging on a VCPU. When enabled on any VCPU in the virtual machine this causes all pages that are faulted into the VM to have the PG_mte_tagged flag set (and the tag storage cleared if this is the first use). Signed-off-by: Steven

[PATCH v2] KVM: arm64: kvm_reset_vcpu() return code incorrect with SVE

2020-06-17 Thread Steven Price
t to avoid this situation in the future. Fixes: 9a3cdf26e336 ("KVM: arm64/sve: Allow userspace to enable SVE for vcpus") Reported-by: James Morse Signed-off-by: Steven Price --- Changes since v1: * Fix embarrassing accidental inversion of the if() test The problematic chunk isn't vis

Re: [PATCH] KVM: arm64: kvm_reset_vcpu() return code incorrect with SVE

2020-06-17 Thread Steven Price
On 17/06/2020 11:47, Marc Zyngier wrote: Hi Steven, On 2020-06-17 11:43, Steven Price wrote: If SVE is enabled then 'ret' can be assigned the return value of kvm_vcpu_enable_sve() which may be 0 causing future "goto out" sites to erroneously return 0 on failure rather than -EINVAL a

[PATCH] KVM: arm64: kvm_reset_vcpu() return code incorrect with SVE

2020-06-17 Thread Steven Price
t to avoid this situation in the future. Fixes: 9a3cdf26e336 ("KVM: arm64/sve: Allow userspace to enable SVE for vcpus") Reported-by: James Morse Signed-off-by: Steven Price --- The problematic chunk isn't visible in the diff, so reproduced here: if (!kvm_arm_vcp

Re: [PATCH v2] drm/panfrost: Use kvfree() to free bo->sgts

2020-06-11 Thread Steven Price
Denis Efremov Reviewed-by: Steven Price Thanks, Steve --- Change in v2: - kvfree() fixed in panfrost_gem_free_object(), thanks to Steven Price drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +- drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-

Re: [x86] 24256c140e: dmesg.UBSAN:array-index-out-of-bounds_in_arch/x86/mm/dump_pagetables.c

2020-06-08 Thread Steven Price
On 07/06/2020 08:27, kernel test robot wrote: Greeting, FYI, we noticed the following commit (built with gcc-9): commit: 24256c140e59c3431af4918fd4ec892102cbc2f3 ("x86: mm: ptdump: calculate effective permissions correctly") https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git

Re: [PATCH] drm/panfrost: Use kvfree() to free bo->sgts in panfrost_mmu_map_fault_addr()

2020-06-08 Thread Steven Price
On 05/06/2020 19:52, Denis Efremov wrote: Use kvfree() to free bo->sgts, because the memory is allocated with kvmalloc_array(). Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Cc: sta...@vger.kernel.org Signed-off-by: Denis Efremov Well spotted, but there's another

Re: [PATCH 05/15] drm/panfrost: use spinlock instead of atomic

2020-05-29 Thread Steven Price
On 29/05/2020 13:35, Clément Péron wrote: Hi Robin, On Fri, 29 May 2020 at 14:20, Robin Murphy wrote: On 2020-05-10 17:55, Clément Péron wrote: Convert busy_count to a simple int protected by spinlock. A little more reasoning might be nice. I have follow the modification requested for

Re: [PATCH 10/15] drm/panfrost: add regulators to devfreq

2020-05-28 Thread Steven Price
like it should work - thanks for doing this! Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 19 +++ drivers/gpu/drm/panfrost/panfrost_devfreq.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_device.c | 11 +++ 3 files changed, 28 insertions

Re: [PATCH 09/15] drm/panfrost: dynamically alloc regulators

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: We will later introduce regulators managed by OPP. Only alloc regulators when it's needed. This also help use to release the regulators only when they are allocated. Signed-off-by: Clément Péron LGTM: Reviewed-by: Steven Price --- drivers/gpu

Re: [PATCH 08/15] drm/panfrost: move devfreq_init()/fini() in device

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Later we will introduce devfreq probing regulator if they are present. As regulator should be probe only one time we need to get this logic in the device_init(). panfrost_device is already taking care of devfreq_resume() and devfreq_suspend(), so it's

Re: [PATCH 11/15] drm/panfrost: set devfreq clock name

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Some SoCs have several clocks defined and the OPP core needs to know the exact name of the clk to use. Set the clock name to "core". Signed-off-by: Clément Péron This is unfortunately a regression for the RK3288. The device tree binding doesn't

Re: [PATCH 07/15] drm/panfrost: use device_property_present to check for OPP

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Instead of expecting an error from dev_pm_opp_of_add_table() do a simple device_property_present() check. Signed-off-by: Clément Péron I'm not sure I understand why this is better. We seem to have more code to do roughly the same thing just with the

Re: [PATCH 05/15] drm/panfrost: use spinlock instead of atomic

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Convert busy_count to a simple int protected by spinlock. Signed-off-by: Clément Péron Looks like a fairly mechanical cleanup. Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 43 +++-- drivers/gpu

Re: [PATCH 01/15] drm/panfrost: avoid static declaration

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: This declaration can be avoided so change it. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 38 ++--- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git

Re: [PATCH 06/15] drm/panfrost: properly handle error in probe

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Introduce a boolean to know if opp table has been added. With this, we can call panfrost_devfreq_fini() in case of error and release what has been initialised. Signed-off-by: Clément Péron LGTM: Reviewed-by: Steven Price --- drivers/gpu/drm

Re: [PATCH 04/15] drm/panfrost: introduce panfrost_devfreq struct

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Introduce a proper panfrost_devfreq to deal with devfreq variables. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 76 - drivers/gpu/drm/panfrost/panfrost_devfreq.h

Re: [PATCH 03/15] drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle

2020-05-28 Thread Steven Price
be safe. As you note this wouldn't work without devfreq anyway. Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_job.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c index 7914b1570841

Re: [PATCH 02/15] drm/panfrost: clean headers in devfreq

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Don't include not required headers and sort them. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm

Re: [PATCH 1/2] x86: mm: ptdump: Calculate effective permissions correctly

2020-05-27 Thread Steven Price
On 27/05/2020 16:15, Jan Beulich wrote: On 21.05.2020 17:23, Steven Price wrote: By switching the x86 page table dump code to use the generic code the effective permissions are no longer calculated correctly because the note_page() function is only called for *leaf* entries. To calculate

Re: [PATCH] [v2] drm/panfrost: Fix runtime PM imbalance on error

2020-05-27 Thread Steven Price
On 22/05/2020 14:41, Dinghao Liu wrote: The caller expects panfrost_job_hw_submit() to increase runtime PM usage counter. The refcount decrement on the error branch of WARN_ON() will break the counter balance and needs to be removed. Signed-off-by: Dinghao Liu Reviewed-by: Steven Price

Re: [RFC PATCH v12 07/11] psci: Add hypercall service for kvm ptp.

2020-05-26 Thread Steven Price
On 25/05/2020 03:11, Jianyong Wu wrote: Hi Steven, Hi Jianyong, [...]>>> diff --git a/virt/kvm/arm/hypercalls.c b/virt/kvm/arm/hypercalls.c index db6dce3d0e23..c964122f8dae 100644 --- a/virt/kvm/arm/hypercalls.c +++ b/virt/kvm/arm/hypercalls.c @@ -3,6 +3,7 @@ #include #include

Re: [PATCH 1/2] x86: mm: ptdump: Calculate effective permissions correctly

2020-05-26 Thread Steven Price
On 22/05/2020 19:07, Qian Cai wrote: On Thu, May 21, 2020 at 04:23:07PM +0100, Steven Price wrote: --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c @@ -249,10 +249,22 @@ static void note_wx(struct pg_state *st, unsigned long addr) @@ -270,16 +282,10 @@ static void

[PATCH] drm/panfrost: Fix inbalance of devfreq record_busy/idle()

2020-05-22 Thread Steven Price
to panfrost_devfreq_record_idle() even if it is cleaning up multiple jobs. Move the call inside the loop to ensure that the number of _record_idle() calls matches the number of _record_busy() calls. Fixes: 9e62b885f715 ("drm/panfrost: Simplify devfreq utilisation tracking") Signed-off-by: Steven Price --- drive

Re: [RFC PATCH v12 07/11] psci: Add hypercall service for kvm ptp.

2020-05-22 Thread Steven Price
On 22/05/2020 09:37, Jianyong Wu wrote: ptp_kvm modules will get this service through smccc call. The service offers real time and counter cycle of host for guest. Also let caller determine which cycle of virtual counter or physical counter to return. Signed-off-by: Jianyong Wu ---

Re: [PATCH] drm/panfrost: fix runtime pm imbalance on error

2020-05-22 Thread Steven Price
On 21/05/2020 08:00, dinghao@zju.edu.cn wrote: Hi Steve, There are two bailing out points in panfrost_job_hw_submit(): one is the error path beginning from pm_runtime_get_sync(), the other one is the error path beginning from WARN_ON() in the if statement. The pm imbalance fixed in this

Re: [PATCH 0/2] Fix W+X debug feature on x86

2020-05-22 Thread Steven Price
On 21/05/2020 20:08, Andrew Morton wrote: On Thu, 21 May 2020 16:23:06 +0100 Steven Price wrote: Jan alert me[1] that the W+X detection debug feature was broken in x86 by my change[2] to switch x86 to use the generic ptdump infrastructure. Fundamentally the approach of trying to move

<    1   2   3   4   5   6   7   >