[Xen-devel] [PATCH] Test code for SMMUv3 setup

2017-09-29 Thread Sameer Goel
DO NOT MERGE This patch contains test code for programming stream tables for PCIe devices seen by DOM0. This change can be used on top of [1]. [1] [RFC v2 0/7] SMMUv3 driver and the supporting framework --- xen/arch/arm/physdev.c| 41 +--

[Xen-devel] [RFC v2 3/7] xen/passthrough/arm: Introduce iommu_fwspec

2017-09-20 Thread Sameer Goel
Introduce a common structure to hold the fw (ACPI or DT) defined configuration for SMMU hw. The current use case is for arm SMMUs. So, making this architecture specific. Based on Linux kernel commit 57f98d2f61e1: iommu: Introduce iommu_fwspec Signed-off-by: Sameer Goel <sg...@codeaurora.

[Xen-devel] [RFC v2 6/7] Add verbatim copy of arm-smmu-v3.c from Linux

2017-09-20 Thread Sameer Goel
Based on commit bdf95923086fb359ccb44c815724c3ace1611c90 This is a verbatim snapshot of arm-smmu-v3.c from Linux kernel source code. No Xen code has been added and the file is not built. Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/drivers/passthrough/arm/smmu-v3.c

[Xen-devel] [RFC v2 7/7] xen/iommu: smmu-v3: Add Xen specific code to enable the ported driver

2017-09-20 Thread Sameer Goel
-by: Sameer Goel <sg...@codeaurora.org> --- xen/drivers/passthrough/arm/Makefile | 1 + xen/drivers/passthrough/arm/smmu-v3.c | 853 +- 2 files changed, 738 insertions(+), 116 deletions(-) diff --git a/xen/drivers/passthrough/arm/Makefile b/xen/d

[Xen-devel] [RFC v2 4/7] ACPI: arm: Support for IORT

2017-09-20 Thread Sameer Goel
Verbatim files from Linux kernel. iort.c: commit d89cf2e41826: ACPI/IORT: Fix the indentation in iort_scan_node() acpi_iort.h: commit 18b709beb503:ACPI/IORT: Make dma masks set-up IORT specific Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/drivers/acpi/arm/iort.c

[Xen-devel] [RFC v2 1/7] passthrough/arm: Modify SMMU driver to use generic device definition

2017-09-20 Thread Sameer Goel
Modify the SMMU code to use generic device instead of dt_device_node for functions that can be used for ACPI based systems too. Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/drivers/passthrough/arm/smmu.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[Xen-devel] [RFC v2 5/7] acpi:arm64: Add support for parsing IORT table

2017-09-20 Thread Sameer Goel
tested. Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/arch/arm/setup.c | 3 + xen/drivers/acpi/Makefile | 1 + xen/drivers/acpi/arm/Makefile | 1 + xen/drivers/acpi/arm/iort.c| 173 + xen/drivers/passt

[Xen-devel] [RFC v2 0/7] SMMUv3 driver and the supporting framework

2017-09-20 Thread Sameer Goel
node information from DSDT. - Should we port over code for non-hsared page tables from the kernel or leverage [3]. [1] "[RFC 0/6] IORT support and introduce fwspec" [2] "[Xen-devel] [RFC] [PATCH] arm-acpi: Hide SMMU from IORT for hardware domain" [3] "Non-shared"

[Xen-devel] [RFC v2 2/7] arm64: Add definitions for fwnode_handle

2017-09-20 Thread Sameer Goel
fwnode_handle Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/include/asm-arm/device.h | 2 ++ xen/include/xen/fwnode.h | 33 + 2 files changed, 35 insertions(+) create mode 100644 xen/include/xen/fwnode.h diff --git a/xen/include/asm-arm/device.h

[Xen-devel] [RFC 1/6] passthrough/arm: Modify SMMU driver to use generic device definition

2017-06-08 Thread Sameer Goel
Modify the SMMU code to use generic device instead of dt_device_node for functions that can be used for ACPI based systems too. Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/drivers/passthrough/arm/smmu.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[Xen-devel] [RFC 4/6] xen/passthrough/arm: Introduce iommu_fwspec

2017-06-08 Thread Sameer Goel
Introduce a common structure to hold the fw (ACPI or DT) defined configuration for SMMU hw. The current use case is for arm SMMUs. So, making this architecture specific. Based on Linux kernel commit 57f98d2f61e1: iommu: Introduce iommu_fwspec Signed-off-by: Sameer Goel <sg...@codeaurora.

[Xen-devel] [RFC 5/6] ACPI: arm: Support for IORT

2017-06-08 Thread Sameer Goel
Verbatim files from Linux kernel. iort.c: commit ca78d3173cff:Merge tag 'arm64-upstream' acpi_iort.h: commit 18b709beb503:ACPI/IORT: Make dma masks set-up IORT specific Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/drivers/acpi/arm/iort.c

[Xen-devel] [RFC 6/6] acpi:arm64: Add support for parsing IORT table

2017-06-08 Thread Sameer Goel
Add limited support for parsing IORT table to initialize SMMU devices. Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/arch/arm/setup.c| 3 + xen/drivers/acpi/Makefile | 1 + xen/drivers/acpi/arm/Makefile | 1 + xen/drivers/acpi/arm/

[Xen-devel] [RFC 0/6] IORT support and introduce fwspec

2017-06-08 Thread Sameer Goel
the streamids.Then it will call SMMU assign device with the right struct device argument. Sameer Goel (6): passthrough/arm: Modify SMMU driver to use generic device definition arm64: Add definitions for fwnode_handle Introduce _xrealloc xen/passthrough/arm: Introduce iommu_fwspec ACPI: arm

[Xen-devel] [RFC 3/6] Introduce _xrealloc

2017-06-08 Thread Sameer Goel
Introduce a memory realloc function. Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/common/xmalloc_tlsf.c | 13 + xen/include/xen/xmalloc.h | 1 + 2 files changed, 14 insertions(+) diff --git a/xen/common/xmalloc_tlsf.c b/xen/common/xmalloc_tlsf.c index b256dc5..5

[Xen-devel] [RFC 2/6] arm64: Add definitions for fwnode_handle

2017-06-08 Thread Sameer Goel
This will be used as a device property to match the DMA capable devices with the associated SMMU. The header file is a port from linux. Linux ChangeId:ce793486e23e: driver core / ACPI: Represent ACPI companions using fwnode_handle Signed-off-by: Sameer Goel <sg...@codeaurora.org> --

[Xen-devel] [PATCH v2 2/2] ACPICA: IORT: Add in support for the SMMUv3 subtable

2017-03-30 Thread Sameer Goel
. Wysocki <rafael.j.wyso...@intel.com> [Linux commit 4ac78baf88d85c49883fcc87d31198ebe408e54d] Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- xen/include/acpi/actbl2.h | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/xen/include/acpi/

[Xen-devel] [PATCH v2 0/2] Support for IORT table

2017-03-30 Thread Sameer Goel
This patch set adds definitions for IORT ACPI table. The header file definitions are ported from Linux Kernel source. Al Stone (1): ACPICA: IORT: Add in support for the SMMUv3 subtable Lv Zheng (1): ACPICA: ACPI 6.0: Add support for IORT table. xen/include/acpi/actbl2.h | 144

[Xen-devel] [PATCH v2 1/2] ACPICA: ACPI 6.0: Add support for IORT table.

2017-03-30 Thread Sameer Goel
rt. Lv Zheng. Link: https://github.com/acpica/acpica/commit/5de82757 Signed-off-by: Lv Zheng <lv.zh...@intel.com> Signed-off-by: Bob Moore <robert.mo...@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> [Linux commit 874f6a723e56d0da9e481629b17482bcd3801ecf] Sign

[Xen-devel] [PATCH] ACPICA: ACPI 6.0: Add support for IORT table.

2017-02-15 Thread Sameer Goel
rt. Lv Zheng. Link: https://github.com/acpica/acpica/commit/5de82757 Signed-off-by: Lv Zheng <lv.zh...@intel.com> Signed-off-by: Bob Moore <robert.mo...@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> [Linux commit 874f6a723e56d0da9e481629b17482bcd3801ecf] [only

[Xen-devel] [PATCH V2] Revert "xen/arm: do not relocate Xen outside of visible RAM"

2016-10-25 Thread Sameer Goel
placement at the end of the useable system RAM. Signed-off-by: Sameer Goel <sg...@codeaurora.org> --- The load restriction placed in the above reverted patch resulted in a crash when booting DOM0 on a Qualcomm platform with non contiguous system RAM. (XEN) DOM0: [ 0.00] bootmem alloc of

[Xen-devel] [PATCH] Revert "xen/arm: do not relocate Xen outside of visible RAM"

2016-10-24 Thread Sameer Goel
This reverts commit db92b1ac55cd5e193ae22b0b6f01fb47bc9e5d2f. There does not seem to be a restriction on non contiguous memory anymore . So, reverting this change, so that Xen is placed at the end of the useable system RAM even if the partitions are not contiguous. Signed-off-by: Sameer Goel <