Re: [Xen-devel] [PATCH V3 1/8] iommu/arm: Add iommu_helpers.c file to keep common for IOMMUs stuff

2019-09-09 Thread Oleksandr
On 09.09.19 14:45, Julien Grall wrote: Hi Oleksandr, Hi, Julien On 8/20/19 7:09 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Introduce a separate file to keep various helpers which could be used by more than one IOMMU driver in order not to duplicate code. The first

Re: [Xen-devel] [PATCH V3 2/8] iommu/arm: Add ability to handle deferred probing request

2019-09-09 Thread Oleksandr
On 09.09.19 15:24, Julien Grall wrote: Hi Oleksandr, Hi, Julien The code looks code, few comments below. On 8/20/19 7:09 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch adds minimal required support to General IOMMU framework to be able to handle a case when

Re: [Xen-devel] [PATCH V3 6/8] iommu: Add of_xlate callback

2019-09-09 Thread Oleksandr
On 09.09.19 15:37, Julien Grall wrote: Hi, Hi, all. On 8/27/19 4:11 PM, Jan Beulich wrote: On 27.08.2019 16:59, Oleksandr wrote: There was a preference to introduce callback in a separate patch [2]. Anyway, shall I fold it? Hmm, I disagree with Julien here. I don't think we s

Re: [Xen-devel] [PATCH V3 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-09 Thread Oleksandr
On 02.09.19 10:04, Yoshihiro Shimoda wrote: Hi Oleksandr-san, Hi, Shimoda-san From: Oleksandr, Sent: Thursday, August 29, 2019 7:56 PM About this hardware handling, this patch seems good to me. But, since I'm not familiar about Xen passthrough framework, I think I cannot a

Re: [Xen-devel] [PATCH V3 5/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-09 Thread Oleksandr
On 09.09.19 17:36, Julien Grall wrote: Hi Oleksandr, Hi, Julien On 8/20/19 7:09 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko We need to have some abstract way to add new device to the IOMMU based on the generic IOMMU DT bindings [1] which can be used for both DT (right

Re: [Xen-devel] [PATCH V3 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-09 Thread Oleksandr
On 09.09.19 18:04, Julien Grall wrote: Hi Oleksandr, Hi Julien On 8/20/19 7:09 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch adds new iommu_add_dt_device API for adding DT device to the IOMMU using generic IOMMU DT bindings [1] and previously added

Re: [Xen-devel] [PATCH V3 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-10 Thread Oleksandr
On 10.09.19 00:24, Julien Grall wrote: Hi Oleksandr, Hi Julien On 8/20/19 7:09 PM, Oleksandr Tyshchenko wrote: diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig index bc0e9cd..c93a6b2 100644 --- a/xen/arch/arm/platforms/Kconfig +++ b/xen/arch/arm/platforms

Re: [Xen-devel] [PATCH V3 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-10 Thread Oleksandr
y only mandatory if you are using the generic bindings. So I would only check ops->of_xlate if "iommus" exists. Agree. Will do. Just to clarify. What about "ops->add_device", shall I check it if "iommus" exists a

Re: [Xen-devel] [PATCH] [RFC V2] xen/arm: Restrict "p2m_ipa_bits" according to the IOMMU requirements

2019-09-10 Thread Oleksandr
On 10.09.19 18:11, Julien Grall wrote: Hi Oleksandr, Hi, Julien On 8/23/19 8:34 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko There is a strict requirement for the IOMMU which wants to share the P2M table with the CPU. The IOMMU's Stage-2 input size must be equal t

Re: [Xen-devel] [PATCH V3 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-11 Thread Oleksandr
On 10.09.19 17:31, Julien Grall wrote: Hi, Hi Julien On 9/10/19 12:04 PM, Oleksandr wrote: On 10.09.19 00:24, Julien Grall wrote:   ---help---   Enable all the required drivers for Renesas RCar3   diff --git a/xen/drivers/passthrough/Kconfig b/xen/drivers/passthrough/Kconfig

Re: [Xen-devel] [PATCH] [RFC V2] xen/arm: Restrict "p2m_ipa_bits" according to the IOMMU requirements

2019-09-11 Thread Oleksandr
On 10.09.19 21:55, Julien Grall wrote: Hi, Hi Julien On 9/10/19 5:24 PM, Oleksandr wrote: On 10.09.19 18:11, Julien Grall wrote: Hi Oleksandr, Hi, Julien On 8/23/19 8:34 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko There is a strict requirement for the IOMMU

Re: [Xen-devel] [ANNOUNCE] Xen 4.13 Development Update

2019-09-13 Thread Oleksandr
Hi, Juergen I have just pushed new version, so please update === ARM === *  Renesas IPMMU-VMSA support + Linux's iommu_fwspec (V4)    -  Oleksandr Tyshchenko -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-

Re: [Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-16 Thread Oleksandr
On 16.09.19 12:53, Jan Beulich wrote: Hi, Jan On 13.09.2019 17:35, Oleksandr Tyshchenko wrote: --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -239,6 +239,16 @@ struct iommu_ops { int __must_check (*iotlb_flush_all)(struct domain *d); int

Re: [Xen-devel] [PATCH V4 4/8] xen/common: Introduce _xrealloc function

2019-09-16 Thread Oleksandr
On 16.09.19 13:13, Jan Beulich wrote: Hi, Jan On 13.09.2019 17:35, Oleksandr Tyshchenko wrote: --- a/xen/common/xmalloc_tlsf.c +++ b/xen/common/xmalloc_tlsf.c @@ -598,6 +598,58 @@ void *_xzalloc(unsigned long size, unsigned long align) return p ? memset(p, 0, size) : p; } +void

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-16 Thread Oleksandr
mention about such abuse or change it to deal with real flexible array member (ids[]). Any thoughts? -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V4 5/8] xen/common: Introduce xrealloc_flex_struct() helper macros

2019-09-16 Thread Oleksandr
On 16.09.19 13:37, Jan Beulich wrote: Hi, Jan On 13.09.2019 17:35, Oleksandr Tyshchenko wrote: --- a/xen/include/xen/xmalloc.h +++ b/xen/include/xen/xmalloc.h @@ -35,6 +35,15 @@ #define xzalloc_array(_type, _num) \ ((_type *)_xzalloc_array(sizeof(_type), __alignof__(_type), _num

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-17 Thread Oleksandr
On 17.09.19 09:12, Jan Beulich wrote: Hi, Jan On 16.09.2019 20:08, Oleksandr wrote: On 16.09.19 13:40, Jan Beulich wrote: +/* per-device IOMMU instance data */ +struct iommu_fwspec { +/* this device's IOMMU */ +struct device *iommu_dev; +/* IOMMU driver private data for

Re: [Xen-devel] [PATCH V4 2/8] iommu/arm: Add ability to handle deferred probing request

2019-09-19 Thread Oleksandr
On 19.09.19 12:44, Julien Grall wrote: Hi Oleksandr, Hi, Julien. On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: diff --git a/xen/drivers/passthrough/arm/iommu.c b/xen/drivers/passthrough/arm/iommu.c index f219de9..555acfc 100644 --- a/xen/drivers/passthrough/arm/iommu.c +++ b/xen

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-19 Thread Oleksandr
s, fwspec->num_ids + num_ids); Julien, what do you think? -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V4 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-19 Thread Oleksandr
On 19.09.19 14:45, Julien Grall wrote: Hi Oleksandr, Hi Julien On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory Management Unit (IOMMU) which provides address translation and access protection functionalities to

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-19 Thread Oleksandr
wspec, ids, fwspec->num_ids + num_ids); Julien, what do you think? I am happy with that. The first allocation would need a comment on top explaining the reason of the "1". Sure, will add. -- Regards, Oleksandr Tyshchenko ___ X

Re: [Xen-devel] [PATCH V4 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-19 Thread Oleksandr
On 19.09.19 15:05, Julien Grall wrote: Hi, Hi Julien. On 19/09/2019 12:58, Oleksandr wrote: On 19.09.19 14:45, Julien Grall wrote: Hi Oleksandr, Hi Julien On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory

Re: [Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-19 Thread Oleksandr
On 19.09.19 14:35, Julien Grall wrote: Hi Oleksandr, Hi, Julien. On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The main puprose of this patch is to add a way to register DT device (which is behind the IOMMU) using the generic IOMMU DT bindings [1] before

Re: [Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-19 Thread Oleksandr
or other guests will postpone an error recognition to the guest domain creation time. So, we would have non function system anyway. Wouldn't be better to fail early instead of continue and fail anyway? -- Regards, Oleksandr Tyshchenko ___ X

Re: [Xen-devel] [PATCH V4 5/8] xen/common: Introduce xrealloc_flex_struct() helper macros

2019-09-20 Thread Oleksandr
Hi Jan On 13.09.2019 17:35, Oleksandr Tyshchenko wrote: --- a/xen/include/xen/xmalloc.h +++ b/xen/include/xen/xmalloc.h @@ -35,6 +35,15 @@   #define xzalloc_array(_type, _num) \   ((_type *)_xzalloc_array(sizeof(_type), __alignof__(_type), _num))   +/* Allocate space for a structure

Re: [Xen-devel] [PATCH V4 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-20 Thread Oleksandr
On 20.09.19 03:25, Yoshihiro Shimoda wrote: Hi Oleksandr-san, Hi, Shimoda-san From: Oleksandr Tyshchenko, Sent: Saturday, September 14, 2019 12:35 AM From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory Management Unit (IOMMU) which provides address translation and

Re: [Xen-devel] [PATCH] xen/arm: iommu: Panic if not all IOMMUs are initialized

2019-09-20 Thread Oleksandr
On 20.09.19 03:31, Stefano Stabellini wrote: Hi, Stefano. On Tue, 20 Aug 2019, Oleksandr wrote: On 20.08.19 15:22, Julien Grall wrote: Hi, Julien -iommu_setup(); +rc = iommu_setup(); +if ( !iommu_enabled && rc != -ENODEV ) +panic("Couldn't confi

Re: [Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-20 Thread Oleksandr
nation, sounds reasonable. Will modify patch as you suggested. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V4 4/8] xen/common: Introduce _xrealloc function

2019-09-23 Thread Oleksandr
rlying functions */  extern void *_xmalloc(unsigned long size, unsigned long align);  extern void *_xzalloc(unsigned long size, unsigned long align); +extern void *_xrealloc(void *ptr, unsigned long size, unsigned long align);  static inline void *_xmalloc_array( unsigned long size, u

Re: [Xen-devel] [PATCH V4 4/8] xen/common: Introduce _xrealloc function

2019-09-23 Thread Oleksandr
nd as said, please clean up the code you move or add anew: Use casts only where really needed, transform types to appropriate "modern" ones, etc. ok, will double check. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH V3] xen/arm: Restrict "p2m_ipa_bits" according to the IOMMU requirements

2019-09-24 Thread Oleksandr
On 24.09.19 12:36, Julien Grall wrote: Hi, Hi, Julien On 11/09/2019 18:59, Oleksandr Tyshchenko wrote: ---   xen/arch/arm/p2m.c   | 41   xen/arch/arm/setup.c |  9 +--   xen/drivers/passthrough/arm/ipmmu

Re: [Xen-devel] [PATCH V5 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-24 Thread Oleksandr
On 24.09.19 18:57, Julien Grall wrote: Hi, Hi Julien On 9/24/19 4:30 PM, Oleksandr Tyshchenko wrote: @@ -1263,15 +1264,22 @@ static int __init handle_device(struct domain *d, struct dt_device_node *dev,   dt_dprintk("%s passthrough = %d nirq = %d naddr =

Re: [Xen-devel] [PATCH V5 3/8] xen/common: Introduce _xrealloc function

2019-09-24 Thread Oleksandr
On 24.09.19 18:51, Jan Beulich wrote: Hi, Jan On 24.09.2019 17:30, Oleksandr Tyshchenko wrote: Changes V4 -> V5: - avoid possible truncation with allocations of 4GiB or above - introduce helper functions add(strip)_padding to avoid duplicating the code - omit

Re: [Xen-devel] [PATCH V5 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-24 Thread Oleksandr
On 24.09.19 20:21, Julien Grall wrote: Hi Oleksandr, Hi Julien. [...]   int iommu_do_dt_domctl(struct xen_domctl *domctl, struct domain *d, XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)   { @@ -177,6 +241,13 @@ int iommu_do_dt_domctl(struct xen_domctl *domctl, struct domain *d

Re: [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control

2019-09-25 Thread Oleksandr
mary_switched+0xc/0x2c (XEN) (XEN) (XEN) (XEN) Panic on CPU 0: (XEN) Assertion 'unreachable' failed at ...ild-workspace/build/xen/xen/include/xen/iommu.h:72 (XEN) **** (XEN) -- Regards, Oleksandr Tyshchenko

Re: [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control

2019-09-25 Thread Oleksandr
TW, I assume disabling the iommu on the xen command like will work round the issue? No. Disabling the iommu will lead to ASSERT in all cases. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

Re: [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control

2019-09-25 Thread Oleksandr
On 25.09.19 19:10, Paul Durrant wrote: Hi Paul -Original Message- From: Oleksandr Sent: 25 September 2019 16:50 To: Paul Durrant ; 'Jan Beulich' Cc: Petre Pircalabu ; Stefano Stabellini ; Wei Liu ; KonradRzeszutek Wilk ; Andrew Cooper ; David Scott ; Tim (Xen.org) ; Geo

Re: [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control

2019-09-25 Thread Oleksandr
d", it still denies: Parsing config from /xt/dom.cfg/domd.cfg ERROR: passthrough disabled but devices are specified Looks like, correct behavior... -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control

2019-09-26 Thread Oleksandr
it will be under CONFIG_EXPERT when merged, so disabled by default). So, "iommu_enabled" can be false. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] iommu: avoid triggering ASSERT_UNREACHABLE() on ARM...

2019-09-26 Thread Oleksandr
n the IOMMU has been disabled. Signed-off-by: Paul Durrant Reported-by: Oleksandr With one NIT below: Acked-by: Julien Grall Could you, please, change to: Reported-by: Oleksandr Tyshchenko You can also add if really needed: [with IOMMU disabled on Arm] Tested-by: Oleksandr Tys

Re: [Xen-devel] [PATCH V6 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-26 Thread Oleksandr
On 26.09.19 15:22, Jan Beulich wrote: Hi, Jan On 26.09.2019 13:20, Oleksandr Tyshchenko wrote: --- a/xen/drivers/passthrough/Kconfig +++ b/xen/drivers/passthrough/Kconfig @@ -12,6 +12,19 @@ config ARM_SMMU Say Y here if your SoC includes an IOMMU device implementing the

Re: [Xen-devel] [PATCH V6 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-26 Thread Oleksandr
On 26.09.19 15:52, Julien Grall wrote: Hi, Hi Julien On 9/26/19 12:20 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The main puprose of this patch is to add a way to register DT device (which is behind the IOMMU) using the generic IOMMU DT bindings [1] before assigning

Re: [Xen-devel] [PATCH V6 3/8] xen/common: Introduce _xrealloc function

2019-09-26 Thread Oleksandr
On 26.09.19 15:19, Jan Beulich wrote: Hi, Jan On 26.09.2019 13:20, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch introduces type-unsafe function which besides re-allocation handles the following corner cases: 1. if requested size is zero, it will behave like xfree 2. if

Re: [Xen-devel] [PATCH V6 0/8] iommu/arm: Add Renesas IPMMU-VMSA support + Linux's iommu_fwspec

2019-09-26 Thread Oleksandr
On 26.09.19 17:56, Julien Grall wrote: Hi, Hi Julien On 9/26/19 12:20 PM, Oleksandr Tyshchenko wrote: Oleksandr Tyshchenko (8):    iommu/arm: Add iommu_helpers.c file to keep common for IOMMUs stuff    iommu/arm: Add ability to handle deferred probing request    xen/common: Introduce

Re: [Xen-devel] [PATCH V4] xen/arm: Restrict "p2m_ipa_bits" according to the IOMMU requirements

2019-09-27 Thread Oleksandr
On 27.09.19 13:20, Julien Grall wrote: Hi Oleksandr, Hi Julien Thank you for the respin. The code in p2m.c looks good to me know. One comment regarding the SMMU code below. On 24/09/2019 17:01, Oleksandr Tyshchenko wrote: diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers

Re: [Xen-devel] [PATCH V5] xen/arm: Restrict "p2m_ipa_bits" according to the IOMMU requirements

2019-09-27 Thread Oleksandr
On 27.09.19 15:38, Julien Grall wrote: On 27/09/2019 13:35, Julien Grall wrote: Hi, Hi Julien, On 27/09/2019 12:57, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko There is a strict requirement for the IOMMU which wants to share the P2M table with the CPU. The IOMMU's St

Re: [Xen-devel] [PATCH v5 5/8] xen/arm: assign devices to boot domains

2019-09-27 Thread Oleksandr
mmu, This will break dom0less on platform without an IOMMU because setting CDF_iommu for them will be invalid. I also don't think this is wise to always enable the IOMMU. This should only be done if there is a partial device-tree present (most likely it means passthrough will be used).

Re: [Xen-devel] [PATCH v5 5/8] xen/arm: assign devices to boot domains

2019-09-30 Thread Oleksandr
On 28.09.19 02:28, Stefano Stabellini wrote: Hi Stefano On Fri, 27 Sep 2019, Julien Grall wrote: Hi, On 27/09/2019 15:40, Oleksandr wrote: On 26.09.19 00:12, Julien Grall wrote: On 25/09/2019 19:49, Stefano Stabellini wrote: Scan the user provided dtb fragment at boot. For each device

Re: [Xen-devel] [PATCH for Xen 4.13] iommu/arm: Remove arch_iommu_populate_page_table() completely

2019-09-30 Thread Oleksandr
Hi On 30.09.19 13:44, Jürgen Groß wrote: On 30.09.19 12:34, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The Arm realization should have been removed in the following commit as redundant: f89f555 remove late (on-demand) construction of IOMMU page tables So, remove unused

Re: [Xen-devel] [PATCH V5 3/4] xen/arm: Extend SCIF early prink code to handle other interfaces

2019-05-08 Thread Oleksandr
On 07.05.19 19:02, Julien Grall wrote: Hi, Hi, Julien On 5/2/19 6:00 PM, Oleksandr Tyshchenko wrote:   docs/misc/arm/early-printk.txt    |  5 +   xen/arch/arm/Rules.mk |  7 +++   xen/arch/arm/arm32/debug-scif.inc | 17 +++--   3 files changed, 23 insertions

Re: [Xen-devel] [PATCH V5 0/4] Renesas Stout board support (R-Car Gen2)

2019-05-08 Thread Oleksandr
On 08.05.19 19:19, Julien Grall wrote: Hi Oleksandr, Hi Julien On 02/05/2019 18:00, Oleksandr Tyshchenko wrote: Oleksandr Tyshchenko (4):    xen/arm: drivers: scif: Extend driver to handle other interfaces    xen/arm: drivers: scif: Add support for SCIFA compatible UARTs I have merged

Re: [Xen-devel] [RFC PATCH 0/2] Add ability to handle nodes with interrupts-extended property

2019-05-10 Thread Oleksandr
Hello, all gentle reminder... -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH 0/2] Add ability to handle nodes with interrupts-extended property

2019-05-10 Thread Oleksandr
On 10.05.19 18:45, Julien Grall wrote: Hi, Julien On 10/05/2019 16:29, Oleksandr wrote: Hello, all gentle reminder... This is on my long queue of patches to review. Any help reviewing the on-going series will help. Oh, I see. Fair enough. Cheers, -- Regards, Oleksandr

Re: [Xen-devel] [PATCH v2 01/10] xen: add a p2mt parameter to map_mmio_regions

2019-05-15 Thread Oleksandr
regions(map->d, _gfn(s), size, _mfn(s)); if ( rc == 0 ) { diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 03/10] xen: extend XEN_DOMCTL_memory_mapping to handle memory policy

2019-05-15 Thread Oleksandr
k; +#endif +default: +return -EOPNOTSUPP; If I correctly understand the code, we can't just return an error here (domctl_lock is taken, etc). Looks like we should store an error and modify code to execute exit part. -- Regards, Oleksandr Tyshchenko ___

Re: [Xen-devel] [PATCH] xen/arm: Black list everything with a PPI

2019-05-15 Thread Oleksandr
hough R-Car H3 seems to not use PPIs for PMU, I have tested your patch just to be sure it wouldn't skip anything by a mistake) -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 0/10] iomem memory policy

2019-05-16 Thread Oleksandr
total (XEN)   Bank 0: 0x5400->0x5700   <--- linux,lossy_decompress@5400 (XEN)   Bank 1: 0x5700->0x5800   <--- linux,adsp@5700 (XEN)   Bank 2: 0x5800->0x7000   <--- linux,cma@5800 (XEN)   Bank 3: 0x7000->0x8000   <--

Re: [Xen-devel] [PATCH V5 0/4] Renesas Stout board support (R-Car Gen2)

2019-05-16 Thread Oleksandr
t Renesas Stout board is supported in Xen (of course, if using PSCI-enabled U-Boot). Next step is to update Wiki regarding Stout board. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproj

Re: [Xen-devel] [RFC PATCH 1/2] xen/device-tree: Add dt_count_phandle_with_args helper

2019-05-20 Thread Oleksandr
On 20.05.19 14:03, Julien Grall wrote: Hi, Hi, Julien On 02/05/2019 15:13, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Port Linux helper of_count_phandle_with_args for counting number of phandles in a property. Linux 5.1 uses a completely different implementation for

Re: [Xen-devel] [RFC PATCH 2/2] xen/device-tree: Add ability to handle nodes with interrupts-extended prop

2019-05-20 Thread Oleksandr
On 20.05.19 15:25, Julien Grall wrote: Hi, Hi, Julien. On 02/05/2019 15:13, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Xen expects to see "interrupts" property when parsing host device-tree. But, there are cases when some device nodes contain "interrupts-ext

Re: [Xen-devel] [RFC PATCH 2/2] xen/device-tree: Add ability to handle nodes with interrupts-extended prop

2019-05-20 Thread Oleksandr
Hi, Julien On 02/05/2019 15:13, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Xen expects to see "interrupts" property when parsing host device-tree. But, there are cases when some device nodes contain "interrupts-extended" property instead. The good

Re: [Xen-devel] [PATCH V1 2/2] xen/device-tree: Add ability to handle nodes with interrupts-extended prop

2019-05-29 Thread Oleksandr
On 29.05.19 20:44, Julien Grall wrote: Hi Oleksandr, Hi, Julien On 21/05/2019 18:37, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The "interrupts-extended" property is a special form for use when a node needs to reference multiple interrupt parents. > According

Re: [Xen-devel] [PATCH V1 2/2] xen/device-tree: Add ability to handle nodes with interrupts-extended prop

2019-06-11 Thread Oleksandr
On 10.06.19 22:45, Julien Grall wrote: Hi, Hi Julien Now applied to my staging branch. It will be committed tonight. Thank you for the patches. Thank you for the review. Cheers, -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing

[Xen-devel] [Question] Proper location for Linux error code (-EPROBE_DEFER) in Xen

2019-08-01 Thread Oleksandr
Arm specific. I was thinking to place it to xen/include/public/errno.h and guard with #ifdef __XEN__ to hide from userspace, but not sure it is a good idea, since it looks like not a POSIX one to be in that header... -- Regards, Oleksandr Tyshchenko

Re: [Xen-devel] [Question] Proper location for Linux error code (-EPROBE_DEFER) in Xen

2019-08-01 Thread Oleksandr
being probed in "any" order. So, framework (drivers/passthrough/arm/iommu.c) will be modified a bit to be able to handle -EPROBE_DEFER returning by driver. [1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg02679.html -- Regards, Oleks

Re: [Xen-devel] [Question] Proper location for Linux error code (-EPROBE_DEFER) in Xen

2019-08-01 Thread Oleksandr
On 01.08.19 17:31, Oleksandr wrote: Hello, Hi, Roger I think it would help if you describe why such error code is needed by Xen and how it would be used.  This is needed for the upcoming V2 of the IPMMU driver (ARM) [1] which may request  deferred probing (returns -EPROBE_DEFER

Re: [Xen-devel] [Question] Proper location for Linux error code (-EPROBE_DEFER) in Xen

2019-08-01 Thread Oleksandr
On 01.08.19 17:34, Jan Beulich wrote: Hi Jan On 01.08.2019 16:31, Oleksandr wrote:  This is needed for the upcoming V2 of the IPMMU driver (ARM) [1] which may request  deferred probing (returns -EPROBE_DEFER) depending on what device will be probed the first  (Root device must be

Re: [Xen-devel] [Question] Proper location for Linux error code (-EPROBE_DEFER) in Xen

2019-08-01 Thread Oleksandr
On 01.08.19 18:46, Jan Beulich wrote: On 01.08.2019 16:54, Oleksandr wrote: On 01.08.19 17:34, Jan Beulich wrote: On 01.08.2019 16:31, Oleksandr wrote:    This is needed for the upcoming V2 of the IPMMU driver (ARM) [1] which may request    deferred probing (returns -EPROBE_DEFER

Re: [Xen-devel] [ANNOUNCE] Xen 4.13 Development Update

2019-08-02 Thread Oleksandr
Hello Juergen I would like to see this in Xen 4.13: https://lists.xenproject.org/archives/html/xen-devel/2019-08/msg00253.html So, please add: === ARM === *  Renesas IPMMU-VMSA support + Linux's iommu_fwspec (V2)   -  Oleksandr Tyshchenko -- Regards, Oleksandr Tyshc

Re: [Xen-devel] [PATCH V2 0/6] iommu/arm: Add Renesas IPMMU-VMSA support + Linux's iommu_fwspec

2019-08-05 Thread Oleksandr
Hello, all. Forgot to mention that an additional patch from Xen staging is needed, otherwise Xen may crash at the early stage: ead6b9f78355e8d366e0c80c4a73fa7fbd6d26cc "xen/arm: cpuerrata: Align a virtual address before unmap" -- Regards, Oleksandr

Re: [Xen-devel] [PATCH V2 3/6] [RFC] xen/common: Introduce _xrealloc function

2019-08-06 Thread Oleksandr
for zero-size allocation [1] https://lists.xenproject.org/archives/html/xen-devel/2019-08/msg00257.html Thank you. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V2 6/6] iommu/arm: Add Renesas IPMMU-VMSA support

2019-08-07 Thread Oleksandr
Hi, Shimoda-san. Thank you for the review. From: Oleksandr Tyshchenko, Sent: Saturday, August 3, 2019 1:40 AM From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory Management Unit (IOMMU) which provides address translation and access protection functionalities to

Re: [Xen-devel] [PATCH V2 3/6] [RFC] xen/common: Introduce _xrealloc function

2019-08-07 Thread Oleksandr
Hi, Nevertheless I'd appreciate if the type-unsafe _xrealloc() didn't remain the only re-allocation construct, as to avoiding people using it just because there's no better alternative. I got your point. -- Regards, Oleks

Re: [Xen-devel] [PATCH V2 3/6] [RFC] xen/common: Introduce _xrealloc function

2019-08-07 Thread Oleksandr
existing examples in Xen? Jan -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V2 6/6] iommu/arm: Add Renesas IPMMU-VMSA support

2019-08-08 Thread Oleksandr
ght hit into this fault. In this case the page table is correct and we don't need to fix anything...   Being honest, I have never seen a fault caused by break-before-make sequence. Cheers, -- Regards, Oleksandr Tyshchenko __

Re: [Xen-devel] [PATCH V2 3/6] [RFC] xen/common: Introduce _xrealloc function

2019-08-08 Thread Oleksandr
w. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] xen/arm: Let the IOMMU be accessible by Dom0 if forcibly disabled in Xen

2019-08-08 Thread Oleksandr
On 08.08.19 14:01, Roger Pau Monné wrote: Hi, Roger. On Thu, Aug 08, 2019 at 01:53:23PM +0300, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Don't skip IOMMU nodes when creating DT for Dom0 if IOMMU has been forcibly disabled in bootargs (e.g. "iommu=0") in order t

Re: [Xen-devel] [PATCH V2 6/6] iommu/arm: Add Renesas IPMMU-VMSA support

2019-08-08 Thread Oleksandr
is pointless. We don't really expect any other operations with the domain which is being destroyed. No assign/deassign devices, no flush, no map, nothing... -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] xen/arm: Let the IOMMU be accessible by Dom0 if forcibly disabled in Xen

2019-08-08 Thread Oleksandr
Hi, Julien, Roger. On Thu, Aug 08, 2019 at 01:53:23PM +0300, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Don't skip IOMMU nodes when creating DT for Dom0 if IOMMU has been forcibly disabled in bootargs (e.g. "iommu=0") in order to let the IOMMU be accessib

Re: [Xen-devel] [PATCH] xen/arm: Let the IOMMU be accessible by Dom0 if forcibly disabled in Xen

2019-08-08 Thread Oleksandr
Hi On Thu, Aug 08, 2019 at 01:53:23PM +0300, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Don't skip IOMMU nodes when creating DT for Dom0 if IOMMU has been forcibly disabled in bootargs (e.g. "iommu=0") in order to let the IOMMU be accessible by DOM0. I d

Re: [Xen-devel] [PATCH V2 6/6] iommu/arm: Add Renesas IPMMU-VMSA support

2019-08-08 Thread Oleksandr
s revisions (ES 3.0) this driver is supposed to support only, are *not* affected by that errata. And *not* require such workaround. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V2 6/6] iommu/arm: Add Renesas IPMMU-VMSA support

2019-08-08 Thread Oleksandr
way, this should be understood why such discrepancy. I failed to find something similar in the ML. So, probably, was not submitted. Hope, we will be able to clarify a reason. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V2 1/6] iommu/arm: Add iommu_helpers.c file to keep common for IOMMUs stuff

2019-08-09 Thread Oleksandr
Hi, Julien On 02/08/2019 17:39, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Introduce a separate file to keep various helpers which could be used by more than one IOMMU driver in order not to duplicate code. The first condidates to be moved to the new file are SMMU driver&#

Re: [Xen-devel] [PATCH V2 6/6] iommu/arm: Add Renesas IPMMU-VMSA support

2019-08-09 Thread Oleksandr
Thank you for the detailed answer. I would like to say that I have never seen Multiple tlb hits error raised by IPMMU in Xen. Overall, it feels to me the TLB flush is here for a different reason. I will drop this TLB flush from interrupt handler until clarifie

Re: [Xen-devel] [PATCH V2 2/6] iommu/arm: Add ability to handle deferred probing request

2019-08-12 Thread Oleksandr
On 12.08.19 14:11, Julien Grall wrote: Hi Oleksandr, Hi, Julien On 02/08/2019 17:39, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch adds minimal required support to General IOMMU framework to be able to handle a case when IOMMU driver requesting deferred probing for

Re: [Xen-devel] [PATCH V2 2/6] iommu/arm: Add ability to handle deferred probing request

2019-08-13 Thread Oleksandr
On 12.08.19 22:46, Julien Grall wrote: Hi Oleksandr, Hi, Julien On 8/12/19 1:01 PM, Oleksandr wrote: On 12.08.19 14:11, Julien Grall wrote: On 02/08/2019 17:39, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch adds minimal required support to General IOMMU framework

Re: [Xen-devel] [PATCH V2 4/6] iommu/arm: Add lightweight iommu_fwspec support

2019-08-13 Thread Oleksandr
On 13.08.19 15:39, Julien Grall wrote: Hi Oleksandr, Hi Julien. On 8/2/19 5:39 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko We need to have some abstract way to add new device to the IOMMU based on the generic IOMMU DT binding [1] which can be used for both DT (right now

Re: [Xen-devel] [PATCH V2 5/6] iommu/arm: Introduce iommu_add_dt_device API

2019-08-13 Thread Oleksandr
On 13.08.19 16:49, Julien Grall wrote: Hi Oleksandr, Hi Julien On 8/2/19 5:39 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch adds new iommu_add_dt_device API for adding DT device to the IOMMU using generic IOMMU DT binding [1] and previously added "iommu_f

Re: [Xen-devel] [PATCH V2 4/6] iommu/arm: Add lightweight iommu_fwspec support

2019-08-13 Thread Oleksandr
On 13.08.19 18:28, Julien Grall wrote: Hi, Hi Julien On 8/13/19 4:17 PM, Oleksandr wrote: On 13.08.19 15:39, Julien Grall wrote: xfree is able to deal with NULL pointer, so the check is not necessary. Yes, the reason I left this check is to not perform an extra operation

Re: [Xen-devel] [PATCH V2 4/6] iommu/arm: Add lightweight iommu_fwspec support

2019-08-13 Thread Oleksandr
On 13.08.19 16:40, Julien Grall wrote: Hi Oleksandr, Hi Julien. One more comment :). On 8/2/19 5:39 PM, Oleksandr Tyshchenko wrote: +int iommu_fwspec_init(struct device *dev, struct device *iommu_dev) +{ +    struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); + +    if ( fwspec

Re: [Xen-devel] [PATCH V2 6/6] iommu/arm: Add Renesas IPMMU-VMSA support

2019-08-14 Thread Oleksandr
On 14.08.19 20:38, Julien Grall wrote: Hi Oleksandr, Hi Julien. On 02/08/2019 17:39, Oleksandr Tyshchenko wrote: +static int ipmmu_iommu_domain_init(struct domain *d) +{ +    struct ipmmu_vmsa_xen_domain *xen_domain; + +    xen_domain = xzalloc(struct ipmmu_vmsa_xen_domain); +    if

Re: [Xen-devel] [PATCH V2 2/6] iommu/arm: Add ability to handle deferred probing request

2019-08-15 Thread Oleksandr
return ( num_iommus > 0 ) ? 0 : -ENODEV; Cheers, -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V2 2/6] iommu/arm: Add ability to handle deferred probing request

2019-08-15 Thread Oleksandr
rt_xen(unsigned long boot_phys_offset,     setup_virt_paging();   -    iommu_setup(); +    rc = iommu_setup(); +    if ( !iommu_enabled && rc != -ENODEV ) +    panic("Couldn't configure correctly all the IOMMUs."); "\n" should be added. -- Regards, Oleksandr Tyshchenk

Re: [Xen-devel] [PATCH] xen/arm: iommu: Panic if not all IOMMUs are initialized

2019-08-20 Thread Oleksandr
On 20.08.19 15:22, Julien Grall wrote: Hi, Julien -iommu_setup(); +rc = iommu_setup(); +if ( !iommu_enabled && rc != -ENODEV ) +panic("Couldn't configure correctly all the IOMMUs."); Please add "\n" You can add: Tested-by:

Re: [Xen-devel] [PATCH] xen/arm: p2m: Free the p2m entry after flushing the IOMMU TLBs

2019-08-20 Thread Oleksandr
eallocated to Xen or another domain but still present in the IOMMU TLBs. I haven't reproduced this issue as well. So, my testing here is rather formal to be sure that patch doesn't break anything. You can add (if needed): Tested-by: Oleksandr Tyshchenko This patch o

Re: [Xen-devel] [PATCH v7 8/8] xen/arm: add reserved-memory regions to the dom0 memory node

2019-08-20 Thread Oleksandr
;name" property in /memory#1 is incorrect ("memory" instead of base node name) ERROR: Input tree has errors, aborting (use -f to force output) -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V3 3/8] xen/common: Introduce _xrealloc function

2019-08-21 Thread Oleksandr
ROUNDUP_SIZE(tmp_size); -    if ( tmp_size <= curr_size ) /* fits in current block */ -    return ptr; +    if ( tmp_size <= curr_size && ((unsigned long)ptr & (align - 1)) == 0 ) +    return ptr; /* fits in current block */ p = _xmalloc(size, alig

Re: [Xen-devel] [PATCH V3 3/8] xen/common: Introduce _xrealloc function

2019-08-21 Thread Oleksandr
id I get your point correct? Yes, with those changes I think it will look ok. Thank you. -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] [RFC] xen/arm: Restrict "pa_range" according to the IOMMU requirements

2019-08-22 Thread Oleksandr
On 22.08.19 15:46, Julien Grall wrote: Hi Oleksandr, Hi Julien. Thank you for the review. Please try to get your patch on the latest Xen before sending it. So you can get the right people CCed. For instance, Volodymyr has not been CCed as a reviewer. Ooh, next time will do. Sorry

Re: [Xen-devel] [PATCH V3 6/8] iommu: Add of_xlate callback

2019-08-27 Thread Oleksandr
Hi Jan On 20.08.2019 20:09, Oleksandr Tyshchenko wrote: --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -240,6 +240,16 @@ struct iommu_ops {   int __must_check (*iotlb_flush_all)(struct domain *d);   int (*get_reserved_device_memory)(iommu_grdm_t *, void *);   void

  1   2   3   4   5   6   7   8   9   10   >