Re: [PATCH v2 1/4] mm: pagewalk: Fix walk for hugepage tables

2021-04-19 Thread Steven Price
have a suitable system to test it. Reviewed-by: Steven Price --- v2: - Add a guard for NULL ops->pte_entry - Take mm->page_table_lock when walking hugepage table, as suggested by follow_huge_pd() --- mm/pagewalk.c | 58 ++- 1 file chang

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-19 Thread Steven Price
On 19/04/2021 14:14, Christophe Leroy wrote: Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: To be honest I don't fully understand why powerpc requires

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Steven Price
On 16/04/2021 16:15, Christophe Leroy wrote: Le 16/04/2021 à 17:04, Christophe Leroy a écrit : Le 16/04/2021 à 16:40, Christophe Leroy a écrit : Le 16/04/2021 à 15:00, Steven Price a écrit : On 16/04/2021 12:08, Christophe Leroy wrote: Le 16/04/2021 à 12:51, Steven Price a écrit

[PATCH v11 6/6] KVM: arm64: Document MTE capability and ioctl

2021-04-16 Thread Steven Price
mapping in userspace. The above capability gates access to the ioctl. Signed-off-by: Steven Price --- Documentation/virt/kvm/api.rst | 53 ++ 1 file changed, 53 insertions(+) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index

[PATCH v11 5/6] KVM: arm64: ioctl to fetch/store tags in a guest

2021-04-16 Thread Steven Price
to easily read/write the tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE while the VMM can still read/write the tags for the purpose of migration. Signed-off-by: Steven Price --- arch/arm64/include/uapi/asm/kvm.h | 14 +++ arch/arm64/kvm/arm.c | 69

[PATCH v11 4/6] arm64: kvm: Expose KVM_ARM_CAP_MTE

2021-04-16 Thread Steven Price
It's now safe for the VMM to enable MTE in a guest, so expose the capability to user space. Signed-off-by: Steven Price --- arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/sys_regs.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c

[PATCH v11 3/6] arm64: kvm: Save/restore MTE registers

2021-04-16 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 | 6 ++ arch/arm64/include/asm/kvm_mte.h

[PATCH v11 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-16 Thread Steven Price
are correctly saved/restored across swap. Actually exposing the new capability to user space happens in a later patch. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h| 3 +++ arch/arm64/kvm/hyp/exception.c | 3 ++- arch/arm64/kvm

[PATCH v11 1/6] arm64: mte: Sync tags for pages where PTE is untagged

2021-04-16 Thread Steven Price
out. Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/kernel/mte.c | 16 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index e17b96d0e4b5

[PATCH v11 0/6] MTE support for KVM guest

2021-04-16 Thread Steven Price
rice%40arm.com Steven Price (6): arm64: mte: Sync tags for pages where PTE is untagged arm64: kvm: Introduce MTE VM feature arm64: kvm: Save/restore MTE registers arm64: kvm: Expose KVM_ARM_CAP_MTE KVM: arm64: ioctl to fetch/store tags in a guest KVM: arm64: Document MTE capability and i

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Steven Price
On 16/04/2021 12:08, Christophe Leroy wrote: Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: In order to support large pages on powerpc, notepage() needs

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Steven Price
On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: In order to support large pages on powerpc, notepage() needs to know the page size of the page. Add a page_size argument to notepage(). Signed-off

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Steven Price
On 15/04/2021 18:18, Christophe Leroy wrote: In order to support large pages on powerpc, notepage() needs to know the page size of the page. Add a page_size argument to notepage(). Signed-off-by: Christophe Leroy --- arch/arm64/mm/ptdump.c | 2 +- arch/riscv/mm/ptdump.c |

Re: [PATCH] mm: ptdump: Fix build failure

2021-04-16 Thread Steven Price
/x86 implementations (where this happens to be safe). Fixes: 30d621f6723b ("mm: add generic ptdump") Cc: Steven Price Signed-off-by: Christophe Leroy Reviewed-by: Steven Price Thanks, Steve --- mm/ptdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-07 Thread Steven Price
On 07/04/2021 16:14, Catalin Marinas wrote: On Wed, Apr 07, 2021 at 11:20:18AM +0100, Steven Price wrote: On 31/03/2021 19:43, Catalin Marinas wrote: When a slot is added by the VMM, if it asked for MTE in guest (I guess that's an opt-in by the VMM, haven't checked the other patches), can we

Re: [PATCH] arm: ptdump: convert to DEFINE_SHOW_ATTRIBUTE

2021-04-07 Thread Steven Price
On 30/03/2021 04:20, Jisheng Zhang wrote: Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Jisheng Zhang Reviewed-by: Steven Price --- arch/arm/mm/ptdump_debugfs.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/arm/mm

Re: [PATCH] arm: ptdump: add __init section marker to three functions

2021-04-07 Thread Steven Price
On 30/03/2021 04:19, Jisheng Zhang wrote: They are not needed after booting, so mark them as __init to move them to the .init section. Signed-off-by: Jisheng Zhang Reviewed-by: Steven Price --- arch/arm/mm/dump.c | 4 ++-- arch/arm/mm/ptdump_debugfs.c | 2 +- 2 files changed

Re: [PATCH v2] arm64: Add __init section marker to some functions

2021-04-07 Thread Steven Price
On 30/03/2021 06:54, Jisheng Zhang wrote: They are not needed after booting, so mark them as __init to move them to the .init section. Signed-off-by: Jisheng Zhang Reviewed-by: Steven Price --- Since v1: - add __init section mark to __vdso_init() and __aarch32_alloc_vdso_pages() arch

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-07 Thread Steven Price
On 31/03/2021 19:43, Catalin Marinas wrote: On Wed, Mar 31, 2021 at 11:41:20AM +0100, Steven Price wrote: On 31/03/2021 10:32, David Hildenbrand wrote: On 31.03.21 11:21, Catalin Marinas wrote: On Wed, Mar 31, 2021 at 09:34:44AM +0200, David Hildenbrand wrote: On 30.03.21 12:30, Catalin

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-31 Thread Steven Price
On 31/03/2021 10:32, David Hildenbrand wrote: On 31.03.21 11:21, Catalin Marinas wrote: On Wed, Mar 31, 2021 at 09:34:44AM +0200, David Hildenbrand wrote: On 30.03.21 12:30, Catalin Marinas wrote: On Mon, Mar 29, 2021 at 05:06:51PM +0100, Steven Price wrote: On 28/03/2021 13:21, Catalin

Re: [PATCH v10 1/6] arm64: mte: Sync tags for pages where PTE is untagged

2021-03-31 Thread Steven Price
On 30/03/2021 11:13, Catalin Marinas wrote: On Mon, Mar 29, 2021 at 04:55:29PM +0100, Steven Price wrote: On 26/03/2021 18:56, Catalin Marinas wrote: On Fri, Mar 12, 2021 at 03:18:57PM +, Steven Price wrote: A KVM guest could store tags in a page even if the VMM hasn't mapped the page

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-29 Thread Steven Price
On 28/03/2021 13:21, Catalin Marinas wrote: On Sat, Mar 27, 2021 at 03:23:24PM +, Catalin Marinas wrote: On Fri, Mar 12, 2021 at 03:18:58PM +, Steven Price wrote: diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index 77cb2d28f2a4..b31b7a821f90 100644 --- a/arch/arm64/kvm/mmu.c

Re: [PATCH v10 1/6] arm64: mte: Sync tags for pages where PTE is untagged

2021-03-29 Thread Steven Price
On 26/03/2021 18:56, Catalin Marinas wrote: Hi Steven, On Fri, Mar 12, 2021 at 03:18:57PM +, Steven Price wrote: A KVM guest could store tags in a page even if the VMM hasn't mapped the page with PROT_MTE. So when restoring pages from swap we will need to check to see if there are any

[PATCH v10 6/6] KVM: arm64: Document MTE capability and ioctl

2021-03-12 Thread Steven Price
mapping in userspace. The above capability gates access to the ioctl. Signed-off-by: Steven Price --- Documentation/virt/kvm/api.rst | 53 ++ 1 file changed, 53 insertions(+) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index

[PATCH v10 5/6] KVM: arm64: ioctl to fetch/store tags in a guest

2021-03-12 Thread Steven Price
to easily read/write the tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE while the VMM can still read/write the tags for the purpose of migration. Signed-off-by: Steven Price --- arch/arm64/include/uapi/asm/kvm.h | 14 +++ arch/arm64/kvm/arm.c | 69

[PATCH v10 3/6] arm64: kvm: Save/restore MTE registers

2021-03-12 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 | 6 ++ arch/arm64/include/asm/kvm_mte.h

[PATCH v10 4/6] arm64: kvm: Expose KVM_ARM_CAP_MTE

2021-03-12 Thread Steven Price
It's now safe for the VMM to enable MTE in a guest, so expose the capability to user space. Signed-off-by: Steven Price --- arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/sys_regs.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c

[PATCH v10 0/6] MTE support for KVM guest

2021-03-12 Thread Steven Price
). * Correctly hold slots_lock during the ioctl (rather than embarrassingly not do any locking as before...). * Add the structure definition to the documentation and some improvements suggested by Peter. [1] https://lore.kernel.org/r/20210301142315.30920-1-steven.price%40arm.com Steven Price (6

[PATCH v10 1/6] arm64: mte: Sync tags for pages where PTE is untagged

2021-03-12 Thread Steven Price
out. Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/kernel/mte.c | 16 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index e17b96d0e4b5

[PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-12 Thread Steven Price
are correctly saved/restored across swap. Actually exposing the new capability to user space happens in a later patch. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h| 3 +++ arch/arm64/kvm/hyp/exception.c | 3 ++- arch/arm64/kvm

Re: [PATCH v9 6/6] KVM: arm64: Document MTE capability and ioctl

2021-03-11 Thread Steven Price
On 09/03/2021 11:01, Peter Maydell wrote: On Mon, 1 Mar 2021 at 14:23, Steven Price wrote: A new capability (KVM_CAP_ARM_MTE) identifies that the kernel supports granting a guest access to the tags, and provides a mechanism for the VMM to enable it. A new ioctl (KVM_ARM_MTE_COPY_TAGS

Re: [PATCH v9 5/6] KVM: arm64: ioctl to fetch/store tags in a guest

2021-03-10 Thread Steven Price
On 09/03/2021 17:57, Marc Zyngier wrote: On Mon, 01 Mar 2021 14:23:14 +, Steven Price wrote: The VMM may not wish to have it's own mapping of guest memory mapped with PROT_MTE because this causes problems if the VMM has tag checking enabled (the guest controls the tags in physical RAM

Re: [PATCH v9 3/6] arm64: kvm: Save/restore MTE registers

2021-03-10 Thread Steven Price
On 09/03/2021 17:27, Marc Zyngier wrote: On Mon, 01 Mar 2021 14:23:12 +, Steven Price wrote: 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

Re: [PATCH v9 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-10 Thread Steven Price
On 09/03/2021 17:06, Marc Zyngier wrote: On Mon, 01 Mar 2021 14:23:11 +, Steven Price wrote: Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging for a VM. This will expose the feature to the guest and automatically tag memory pages touched by the VM as PG_mte_tagged

Re: [PATCH v5 3/4] PM / devfreq: panfrost: Use devfreq cooling device registration

2021-03-08 Thread Steven Price
Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 14 +- drivers/gpu/drm/panfrost/panfrost_devfreq.h | 3 --- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost

Re: [PATCH v5 1/4] PM / devfreq: Register devfreq as a cooling device on demand

2021-03-08 Thread Steven Price
them harder). With that fixed: Reviewed-by: Steven Price + devfreq->cdev = NULL; + } + } + return devfreq; err_init: @@ -960,6 +971,8 @@ int devfreq_remove_device(struct devfreq *devfreq) if (!devfreq) return -EINVAL;

Re: [PATCH] devfreq: Register devfreq as a cooling device

2021-03-05 Thread Steven Price
On 04/03/2021 12:50, Daniel Lezcano wrote: Currently the default behavior is to manually having the devfreq backend to register themselves as a devfreq cooling device. There are no so many and actually it makes more sense to register the devfreq device when adding it. Consequently, every

[PATCH v9 6/6] KVM: arm64: Document MTE capability and ioctl

2021-03-01 Thread Steven Price
mapping in userspace. The above capability gates access to the ioctl. Signed-off-by: Steven Price --- Documentation/virt/kvm/api.rst | 37 ++ 1 file changed, 37 insertions(+) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index

[PATCH v9 5/6] KVM: arm64: ioctl to fetch/store tags in a guest

2021-03-01 Thread Steven Price
to easily read/write the tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE while the VMM can still read/write the tags for the purpose of migration. Signed-off-by: Steven Price --- arch/arm64/include/uapi/asm/kvm.h | 13 +++ arch/arm64/kvm/arm.c | 57

[PATCH v9 3/6] arm64: kvm: Save/restore MTE registers

2021-03-01 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 | 6 ++ arch/arm64/include/asm/kvm_mte.h

[PATCH v9 0/6] MTE support for KVM guest

2021-03-01 Thread Steven Price
documentation patch [1] https://lore.kernel.org/r/20210205135803.48321-1-steven.pr...@arm.com/ Steven Price (6): arm64: mte: Sync tags for pages where PTE is untagged arm64: kvm: Introduce MTE VM feature arm64: kvm: Save/restore MTE registers arm64: kvm: Expose KVM_ARM_CAP_MTE KVM: arm64: ioctl

[PATCH v9 4/6] arm64: kvm: Expose KVM_ARM_CAP_MTE

2021-03-01 Thread Steven Price
It's now safe for the VMM to enable MTE in a guest, so expose the capability to user space. Signed-off-by: Steven Price --- arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/sys_regs.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c

[PATCH v9 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-01 Thread Steven Price
are correctly saved/restored across swap. Actually exposing the new capability to user space happens in a later patch. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h| 3 +++ arch/arm64/kvm/hyp/exception.c | 3 ++- arch/arm64/kvm

[PATCH v9 1/6] arm64: mte: Sync tags for pages where PTE is untagged

2021-03-01 Thread Steven Price
out. Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/kernel/mte.c | 16 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index e17b96d0e4b5

Re: [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls

2021-02-12 Thread Steven Price
On 11/02/2021 20:21, sonicadvan...@gmail.com wrote: From: Ryan Houdek Sorry about the noise. I obviously don't work in this ecosystem. Didn't get any comments previously so I'm resending We're just coming up to a merge window, so I expect people are fairly busy at the moment. Also from a

Re: [PATCH v18 1/7] arm/arm64: Probe for the presence of KVM hypervisor

2021-02-10 Thread Steven Price
ink: https://lore.kernel.org/r/20201209060932.212364-2-jianyong...@arm.com Looks good to me, FWIW: Reviewed-by: Steven Price --- arch/arm/include/asm/hypervisor.h | 3 ++ arch/arm64/include/asm/hypervisor.h | 3 ++ drivers/firmware/psci/psci.c| 2 ++ drivers/firmware/smccc/Makefil

Re: [RFC PATCH v8 5/5] KVM: arm64: ioctl to fetch/store tags in a guest

2021-02-10 Thread Steven Price
On 08/02/2021 17:31, Peter Maydell wrote: On Fri, 5 Feb 2021 at 13:58, Steven Price wrote: The VMM may not wish to have it's own mapping of guest memory mapped with PROT_MTE because this causes problems if the VMM has tag checking enabled (the guest controls the tags in physical RAM and it's

[RFC PATCH v8 5/5] KVM: arm64: ioctl to fetch/store tags in a guest

2021-02-05 Thread Steven Price
to easily read/write the tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE while the VMM can still read/write the tags for the purpose of migration. Signed-off-by: Steven Price --- arch/arm64/include/uapi/asm/kvm.h | 13 +++ arch/arm64/kvm/arm.c | 57

[PATCH v8 3/5] arm64: kvm: Save/restore MTE registers

2021-02-05 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 | 6 ++ arch/arm64/include/asm/kvm_mte.h

[PATCH v8 2/5] arm64: kvm: Introduce MTE VM feature

2021-02-05 Thread Steven Price
are correctly saved/restored across swap. Actually exposing the new capability to user space happens in a later patch. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h| 3 +++ arch/arm64/kvm/hyp/exception.c | 3 ++- arch/arm64/kvm

[PATCH v8 4/5] arm64: kvm: Expose KVM_ARM_CAP_MTE

2021-02-05 Thread Steven Price
It's now safe for the VMM to enable MTE in a guest, so expose the capability to user space. Signed-off-by: Steven Price --- arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/sys_regs.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c

[PATCH v8 0/5] MTE support for KVM guest

2021-02-05 Thread Steven Price
://lore.kernel.org/r/20210115152811.8398-1-steven.price%40arm.com Steven Price (5): arm64: mte: Sync tags for pages where PTE is untagged arm64: kvm: Introduce MTE VM feature arm64: kvm: Save/restore MTE registers arm64: kvm: Expose KVM_ARM_CAP_MTE KVM: arm64: ioctl to fetch/store tags

[PATCH v8 1/5] arm64: mte: Sync tags for pages where PTE is untagged

2021-02-05 Thread Steven Price
out. Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/kernel/mte.c | 16 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 501562793ce2

Re: [PATCH v17 1/7] arm/arm64: Probe for the presence of KVM hypervisor

2021-02-05 Thread Steven Price
On 02/02/2021 14:11, Marc Zyngier wrote: From: Will Deacon Although the SMCCC specification provides some limited functionality for describing the presence of hypervisor and firmware services, this is generally applicable only to functions designated as "Arm Architecture Service Functions" and

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

2021-02-04 Thread Steven Price
On 02/02/2021 17:12, Marc Zyngier wrote: On 2021-01-15 15:28, 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 (and clears the tags

Re: [PATCH v7 1/3] arm64: kvm: Save/restore MTE registers

2021-02-04 Thread Steven Price
On 02/02/2021 15:36, Marc Zyngier wrote: On 2021-01-15 15:28, Steven Price wrote: 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

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
On 22/01/2021 10:00, Lukasz Luba wrote: On 1/22/21 8:21 AM, Steven Price wrote: On 21/01/2021 17:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
On 22/01/2021 10:11, Lukasz Luba wrote: On 1/21/21 5:15 PM, Daniel Lezcano wrote: On 21/01/2021 18:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
% threshold more easily (AFAICT kbase uses the default 90/5 thresholds), but this seems like a reasonable change for now. Reviewed-by: Steven Price Thanks, Steve [1] When I get some time I need to rework the "queue jobs on the hardware"[2] patch I posted ages ago. Last time it actua

[RFC PATCH v7 3/3] KVM: arm64: ioctl to fetch/store tags in a guest

2021-01-15 Thread Steven Price
to easily read/write the tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE while the VMM can still read/write the tags for the purpose of migration. Signed-off-by: Steven Price --- arch/arm64/include/uapi/asm/kvm.h | 13 +++ arch/arm64/kvm/arm.c | 59

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

2021-01-15 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/include/asm/pgtable.h | 2 +- arch/arm64/kernel/mte.c | 36 +--- arch/arm64/kvm/arm.c

[PATCH v7 0/3] MTE support for KVM guest

2021-01-15 Thread Steven Price
-enabled guest * Rebased on v5.11-rc1 * RFC patch for new MTE tag copy ioctl [1] https://lore.kernel.org/r/20210108161254.53674-1-steven.pr...@arm.com [2] https://lore.kernel.org/r/20201127152113.13099-1-steven.pr...@arm.com Steven Price (3): arm64: kvm: Save/restore MTE registers arm64: kvm

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

2021-01-15 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/kvm_mte.h

Re: [PATCH v10 3/4] drm/panfrost: devfreq: Disable devfreq when num_supplies > 1

2021-01-14 Thread Steven Price
taking care of those constraints. Disable devfreq for now on those GPUs. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso Thanks for the clarification in the commit message. Reviewed-by: Steven Price --- (no changes since v9) Changes in v9: - Explain why devfreq needs

Re: [PATCH v10 4/4] drm/panfrost: Add mt8183-mali compatible string

2021-01-14 Thread Steven Price
On 13/01/2021 06:07, Nicolas Boichat wrote: Add support for MT8183's G72 Bifrost. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso LGTM Reviewed-by: Steven Price --- (no changes since v7) Changes in v7: - Fix GPU ID in commit message Changes in v6: - Context conflicts

Re: [PATCH] drm/panfrost: Use delayed timer as default in devfreq profile

2021-01-13 Thread Steven Price
On 05/01/2021 16:41, Lukasz Luba wrote: Devfreq framework supports 2 modes for monitoring devices. Use delayed timer as default instead of deferrable timer in order to monitor the GPU status regardless of CPU idle. Signed-off-by: Lukasz Luba Looks reasonable to me. Reviewed-by: Steven Price

Re: [PATCH] KVM: arm64: Compute TPIDR_EL2 ignoring MTE tag

2021-01-08 Thread Steven Price
On 08/01/2021 16:51, Marc Zyngier wrote: Hi Steven, On 2021-01-08 16:12, Steven Price wrote: KASAN in HW_TAGS mode will store MTE tags in the top byte of the pointer. When computing the offset for TPIDR_EL2 we don't want anything in the top byte, so remove the tag to ensure the computation

[PATCH] KVM: arm64: Compute TPIDR_EL2 ignoring MTE tag

2021-01-08 Thread Steven Price
_TAGS") Signed-off-by: Steven Price --- Without this fix I can't boot a config with KASAN_HW_TAGS and KVM on an MTE enabled host. I'm unsure if this should really be in this_cpu_ptr_nvhe_sym(). arch/arm64/kvm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64

Re: [PATCH v2 2/2] arm64: dts: mt8192: Add node for the Mali GPU

2021-01-08 Thread Steven Price
On 05/01/2021 05:36, Nick Fan wrote: Add a basic GPU node for mt8192. Signed-off-by: Nick Fan --- This patch depends on Mediatek power and regulator support. Listed as following. [1]https://lore.kernel.org/patchwork/patch/1336293/

Re: [PATCH v6 3/4] drm/panfrost: devfreq: Disable devfreq when num_supplies > 1

2021-01-07 Thread Steven Price
On 05/01/2021 00:11, Nicolas Boichat wrote: GPUs with more than a single regulator (e.g. G-57 on MT8183) will require platform-specific handling, disable devfreq for now. Can you explain what actually goes wrong here? AFAICT the existing code does support controlling multiple regulators - but

Re: [PATCH 19/31] drm/panfrost: convert to use devm_pm_opp_* API

2021-01-05 Thread Steven Price
On 01/01/2021 16:54, Yangtao Li wrote: Use devm_pm_opp_* API to simplify code, and remove opp_table from panfrost_devfreq. Signed-off-by: Yangtao Li Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 34 ++--- drivers/gpu/drm/panfrost

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

2020-12-16 Thread Steven Price
On 16/12/2020 07:31, Haibo Xu wrote: [...] Hi Steve, Hi Haibo I have finished verifying the POC on a FVP setup, and the MTE test case can be migrated from one VM to another successfully. Since the test case is very simple which just maps one page with MTE enabled and does some memory access,

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

2020-12-07 Thread Steven Price
On 07/12/2020 15:27, Peter Maydell wrote: On Mon, 7 Dec 2020 at 14:48, Steven Price wrote: Sounds like you are making good progress - thanks for the update. Have you thought about how the PROT_MTE mappings might work if QEMU itself were to use MTE? My worry is that we end up with MTE

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

2020-12-07 Thread Steven Price
On 04/12/2020 08:25, Haibo Xu wrote: On Fri, 20 Nov 2020 at 17:51, Steven Price wrote: On 19/11/2020 19:11, Marc Zyngier wrote: On 2020-11-19 18:42, Andrew Jones wrote: On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: On Thu, 19 Nov 2020 at 15:39, Steven Price wrote

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

2020-12-07 Thread Steven Price
On 03/12/2020 17:07, Marc Zyngier wrote: diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index e2ef4c2edf06..b6668ffa04d9 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -569,7 +569,8 @@  #define SCTLR_ELx_M    (BIT(0))  

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

2020-12-03 Thread Steven Price
On 03/12/2020 16:09, Mark Rutland wrote: On Fri, Nov 27, 2020 at 03:21:11PM +, Steven Price wrote: It's been a week, and I think the comments on v5 made it clear that enforcing PROT_MTE requirements on the VMM was probably the wrong approach. So since I've got swap working correctly without

Re: [PATCH V2 1/2] mm/debug_vm_pgtable/basic: Add validation for dirtiness after write protect

2020-12-02 Thread Steven Price
On 01/12/2020 12:19, Anshuman Khandual wrote: This adds validation tests for dirtiness after write protect conversion for each page table level. There are two new separate test types involved here. The first test ensures that a given page table entry does not become dirty after pxx_wrprotect().

Re: [next] arm64: mte.c:176:17: error: 'struct thread_struct' has no member named 'sctlr_tcf0'

2020-11-30 Thread Steven Price
On 30/11/2020 15:42, Naresh Kamboju wrote: Linux next tag 20201130 arm64 build failed due to below error, - gcc-9, gcc-10 and clang-10 build FAIL - gcc-8 build PASS. make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/2/tmp ARCH=arm64

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

2020-11-27 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 v6 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-11-27 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| 4 arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/kernel/mte.c | 18 +- arch/arm64/kvm/arm.c

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

2020-11-27 Thread Steven Price
memory PROT_MTE. Instead KVM will set the PG_mte_tagged flag automatically if not present. * Fixed swap behaviour vs v4 by always checking for saved MTE tags for user entries in set_pte_at(). [2] https://lore.kernel.org/r/20201119153901.53705-1-steven.price%40arm.com Steven Price (2

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

2020-11-27 Thread Steven Price
On 27/11/2020 09:44, Qinglang Miao wrote: pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in a reference leak here. A new function pm_runtime_resume_and_get is introduced in [0] to keep usage counter balanced. So We fix the

Re: [PATCH 2/2] mm/debug_vm_pgtable/basic: Iterate over entire protection_map[]

2020-11-27 Thread Steven Price
gets macro replaced without requiring the mm_struct i.e __is_defined(__PAGETABLE_PMD_FOLDED). Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual Reviewed-by: Steven Price --- mm/debug_vm_pgtable.c | 47

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

2020-11-20 Thread Steven Price
On 20/11/2020 09:56, Marc Zyngier wrote: On 2020-11-20 09:50, Steven Price wrote: On 19/11/2020 19:11, Marc Zyngier wrote: Does this sound reasonable? I'll clean up the set_pte_at() change and post a v6 later today. Please hold on. I still haven't reviewed your v5, nor have I had time

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

2020-11-20 Thread Steven Price
On 19/11/2020 19:11, Marc Zyngier wrote: On 2020-11-19 18:42, Andrew Jones wrote: On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > This series adds support for Arm's Memory Tagging Extension (MTE) to > KVM, allowing KVM

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

2020-11-20 Thread Steven Price
On 19/11/2020 16:24, Catalin Marinas wrote: On Thu, Nov 19, 2020 at 12:45:52PM +, Steven Price wrote: On 18/11/2020 17:05, Andrew Jones wrote: On Wed, Nov 18, 2020 at 04:50:01PM +, Catalin Marinas wrote: On Wed, Nov 18, 2020 at 04:01:20PM +, Steven Price wrote: On 17/11/2020 16

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

2020-11-19 Thread Steven Price
On 19/11/2020 15:45, Peter Maydell wrote: On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: This series adds support for Arm's Memory Tagging Extension (MTE) to KVM, allowing KVM guests to make use of it. This builds on the existing user space support already in v5.10-rc1, see [1

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

2020-11-19 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 v5 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-11-19 Thread Steven Price
across swap. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_emulate.h | 3 +++ arch/arm64/include/asm/kvm_host.h| 4 arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/mmu.c | 6 ++ arch/arm64/kvm/sys_regs.c| 6 +- include/uapi

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

2020-11-19 Thread Steven Price
requirement is too strict. 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 | 8 arch/arm64/include/asm/sysreg.h| 3 ++- arch

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

2020-11-19 Thread Steven Price
On 18/11/2020 17:02, Catalin Marinas wrote: On Wed, Nov 18, 2020 at 04:01:18PM +, Steven Price wrote: On 17/11/2020 19:20, Marc Zyngier wrote: On 2020-10-26 15:57, Steven Price wrote: diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index d52c1b3ce589

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

2020-11-19 Thread Steven Price
On 18/11/2020 17:05, Andrew Jones wrote: On Wed, Nov 18, 2020 at 04:50:01PM +, Catalin Marinas wrote: On Wed, Nov 18, 2020 at 04:01:20PM +, Steven Price wrote: On 17/11/2020 16:07, Catalin Marinas wrote: On Mon, Oct 26, 2020 at 03:57:27PM +, Steven Price wrote: diff --git a/arch

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

2020-11-18 Thread Steven Price
On 17/11/2020 19:35, Marc Zyngier wrote: Hi Steven, On 2020-10-26 15:57, 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 (and clears

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

2020-11-18 Thread Steven Price
On 17/11/2020 16:07, Catalin Marinas wrote: Hi Steven, On Mon, Oct 26, 2020 at 03:57:27PM +, Steven Price wrote: diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index 19aacc7d64de..38fe25310ca1 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -862,6 +862,26

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

2020-11-18 Thread Steven Price
: On 2020-10-26 15:57, Steven Price wrote: 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

Re: [PATCH 6/7] drm/panfrost: dev_pm_opp_put_*() accepts NULL argument

2020-11-09 Thread Steven Price
On 06/11/2020 07:03, Viresh Kumar wrote: The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra check. Drop them. Signed-off-by: Viresh Kumar Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 6

Re: [PATCH] drm/panfrost: Replace devm_reset_control_array_get()

2020-11-04 Thread Steven Price
On 03/11/2020 01:48, Yejune Deng wrote: devm_reset_control_array_get_optional_exclusive() looks more readable Signed-off-by: Yejune Deng Reviewed-by: Steven Price Thanks, I'll push this to drm-misc-next. Steve --- drivers/gpu/drm/panfrost/panfrost_device.c | 2 +- 1 file changed, 1

Re: [PATCH -next] drm/panfrost: Fix unused variable warning

2020-11-02 Thread Steven Price
On 02/11/2020 09:33, Zou Wei wrote: Fixes the following W=1 kernel build warning: ./panfrost_job.c:617:28: warning: unused variable ‘js’ [-Wunused-variable] struct panfrost_job_slot *js = pfdev->js; ^~ Reported-by: Hulk Robot Signed-off-by: Zou Wei Boris

Re: [PATCH] drm/panfrost: Add support for non-existent reset node

2020-11-02 Thread Steven Price
On 02/11/2020 08:54, Yejune Deng wrote: Some dts hasn't no reset node, is should ok. Signed-off-by: Yejune Deng --- drivers/gpu/drm/panfrost/panfrost_device.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c

[PATCH] drm/panfrost: Fix module unload

2020-10-30 Thread Steven Price
using pm_runtime_set_suspended(). And also include this on the error path in panfrost_probe(). Fixes: aebe8c22a912 ("drm/panfrost: Fix possible suspend in panfrost_remove") Signed-off-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_drv.c | 5 +++-- 1 file changed, 3 insert

  1   2   3   4   5   6   7   >