[PATCH v4 16/16] kvm/arm: Align the VMID allocation with the arm64 ASID one

2021-04-14 Thread Shameer Kolothum
when booting a CPU to deal with stale information. This was previously done on the allocation of the first VMID of a new generation. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- Test Results: v4: The measurement was made on a HiSilicon D06 platform with maxcpus set

[PATCH v4 14/16] arm64/lib: Add an helper to free memory allocated by the ASID allocator

2021-04-14 Thread Shameer Kolothum
From: Julien Grall Some users of the ASID allocator (e.g VMID) may need to free any resources if the initialization fail. So introduce a function that allows freeing of any memory allocated by the ASID allocator. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- arch/arm64

[PATCH v4 15/16] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available

2021-04-14 Thread Shameer Kolothum
From: Julien Grall At the moment, the function kvm_get_vmid_bits() is looking up for the sanitized value of ID_AA64MMFR1_EL1 and extract the information regarding the number of VMID bits supported. This is fine as the function is mainly used during VMID roll-over. New use in a follow-up patch

[PATCH v4 13/16] arm64: Move the ASID allocator code in a separate file

2021-04-14 Thread Shameer Kolothum
is still valid. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- arch/arm64/include/asm/lib_asid.h | 85 arch/arm64/lib/Makefile | 2 + arch/arm64/lib/asid.c | 258 + arch/arm64/mm/context.c | 310

[PATCH v4 12/16] arm64/mm: Introduce a callback to set reserved bits

2021-04-14 Thread Shameer Kolothum
Setting the reserved asid bits will vary depending on the actual user of the ASID allocator. Introduce a new callback. Signed-off-by: Shameer Kolothum --- arch/arm64/mm/context.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm

[PATCH v4 11/16] arm64/mm: Introduce a callback to flush the local context

2021-04-14 Thread Shameer Kolothum
From: Julien Grall Flushing the local context will vary depending on the actual user of the ASID allocator. Introduce a new callback to flush the local context and move the call to flush local TLB in it. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- arch/arm64/mm/context.c

[PATCH v4 09/16] arm64/mm: Split the function check_and_switch_context in 3 parts

2021-04-14 Thread Shameer Kolothum
) have not been merged in a single function because we want to avoid to add a branch in when the ASID is still valid. This will matter when the code will be moved in separate file later on as 1) will reside in the header as a static inline function. Signed-off-by: Julien Grall Signed-off-by: Shameer

[PATCH v4 08/16] arm64/mm: Split asid_inits in 2 parts

2021-04-14 Thread Shameer Kolothum
From: Julien Grall Move out the common initialization of the ASID allocator in a separate function. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- v3-->v4 -dropped asid_per_ctxt and added pinned asid map init. --- arch/arm64/mm/context.c |

[PATCH v4 10/16] arm64/mm: Split the arm64_mm_context_get/put

2021-04-14 Thread Shameer Kolothum
Keep only the mm specific part in arm64_mm_context_get/put and move the rest to generic functions. Signed-off-by: Shameer Kolothum --- arch/arm64/mm/context.c | 53 +++-- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/arch/arm64/mm/context.c

[PATCH v4 06/16] arm64/mm: Introduce NUM_CTXT_ASIDS

2021-04-14 Thread Shameer Kolothum
From: Julien Grall At the moment ASID_FIRST_VERSION is used to know the number of ASIDs supported. As we are going to move the ASID allocator to a separate file, it would be better to use a different name for external users. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- v3

[PATCH v4 07/16] arm64/mm: Move Pinned ASID related variables to asid_info

2021-04-14 Thread Shameer Kolothum
The Pinned ASID variables hold information for a given ASID allocator. So move them to the structure asid_info. Signed-off-by: Shameer Kolothum --- arch/arm64/mm/context.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/arm64/mm

[PATCH v4 05/16] arm64/mm: Remove dependency on MM in new_context

2021-04-14 Thread Shameer Kolothum
please note that 'pinned' may be NULL if the user doesn't require the pinned asid support. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- v3-->v4: Changes related to Pinned ASID refcount. --- arch/arm64/mm/context.c | 11 ++- 1 file changed, 6 insertions(+), 5 deleti

[PATCH v4 04/16] arm64/mm: Move the variable lock and tlb_flush_pending to asid_info

2021-04-14 Thread Shameer Kolothum
From: Julien Grall The variables lock and tlb_flush_pending holds information for a given ASID allocator. So move them to the asid_info structure. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- arch/arm64/mm/context.c | 23 --- 1 file changed, 12

[PATCH v4 02/16] arm64/mm: Move active_asids and reserved_asids to asid_info

2021-04-14 Thread Shameer Kolothum
-by: Shameer Kolothum --- v3-->v4 keep the this_cpu_ptr in fastpath. See c4885bbb3afe("arm64/mm: save memory access in check_and_switch_context() fast switch path") --- arch/arm64/mm/context.c | 32 1 file changed, 20 insertions(+), 12 deletions(-

[PATCH v4 03/16] arm64/mm: Move bits to asid_info

2021-04-14 Thread Shameer Kolothum
-by: Shameer Kolothum --- arch/arm64/mm/context.c | 70 + 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm/context.c index 42e011094571..1fd40a42955c 100644 --- a/arch/arm64/mm/context.c +++ b/arch/arm64

[PATCH v4 01/16] arm64/mm: Introduce asid_info structure and move asid_generation/asid_map to it

2021-04-14 Thread Shameer Kolothum
variables. Note to avoid more renaming aftwards, a local variable 'info' has been created and is a pointer to the ASID allocator structure. Signed-off-by: Julien Grall Signed-off-by: Shameer Kolothum --- v3-->v4: Move cur_idx into asid_info. --- arch/arm64/mm/context.c |

[PATCH v4 00/16] kvm/arm: Align the VMID allocation with the arm64 ASID one

2021-04-14 Thread Shameer Kolothum
MID allocation with the arm64 ASID one Shameer Kolothum (3): arm64/mm: Move Pinned ASID related variables to asid_info arm64/mm: Split the arm64_mm_context_get/put arm64/mm: Introduce a callback to set reserved bits arch/arm64/include/asm/cpucaps.h | 3 +- arch/arm64/include/asm/kvm_as

[PATCH v3] iommu: Check dev->iommu in iommu_dev_xxx functions

2021-03-03 Thread Shameer Kolothum
;) Signed-off-by: Shameer Kolothum --- v2 --> v3 -Removed iommu_ops from struct dev_iommu. v1 --> v2: -Added iommu_ops to struct dev_iommu based on the discussion with Robin. -Rebased against iommu-tree core branch. --- drivers/iommu/iommu.c | 24 +++- 1 file changed,

[PATCH v2] iommu: Check dev->iommu in iommu_dev_xxx functions

2021-02-01 Thread Shameer Kolothum
successfully associated with an iommu.  Fixes: a3a195929d40 ("iommu: Add APIs for multiple domains per device") Signed-off-by: Shameer Kolothum --- v1 --> v2: -Added iommu_ops to struct dev_iommu based on the discussion with Robin. -Rebased against iommu-tree core branch. ---

[PATCH] iommu: Check dev->iommu in iommu_dev_xxx functions

2021-01-26 Thread Shameer Kolothum
The device iommu probe/attach might have failed leaving dev->iommu to NULL and device drivers may still invoke these functions resulting a crash in iommu vendor driver code. Hence make sure we check that. Signed-off-by: Shameer Kolothum --- drivers/iommu/iommu.c | 8 1 file changed

[PATCH] genirq/msi: Make sure early activation of all PCI MSIs

2021-01-21 Thread Shameer Kolothum
all the irqs for both MSI and MSI-x cases. Signed-off-by: Shameer Kolothum --- It is unclear to me whether not performing the early activation of all MSI irqs was deliberate and has consequences on any other platforms. Please let me know. Thanks, Shameer --- kernel/ir

[PATCH] irqchip/gic-v3: Check SRE bit for GICv2 legacy support

2020-11-30 Thread Shameer Kolothum
the ICC_SRE_EL1.SRE bit to decide whether hardware supports GICv2 mode in addition to the above firmware based check. Signed-off-by: Shameer Kolothum --- On Hisilicon D06, UEFI sets the GIC MADT GICC gicv_base_address but the GIC implementation on these boards doesn't have the GICv2 legacy support

[PATCH v7 4/4] perf/smmuv3: Enable HiSilicon Erratum 162001800 quirk

2019-03-26 Thread Shameer Kolothum
. To work around this, the current value of the counter is read and used for delta calculations. OEM information from ACPI header is used to identify the affected hardware platforms. Signed-off-by: Shameer Kolothum Reviewed-by: Hanjun Guo Reviewed-by: Robin Murphy --- drivers/acpi/arm64/iort.c

[PATCH v7 3/4] perf/smmuv3: Add MSI irq support

2019-03-26 Thread Shameer Kolothum
This adds support for MSI-based counter overflow interrupt. Signed-off-by: Shameer Kolothum Reviewed-by: Robin Murphy --- drivers/perf/arm_smmuv3_pmu.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf

[PATCH v7 2/4] perf/smmuv3: Add arm64 smmuv3 pmu driver

2019-03-26 Thread Shameer Kolothum
-off-by: Shameer Kolothum Reviewed-by: Robin Murphy --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 776 ++ 3 files changed, 786 insertions(+) create mode 100644 drivers/perf/arm_smmuv3_pmu.c diff -

[PATCH v7 1/4] ACPI/IORT: Add support for PMCG

2019-03-26 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMUv3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum Reviewed-by: Robin Murphy Acked-by: Lorenzo

[PATCH v7 0/4] arm64 SMMUv3 PMU driver with IORT support

2019-03-26 Thread Shameer Kolothum
/IORT: Add support for PMCG perf/smmuv3: Add arm64 smmuv3 pmu driver Shameer Kolothum (2): perf/smmuv3: Add MSI irq support perf/smmuv3: Enable HiSilicon Erratum 162001800 quirk drivers/acpi/arm64/iort.c | 131 +-- drivers/perf/Kconfig | 9 + drivers/perf/Makefile

[PATCH v6 0/4] arm64 SMMUv3 PMU driver with IORT support

2019-02-04 Thread Shameer Kolothum
u dev and named PMUs to make the association visible to user. - Added MSI support for overflow irq [1]https://www.spinics.net/lists/arm-kernel/msg598591.html Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver Shameer Kolothum (2): perf/smmuv3: Add

[PATCH v6 2/4] perf: add arm64 smmuv3 pmu driver

2019-02-04 Thread Shameer Kolothum
-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 781 ++ 3 files changed, 791 insertions(+) create mode 100644 drivers/perf/arm_smmuv3_pmu.c diff --git a/drivers/perf/Kconf

[PATCH v6 1/4] acpi: arm64: add iort support for PMCG

2019-02-04 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMUv3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum Reviewed-by: Robin Murphy --- drivers/acpi

[PATCH v6 3/4] perf/smmuv3: Add MSI irq support

2019-02-04 Thread Shameer Kolothum
This adds support for MSI-based counter overflow interrupt. Signed-off-by: Shameer Kolothum Reviewed-by: Robin Murphy --- drivers/perf/arm_smmuv3_pmu.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf

[PATCH v6 4/4] perf/smmuv3_pmu: Enable HiSilicon Erratum 162001800 quirk

2019-02-04 Thread Shameer Kolothum
. To work around this, the current value of the counter is read and used for delta calculations. OEM information from ACPI header is used to identify the affected hardware platforms. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 16 ++- drivers/perf

[PATCH v4] irqchip: gicv3-its: Use NUMA aware memory allocation for ITS tables

2019-01-14 Thread Shameer Kolothum
inter node accesses. Apache Web server benchmarking using ab tool on a HiSilicon D06 board with multiple numa mem nodes shows Time per request and Transfer rate improvements of ~3.6% with this patch. Signed-off-by: Shanker Donthineni Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum

[PATCH v3] irqchip: gicv3-its: Use NUMA aware memory allocation for ITS tables

2018-12-13 Thread Shameer Kolothum
inter node accesses. Apache Web server benchmarking using ab tool on a HiSilicon D06 board with multiple numa mem nodes shows Time per request and Transfer rate improvements of ~3.6% with this patch. Signed-off-by: Shanker Donthineni Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum

[PATCH v5 2/4] perf: add arm64 smmuv3 pmu driver

2018-11-30 Thread Shameer Kolothum
-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 778 ++ 3 files changed, 788 insertions(+) create mode 100644 drivers/perf/arm_smmuv3_pmu.c diff --git a/drivers/perf/Kconf

[PATCH v5 2/4] perf: add arm64 smmuv3 pmu driver

2018-11-30 Thread Shameer Kolothum
-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 778 ++ 3 files changed, 788 insertions(+) create mode 100644 drivers/perf/arm_smmuv3_pmu.c diff --git a/drivers/perf/Kconf

[PATCH v5 1/4] acpi: arm64: add iort support for PMCG

2018-11-30 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMUv3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 97

[PATCH v5 1/4] acpi: arm64: add iort support for PMCG

2018-11-30 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMUv3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 97

[PATCH v5 0/4] arm64 SMMUv3 PMU driver with IORT support

2018-11-30 Thread Shameer Kolothum
to retrieve the associated smmu dev and named PMUs to make the association visible to user. - Added MSI support for overflow irq [1]https://www.spinics.net/lists/arm-kernel/msg598591.html Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver Shameer Kolothum

[PATCH v5 0/4] arm64 SMMUv3 PMU driver with IORT support

2018-11-30 Thread Shameer Kolothum
to retrieve the associated smmu dev and named PMUs to make the association visible to user. - Added MSI support for overflow irq [1]https://www.spinics.net/lists/arm-kernel/msg598591.html Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver Shameer Kolothum

[PATCH v5 3/4] perf/smmuv3: Add MSI irq support

2018-11-30 Thread Shameer Kolothum
This adds support for MSI-based counter overflow interrupt. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index

[PATCH v5 4/4] perf/smmuv3_pmu: Enable HiSilicon Erratum 162001800 quirk

2018-11-30 Thread Shameer Kolothum
. To work around this, the current value of the counter is read and used for delta calculations. OEM information from ACPI header is used to identify the affected hardware platforms. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 30 +++--- drivers

[PATCH v5 3/4] perf/smmuv3: Add MSI irq support

2018-11-30 Thread Shameer Kolothum
This adds support for MSI-based counter overflow interrupt. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index

[PATCH v5 4/4] perf/smmuv3_pmu: Enable HiSilicon Erratum 162001800 quirk

2018-11-30 Thread Shameer Kolothum
. To work around this, the current value of the counter is read and used for delta calculations. OEM information from ACPI header is used to identify the affected hardware platforms. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 30 +++--- drivers

[PATCH v4 1/4] acpi: arm64: add iort support for PMCG

2018-10-16 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMUv3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 97

[PATCH v4 0/4] arm64 SMMUv3 PMU driver with IORT support

2018-10-16 Thread Shameer Kolothum
tml Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver Shameer Kolothum (2): perf/smmuv3: Add MSI irq support perf/smmuv3_pmu: Enable HiSilicon Erratum 162001800 quirk drivers/acpi/arm64/iort.c | 97 - drivers/perf/Kconfig | 9 +

[PATCH v4 1/4] acpi: arm64: add iort support for PMCG

2018-10-16 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMUv3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 97

[PATCH v4 0/4] arm64 SMMUv3 PMU driver with IORT support

2018-10-16 Thread Shameer Kolothum
tml Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver Shameer Kolothum (2): perf/smmuv3: Add MSI irq support perf/smmuv3_pmu: Enable HiSilicon Erratum 162001800 quirk drivers/acpi/arm64/iort.c | 97 - drivers/perf/Kconfig | 9 +

[PATCH v4 3/4] perf/smmuv3: Add MSI irq support

2018-10-16 Thread Shameer Kolothum
This adds support for MSI-based counter overflow interrupt. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index

[PATCH v4 4/4] perf/smmuv3_pmu: Enable HiSilicon Erratum 162001800 quirk

2018-10-16 Thread Shameer Kolothum
hardware platform. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 137 +++--- 1 file changed, 130 insertions(+), 7 deletions(-) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index d927ef8..519545e 100644

[PATCH v4 3/4] perf/smmuv3: Add MSI irq support

2018-10-16 Thread Shameer Kolothum
This adds support for MSI-based counter overflow interrupt. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index

[PATCH v4 4/4] perf/smmuv3_pmu: Enable HiSilicon Erratum 162001800 quirk

2018-10-16 Thread Shameer Kolothum
hardware platform. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 137 +++--- 1 file changed, 130 insertions(+), 7 deletions(-) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index d927ef8..519545e 100644

[PATCH v4 2/4] perf: add arm64 smmuv3 pmu driver

2018-10-16 Thread Shameer Kolothum
-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 778 ++ 3 files changed, 788 insertions(+) create mode 100644 drivers/perf/arm_smmuv3_pmu.c diff --git a/drivers/perf/Kconf

[PATCH v4 2/4] perf: add arm64 smmuv3 pmu driver

2018-10-16 Thread Shameer Kolothum
-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 778 ++ 3 files changed, 788 insertions(+) create mode 100644 drivers/perf/arm_smmuv3_pmu.c diff --git a/drivers/perf/Kconf

[PATCH v3 0/3] arm64 SMMUv3 PMU driver with IORT support

2018-09-21 Thread Shameer Kolothum
helper to retrieve the associated smmu dev and named PMUs to make the association visible to user. - Added MSI support for overflow irq [1]https://www.spinics.net/lists/arm-kernel/msg598591.html Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver S

[PATCH v3 0/3] arm64 SMMUv3 PMU driver with IORT support

2018-09-21 Thread Shameer Kolothum
helper to retrieve the associated smmu dev and named PMUs to make the association visible to user. - Added MSI support for overflow irq [1]https://www.spinics.net/lists/arm-kernel/msg598591.html Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver S

[PATCH v3 3/3] perf/smmuv3: Add MSI irq support

2018-09-21 Thread Shameer Kolothum
This adds support for MSI-based counter overflow interrupt. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index

[PATCH v3 3/3] perf/smmuv3: Add MSI irq support

2018-09-21 Thread Shameer Kolothum
This adds support for MSI-based counter overflow interrupt. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index

[PATCH v3 1/3] acpi: arm64: add iort support for PMCG

2018-09-21 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMUv3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 78

[PATCH v3 1/3] acpi: arm64: add iort support for PMCG

2018-09-21 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMUv3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 78

[PATCH v3 2/3] perf: add arm64 smmuv3 pmu driver

2018-09-21 Thread Shameer Kolothum
events. SMMU events are not attributable to a CPU, so task mode and sampling are not supported. Signed-off-by: Neil Leeder Signed-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 736

[PATCH v3 2/3] perf: add arm64 smmuv3 pmu driver

2018-09-21 Thread Shameer Kolothum
events. SMMU events are not attributable to a CPU, so task mode and sampling are not supported. Signed-off-by: Neil Leeder Signed-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 736

[PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-07-24 Thread Shameer Kolothum
are not attributable to a CPU, so task mode and sampling are not supported. Signed-off-by: Neil Leeder Signed-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 838 ++ 3 files

[PATCH v2 4/4] perf/smmuv3: Add MSI irq support

2018-07-24 Thread Shameer Kolothum
This adds support for MSI based counter overflow interrupt. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 105 +- 1 file changed, 84 insertions(+), 21 deletions(-) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf

[PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-07-24 Thread Shameer Kolothum
are not attributable to a CPU, so task mode and sampling are not supported. Signed-off-by: Neil Leeder Signed-off-by: Shameer Kolothum --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 838 ++ 3 files

[PATCH v2 4/4] perf/smmuv3: Add MSI irq support

2018-07-24 Thread Shameer Kolothum
This adds support for MSI based counter overflow interrupt. Signed-off-by: Shameer Kolothum --- drivers/perf/arm_smmuv3_pmu.c | 105 +- 1 file changed, 84 insertions(+), 21 deletions(-) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf

[PATCH v2 1/4] acpi: arm64: add iort support for PMCG

2018-07-24 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMU v3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 95

[PATCH v2 1/4] acpi: arm64: add iort support for PMCG

2018-07-24 Thread Shameer Kolothum
From: Neil Leeder Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMU v3 PMU driver. Signed-off-by: Neil Leeder Signed-off-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 95

[PATCH v2 2/4] acpi: arm64: iort helper to find the associated smmu of pmcg node

2018-07-24 Thread Shameer Kolothum
This adds an helper to retrieve the smmuv3 dev(if any) associated with the PMCG node. This will be used in subsequent SMMUv3 PMU driver patch to name the pmu device. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 84 --- include/linux

[PATCH v2 2/4] acpi: arm64: iort helper to find the associated smmu of pmcg node

2018-07-24 Thread Shameer Kolothum
This adds an helper to retrieve the smmuv3 dev(if any) associated with the PMCG node. This will be used in subsequent SMMUv3 PMU driver patch to name the pmu device. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 84 --- include/linux

[PATCH v2 0/4] arm64 SMMUv3 PMU driver with IORT support

2018-07-24 Thread Shameer Kolothum
591.html Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver Shameer Kolothum (2): acpi: arm64: iort helper to find the associated smmu of pmcg node perf/smmuv3: Add MSI irq support drivers/acpi/arm64/iort.c | 179 +++-- drivers/perf/Kcon

[PATCH v2 0/4] arm64 SMMUv3 PMU driver with IORT support

2018-07-24 Thread Shameer Kolothum
591.html Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver Shameer Kolothum (2): acpi: arm64: iort helper to find the associated smmu of pmcg node perf/smmuv3: Add MSI irq support drivers/acpi/arm64/iort.c | 179 +++-- drivers/perf/Kcon

[PATCH v6 4/7] iommu/dma: Move PCI window region reservation back into dma specific path.

2018-04-18 Thread Shameer Kolothum
eport only iommu specific reserved regions to the user space. Cc: Joerg Roedel <j...@8bytes.org> Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- drivers/iommu/dma-iommu.c | 54 ++-

[PATCH v6 1/7] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-04-18 Thread Shameer Kolothum
This introduces an iova list that is valid for dma mappings. Make sure the new iommu aperture window doesn't conflict with the current one or with any existing dma mappings during attach. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_t

[PATCH v6 4/7] iommu/dma: Move PCI window region reservation back into dma specific path.

2018-04-18 Thread Shameer Kolothum
eport only iommu specific reserved regions to the user space. Cc: Joerg Roedel Signed-off-by: Shameer Kolothum Reviewed-by: Robin Murphy --- drivers/iommu/dma-iommu.c | 54 ++- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/drivers

[PATCH v6 1/7] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-04-18 Thread Shameer Kolothum
This introduces an iova list that is valid for dma mappings. Make sure the new iommu aperture window doesn't conflict with the current one or with any existing dma mappings during attach. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 183

[PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-04-18 Thread Shameer Kolothum
ents to make iova list management logic more clear. - Use of iova list copy so that original is not altered in case of failure. RFCv1 --> RFCv2 Addressed comments from Alex: -Introduced IOVA list management and added checks for conflicts with existing dma map entries during attach/detach. Sha

[PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-04-18 Thread Shameer Kolothum
ents to make iova list management logic more clear. - Use of iova list copy so that original is not altered in case of failure. RFCv1 --> RFCv2 Addressed comments from Alex: -Introduced IOVA list management and added checks for conflicts with existing dma map entries during attach/detach. Sha

[PATCH v6 3/7] vfio/type1: Update iova list on detach

2018-04-18 Thread Shameer Kolothum
Get a copy of iova list on _group_detach and try to update the list. On success replace the current one with the copy. Leave the list as it is if update fails. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.

[PATCH v6 3/7] vfio/type1: Update iova list on detach

2018-04-18 Thread Shameer Kolothum
Get a copy of iova list on _group_detach and try to update the list. On success replace the current one with the copy. Leave the list as it is if update fails. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 91 + 1 file changed, 91

[PATCH v6 5/7] vfio/type1: check dma map request is within a valid iova range

2018-04-18 Thread Shameer Kolothum
This checks and rejects any dma map request outside valid iova range. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/d

[PATCH v6 5/7] vfio/type1: check dma map request is within a valid iova range

2018-04-18 Thread Shameer Kolothum
This checks and rejects any dma map request outside valid iova range. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 6fd6841

[PATCH v6 7/7] vfio/type1: remove duplicate retrieval of reserved regions

2018-04-18 Thread Shameer Kolothum
As we now already have the reserved regions list, just pass that into vfio_iommu_has_sw_msi() fn. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/d

[PATCH v6 7/7] vfio/type1: remove duplicate retrieval of reserved regions

2018-04-18 Thread Shameer Kolothum
As we now already have the reserved regions list, just pass that into vfio_iommu_has_sw_msi() fn. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers

[PATCH v6 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-04-18 Thread Shameer Kolothum
This retrieves the reserved regions associated with dev group and checks for conflicts with any existing dma mappings. Also update the iova list excluding the reserved regions. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.

[PATCH v6 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-04-18 Thread Shameer Kolothum
This retrieves the reserved regions associated with dev group and checks for conflicts with any existing dma mappings. Also update the iova list excluding the reserved regions. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 90 + 1

[PATCH v6 6/7] vfio/type1: Add IOVA range capability support

2018-04-18 Thread Shameer Kolothum
This allows the user-space to retrieve the supported IOVA range(s), excluding any reserved regions. The implementation is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_t

[PATCH v6 6/7] vfio/type1: Add IOVA range capability support

2018-04-18 Thread Shameer Kolothum
This allows the user-space to retrieve the supported IOVA range(s), excluding any reserved regions. The implementation is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 96

[PATCH v5 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-03-15 Thread Shameer Kolothum
This retrieves the reserved regions associated with dev group and checks for conflicts with any existing dma mappings. Also update the iova list excluding the reserved regions. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.

[PATCH v5 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-03-15 Thread Shameer Kolothum
This retrieves the reserved regions associated with dev group and checks for conflicts with any existing dma mappings. Also update the iova list excluding the reserved regions. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 90 + 1

[PATCH v5 4/7] vfio/type1: check dma map request is within a valid iova range

2018-03-15 Thread Shameer Kolothum
This checks and rejects any dma map request outside valid iova range. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/d

[PATCH v5 4/7] vfio/type1: check dma map request is within a valid iova range

2018-03-15 Thread Shameer Kolothum
This checks and rejects any dma map request outside valid iova range. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 25e6920

[PATCH v5 1/7] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-03-15 Thread Shameer Kolothum
This introduces an iova list that is valid for dma mappings. Make sure the new iommu aperture window doesn't conflict with the current one or with any existing dma mappings during attach. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_t

[PATCH v5 1/7] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-03-15 Thread Shameer Kolothum
This introduces an iova list that is valid for dma mappings. Make sure the new iommu aperture window doesn't conflict with the current one or with any existing dma mappings during attach. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 183

[PATCH v5 7/7] iommu/dma: Move PCI window region reservation back into dma specific path.

2018-03-15 Thread Shameer Kolothum
eport only iommu specific reserved regions to the user space. Cc: Robin Murphy <robin.mur...@arm.com> Cc: Joerg Roedel <j...@8bytes.org> Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/dma-iommu.c | 54 ++-

[PATCH v5 7/7] iommu/dma: Move PCI window region reservation back into dma specific path.

2018-03-15 Thread Shameer Kolothum
eport only iommu specific reserved regions to the user space. Cc: Robin Murphy Cc: Joerg Roedel Signed-off-by: Shameer Kolothum --- drivers/iommu/dma-iommu.c | 54 ++- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/drivers/iommu/dma

[PATCH v5 3/7] vfio/type1: Update iova list on detach

2018-03-15 Thread Shameer Kolothum
Get a copy of iova list on _group_detach and try to update the list. On success replace the current one with the copy. Leave the list as it is if update fails. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.

[PATCH v5 3/7] vfio/type1: Update iova list on detach

2018-03-15 Thread Shameer Kolothum
Get a copy of iova list on _group_detach and try to update the list. On success replace the current one with the copy. Leave the list as it is if update fails. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 91 + 1 file changed, 91

[PATCH v5 0/7] vfio/type1: Add support for valid iova list management

2018-03-15 Thread Shameer Kolothum
ttach/detach. Shameer Kolothum (2): vfio/type1: Add IOVA range capability support iommu/dma: Move PCI window region reservation back into dma specific path. Shameerali Kolothum Thodi (5): vfio/type1: Introduce iova list and add iommu aperture validity check vfio/type1: Check re

[PATCH v5 5/7] vfio/type1: Add IOVA range capability support

2018-03-15 Thread Shameer Kolothum
This allows the user-space to retrieve the supported IOVA range(s), excluding any reserved regions. The implementation is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_t

  1   2   >