Re: [Xen-devel] [PATCH v11.1 3/6] sysctl / libxl: report whether IOMMU/HAP page table sharing is supported

2019-09-17 Thread Julien Grall
For the common code: Acked-by: Julien Grall Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v11 4/6] remove late (on-demand) construction of IOMMU page tables

2019-09-17 Thread Julien Grall
ption mentioned above is added, it will also be zero if the per-domain IOMMU-enable flag is turned off. Signed-off-by: Paul Durrant Reviewed-by: Alexandru Isaila Acked-by: Razvan Cojocaru Reviewed-by: Jan Beulich For the small change in Arm code: Acked-by: Julien Gr

Re: [Xen-devel] [PATCH v11 5/6] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros

2019-09-17 Thread Julien Grall
line iommu options should really be hard error on ARM (as opposed to just being ignored), so define 'iommu_hap_pt_share' to be true for ARM (via ARM-selected CONFIG_IOMMU_FORCE_PT_SHARE). Signed-off-by: Paul Durrant Reviewed-by: Jan Beulich Acked-by: Julien Grall Chee

Re: [Xen-devel] [PATCH 1/5] xen/arm: optee: impose limit on shared buffer size

2019-09-17 Thread Julien Grall
Hi Volodymyr, On 9/16/19 4:26 PM, Volodymyr Babchuk wrote: Hi Julien, Julien Grall writes: Hi, On 9/12/19 8:45 PM, Volodymyr Babchuk wrote: Hi Julien, Julien Grall writes: Hi Volodymyr, On 9/11/19 7:48 PM, Volodymyr Babchuk wrote: Julien Grall writes: Hi Volodymyr, On 8/23/19 7

Re: [Xen-devel] [PATCH] xen/arm: platform: additional Raspberry Pi compatible string

2019-09-17 Thread Julien Grall
Hi Stewart, On 9/14/19 2:22 AM, Stewart Hildebrand wrote: On Friday, September 13, 2019 5:42 PM, Julien Grall wrote: Hi, On 9/13/19 8:11 PM, Stewart Hildebrand wrote: Upstream Linux kernel will use "brcm,bcm2711" as the compatible string for Raspberry Pi 4 [1]. Add this str

Re: [Xen-devel] dom/xen heap and boot allocator (WAS Re: [xen-unstable-smoke test] 141333: regressions - FAIL)

2019-09-17 Thread Julien Grall
(+ Juergen) Hi, On 9/16/19 9:51 AM, Jan Beulich wrote: On 15.09.2019 19:51, Julien Grall wrote: Hi, On 9/15/19 3:09 PM, osstest service owner wrote: flight 141333 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/141333/ Regressions :-( Tests which did not

[Xen-devel] [PATCH] xen/arm32: setup: Give a xenheap page to the boot allocator

2019-09-17 Thread Julien Grall
ak boot on Arm32. The easiest way for now is to give a xenheap page to the boot allocator. We may want to rethink the interface in the future. Fixes: 6e3e771203 ('xen/arm: setup: Relocate the Device-Tree later on in the boot') Signed-off-by: Julien Grall --- xen/arch/arm/setup.c | 8

Re: [Xen-devel] dom/xen heap and boot allocator (WAS Re: [xen-unstable-smoke test] 141333: regressions - FAIL)

2019-09-17 Thread Julien Grall
Hi Juergen, On 9/17/19 2:12 PM, Juergen Gross wrote: On 17.09.19 14:31, Julien Grall wrote: (+ Juergen) Hi, On 9/16/19 9:51 AM, Jan Beulich wrote: On 15.09.2019 19:51, Julien Grall wrote: Hi, On 9/15/19 3:09 PM, osstest service owner wrote: flight 141333 xen-unstable-smoke real [real

[Xen-devel] [[PATCH for-4.13]] xen/arm: mm: Allow generic xen page-tables helpers to be called early

2019-09-17 Thread Julien Grall
e given to the boot allocator afterwards. So we can rely on map_domain_page() for mapping page tables allocated dynamically. The helpers xen_{map, unmap}_table() are now updated to take into account the case where page-tables are part of Xen binary. Fixes: 022387ee1a ('xen/arm: mm: Don&#

Re: [Xen-devel] [PATCH v3 26/28] xen/arm64: head: Use a page mapping for the 1:1 mapping in create_page_tables()

2019-09-17 Thread Julien Grall
Hi Stefano, On 8/24/19 2:16 AM, Stefano Stabellini wrote: On Mon, 12 Aug 2019, Julien Grall wrote: lsr x2, x19, #THIRD_SHIFT /* Base address for 4K mapping */ lsl x2, x2, #THIRD_SHIFT @@ -674,21 +591,80 @@ create_page_tables: cmp x1, #(LPAE_ENTRIES<

[Xen-devel] [PATCH v4 1/8] xen/arm64: head: Remove 1:1 mapping as soon as it is not used

2019-09-17 Thread Julien Grall
tlb.h with a twist. Per D5-2530 ARM DDI 0487D.a, a dsb nsh is sufficient for local flush. This part of the Arm Arm was missed while reworking the header and therefore a more conservative way were adopted. Signed-off-by: Julien Grall --- It is very likely we will need to re-introduce th

[Xen-devel] [PATCH v4 0/8] xen/arm: Rework head.S to make it more compliant with the Arm Arm

2019-09-17 Thread Julien Grall
series. The boot code would also benefits another proof read for missing isb()/dsb(). For convenience I provided a branch based on staging: git://xenbits.xen.org/people/julieng/xen-unstable.git branch boot/v3 Cheers, Julien Grall (8): xen/arm64: head: Remove 1:1 mapping as soon as it is not

[Xen-devel] [PATCH v4 2/8] xen/arm64: head: Rework and document setup_fixmap()

2019-09-17 Thread Julien Grall
. Thus, the fixmap table will need to be always hooked before any use. Let's start doing it now in setup_fixmap(). Lastly, document the behavior and the main registers usage within the function. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini --- Changes in v3: - Fix ty

[Xen-devel] [PATCH v4 6/8] xen/arm64: head: Use a page mapping for the 1:1 mapping in create_page_tables()

2019-09-17 Thread Julien Grall
ry to pre-allocate a page for the 3rd level table. Signed-off-by: Julien Grall --- Changes in v4: - Don't pre-link the page-tables for the 1:1 mapping. Instead only link what's necessary. Changes in v3: - Patch added --- xen/arch/arm/arm

[Xen-devel] [PATCH v4 8/8] xen/arm32: head: Use a page mapping for the 1:1 mapping in create_page_tables()

2019-09-17 Thread Julien Grall
ry to pre-allocate a page for the 3rd level table. Signed-off-by: Julien Grall --- Changes in v4: - Use XEN_{FIRST, SECOND}_SLOT rather than hardcoded value - Don't pre-link the page-tables for the 1:1 mapping Changes in v3: - Patch added --- xen/arch/arm/ar

[Xen-devel] [PATCH v4 3/8] xen/arm32: head: Remove 1:1 mapping as soon as it is not used

2019-09-17 Thread Julien Grall
ssed while reworking the header and therefore a more conservative way were adopted. Signed-off-by: Julien Grall --- It is very likely we will need to re-introduce the 1:1 mapping to cater secondary CPUs boot and suspend/resume. For now, the attempt is to make boot CPU path fully Arm Arm

[Xen-devel] [PATCH v4 7/8] xen/arm32: head: Introduce macros to create table and mapping entry

2019-09-17 Thread Julien Grall
create_page_tables() will be replaced in a follow-up patch. Signed-off-by: Julien Grall --- The adr_l hack is a bit ugly, but I can't find nicer way to avoid code duplication and improve readability. Changes in v4: - Fix typo - s/tlb/ptlb/ in create_mapping_entry

[Xen-devel] [PATCH v4 5/8] xen/arm64: head: Introduce macros to create table and mapping entry

2019-09-17 Thread Julien Grall
to work independently of the state of the MMU. Lastly, take the opportunity to replace open-coded version in setup_fixmap() by the two new macros. The ones in create_page_tables() will be replaced in a follow-up patch. Signed-off-by: Julien Grall --- Changes in v4: - Fix typo

[Xen-devel] [PATCH v4 4/8] xen/arm32: head: Rework and document setup_fixmap()

2019-09-17 Thread Julien Grall
. Thus, the fixmap table will need to be always hooked beofre any use. Let's start doing it now in setup_fixmap(). Lastly, document the behavior and the main registers usage within the function. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Changes in v3:

Re: [Xen-devel] [PATCH 1/5] xen/arm: optee: impose limit on shared buffer size

2019-09-17 Thread Julien Grall
Hi, On 9/17/19 1:28 PM, Volodymyr Babchuk wrote: Hi Julien, Julien Grall writes: Hi Volodymyr, On 9/16/19 4:26 PM, Volodymyr Babchuk wrote: Hi Julien, Julien Grall writes: Hi, On 9/12/19 8:45 PM, Volodymyr Babchuk wrote: Hi Julien, Julien Grall writes: Hi Volodymyr, On 9/11/19

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-18 Thread Julien Grall
ntainers.pl -d . Note that you would need the patch [1] in order to get the script working. Cheers, [1] https://lists.xenproject.org/archives/html/xen-devel/2019-09/msg01139.html -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.o

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-18 Thread Julien Grall
Hi Ian, On 18/09/2019 11:41, Ian Jackson wrote: Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely identify .rodata sections"): On 18/09/2019 10:52, Wieczorkiewicz, Pawel wrote: $ scripts/./add_maintainers.pl -d ~/git/livepatch-build-tools '-d' only

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-18 Thread Julien Grall
Hi Pawel, On 18/09/2019 11:44, Wieczorkiewicz, Pawel wrote: On 18. Sep 2019, at 12:41, Ian Jackson wrote: Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely identify .rodata sections"): On 18/09/2019 10:52, Wieczorkiewicz, Pawel wrote: $ scripts/./add_maintai

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-18 Thread Julien Grall
On 18/09/2019 12:27, Wieczorkiewicz, Pawel wrote: On 18. Sep 2019, at 13:19, Julien Grall wrote: Hi Pawel, On 18/09/2019 11:44, Wieczorkiewicz, Pawel wrote: On 18. Sep 2019, at 12:41, Ian Jackson wrote: Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely ide

[Xen-devel] [PATCH for-4.13] xen/arm: livepatch: Prevent CPUs to fetch stale instructions after livepatching

2019-09-18 Thread Julien Grall
, flushing the instruction cache is not enough to ensure new instructions are seen. All the PEs should also do an isb() to synchronize the fetched instruction stream. Signed-off-by: Julien Grall --- xen/arch/arm/livepatch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xe

Re: [Xen-devel] [PATCH v7 0/5] TEE mediator (and OP-TEE) support in XEN

2019-09-18 Thread Julien Grall
deletions(-) -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2] print: introduce a format specifier for pci_sbdf_t

2019-09-19 Thread Julien Grall
ed-off-by: Roger Pau Monné For the common code: Acked-by: Julien Grall Cheers, --- Changes since v1: - Use base 8 to print the function number. - Sort the addition in the pointer function alphabetically. --- docs/misc/printk-formats.txt| 5 + xen/arch/x86/hvm/vmsi.c

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-19 Thread Julien Grall
Hi Lars, On 18/09/2019 12:50, Lars Kurth wrote: On 18/09/2019, 11:44, "Wieczorkiewicz, Pawel" wrote: > On 18. Sep 2019, at 12:41, Ian Jackson wrote: > > Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely identify .rodata sections&

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-19 Thread Julien Grall
Hi Lars, On 18/09/2019 13:14, Lars Kurth wrote: On 18/09/2019, 12:15, "Julien Grall" wrote: Hi Ian, On 18/09/2019 11:41, Ian Jackson wrote: > Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely identify .rodata sections"):

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

2019-09-19 Thread Julien Grall
struct list_head domain_list; struct device dev; With the two above addressed and pending the patch it depends on [1] is acked: Reviewed-by: Julien Grall Cheers, [1] https://lists.xenproject.org/archives/html/xen-devel/2019-08/msg01924.html --

Re: [Xen-devel] [PATCH V4 3/8] iommu/arm: Order the headers alphabetically in iommu.c

2019-09-19 Thread Julien Grall
Hi Oleksandr, On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Clean up the code a bit by putting the headers in alphabetical order. Signed-off-by: Oleksandr Tyshchenko Acked-by: Julien Grall And committed. Cheers, --- xen/drivers/passthrough/arm/iommu.c

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

2019-09-19 Thread Julien Grall
Another solution would to use xmalloc_bytes() for the initial allocation of xmalloc_bytes(). Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-09-19 Thread Julien Grall
is really driver depended thing. Please note, all IOMMU drivers which support generic IOMMU DT bindings should use "dt_xlate" and "add_device" callbacks. [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/iommu/iommu.txt Signed-off-by: Oleksandr Tyshchenko CC: Julien

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

2019-09-19 Thread Julien Grall
he same): fwspec = xrealloc_flex_struct(fwspec, 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". Cheers, -- Julien Grall ___ X

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

2019-09-19 Thread Julien Grall
river instance. So, driver uses global list to keep track of registered IPMMU devices. Signed-off-by: Oleksandr Tyshchenko CC: Julien Grall CC: Yoshihiro Shimoda The Xen specific bits looks good now. Assuming Yoshihiro will give his reviewed-by/acked-by: Acked-by: Julien Grall Cheers, -- J

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

2019-09-19 Thread Julien Grall
Hi, 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 Management Unit (IOMMU) which provides address

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

2019-09-19 Thread Julien Grall
Hi, On 19/09/2019 13:25, Oleksandr wrote: On 19.09.19 14:35, Julien Grall wrote: Hi Oleksandr, 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

Re: [Xen-devel] [PATCH] xen/arm32: setup: Give a xenheap page to the boot allocator

2019-09-20 Thread Julien Grall
Hi Stefano, On 20/09/2019 09:48, Jan Beulich wrote: On 20.09.2019 00:49, Stefano Stabellini wrote: On Tue, 17 Sep 2019, Julien Grall wrote: @@ -665,6 +666,11 @@ static void __init setup_mm(void) setup_xenheap_mappings((e >> PAGE_SHIFT) - xenheap_pages, xenheap_pages); +

[Xen-devel] [PATCH for-4.13 v2] xen/arm32: setup: Give a xenheap page to the boot allocator

2019-09-20 Thread Julien Grall
ak boot on Arm32. The easiest way for now is to give a xenheap page to the boot allocator. We may want to rethink the interface in the future. Fixes: 6e3e771203 ('xen/arm: setup: Relocate the Device-Tree later on in the boot') Signed-off-by: Julien Grall Reviewed-by: Jan Beulich -

Re: [Xen-devel] [[PATCH for-4.13]] xen/arm: mm: Allow generic xen page-tables helpers to be called early

2019-09-20 Thread Julien Grall
Hi, On 20/09/2019 00:37, Stefano Stabellini wrote: On Tue, 17 Sep 2019, Julien Grall wrote: The current implementations of xen_{map, unmap}_table() expect {map, unmap}_domain_page() to be usable. Those helpers are used to map/unmap page tables while update Xen page-tables. Since commit

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

2019-09-20 Thread Julien Grall
On 19/09/2019 14:26, Oleksandr wrote: On 19.09.19 15:29, Julien Grall wrote: Hi, Hi, Julien Hi, + +int __init iommu_add_dt_device(struct dt_device_node *np) Sorry to only realise it now. Would it make sense to have this function implemented in xen/passthrough/device_tree.c? Not

Re: [Xen-devel] [[PATCH for-4.13]] xen/arm: mm: Allow generic xen page-tables helpers to be called early

2019-09-20 Thread Julien Grall
Hi, On 20/09/2019 16:16, Stefano Stabellini wrote: On Fri, 20 Sep 2019, Julien Grall wrote: On 20/09/2019 00:37, Stefano Stabellini wrote: On Tue, 17 Sep 2019, Julien Grall wrote: The current implementations of xen_{map, unmap}_table() expect {map, unmap}_domain_page() to be usable. Those

[Xen-devel] [PATCH for-4.13] xen/arm: mm: Clear boot pagetables before bringing-up each secondary CPU

2019-09-21 Thread Julien Grall
-by: Julien Grall --- xen/arch/arm/mm.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 1129dc28c8..e14ee76ff8 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -704,8 +704,20 @@ void __init

[Xen-devel] [RESEND][PATCH for-4.13] xen/arm: mm: Clear boot pagetables before bringing-up each secondary CPU

2019-09-21 Thread Julien Grall
-by: Julien Grall --- xen/arch/arm/mm.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 1129dc28c8..e14ee76ff8 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -704,8 +704,20 @@ void __init

Re: [Xen-devel] [PATCH for-4.13] xen/arm: mm: Clear boot pagetables before bringing-up each secondary CPU

2019-09-21 Thread Julien Grall
Hi, I forgot to call scripts/add_maintainers.pl on this patch. I have just resent it. Sorry for the noise. Cheers, On 9/21/19 11:07 AM, Julien Grall wrote: At the moment, boot pagetables are only cleared once at boot. This means when booting CPU2 (and onwards) then boot pagetables will not

Re: [Xen-devel] [PATCH v2 1/6] xen/arm: optee: impose limit on shared buffer size

2019-09-23 Thread Julien Grall
BUG_ON(PAGE_SIZE != 4096); page = get_domain_ram_page(gaddr_to_gfn(guest_data->pages_list[idx])); if ( !page ) Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 2/6] xen/arm: optee: check for preemption while freeing shared buffers

2019-09-23 Thread Julien Grall
Hi Volodymyr, On 18/09/2019 19:50, Volodymyr Babchuk wrote: We can check for hypercall_preempt_check() in the loop inside optee_relinquish_resources() to increase hypervisor responsiveness in case if preemption is required. Signed-off-by: Volodymyr Babchuk Acked-by: Julien Grall Cheers

Re: [Xen-devel] [PATCH v2 3/6] xen/arm: optee: limit number of shared buffers

2019-09-23 Thread Julien Grall
dymyr Babchuk Acked-by: Julien Grall Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 4/6] xen/arm: optee: handle shared buffer translation error

2019-09-23 Thread Julien Grall
hy you chose that over the 3 solutions I suggested? Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 6/6] xen/arm: optee: update description in Kconfig

2019-09-23 Thread Julien Grall
is should not be used in production. We also have SUPPORT.MD describing the state of the feature. So I would drop completely the last sentence and potentially gate OPTEE with "EXPERT" as well. Note that the last bits is optional. Cheers, -- Julien Grall _

Re: [Xen-devel] [PATCH v2 5/6] SUPPORT.md: Describe OP-TEE mediator

2019-09-23 Thread Julien Grall
Hi, On 18/09/2019 19:51, Volodymyr Babchuk wrote: With the latest patches to the mediator, it can be considered as Technological Preview feature. Signed-off-by: Volodymyr Babchuk With one change below: Acked-by: Julien Grall --- Note for commiter: Obviously this patch should be merged

Re: [Xen-devel] [PATCH v2 0/6] arch/arm: optee: fix TODOs and change status to "Tech Preview"

2019-09-23 Thread Julien Grall
buffers xen/arm: optee: limit number of shared buffers I have committed patch 1-3. Cheers, -- Julien Grall ___ 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 Julien Grall
Hi, On 24/09/2019 10:55, Oleksandr wrote: On 24.09.19 12:36, Julien Grall wrote: The rest of the code looks good to me. Shall the non-RFC patch be split into "adding possibility to restrict" and "restrict by the IOMMU drivers"? The patch is fine as it is. No n

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

2019-09-24 Thread Julien Grall
able to support %⁻bit IPA at the moment.\n" The rest of the code looks good to me. Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH for-4.13] xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate

2019-09-24 Thread Julien Grall
d for Cortex-A76 erratum 1165522", so it is only necessary to plumb in the cpuerrata framework. Signed-off-by: Julien Grall --- docs/misc/arm/silicon-errata.txt | 2 ++ xen/arch/arm/cpuerrata.c | 10 ++ 2 files changed, 12 insertions(+) diff --git a/docs/misc/arm/silicon-er

Re: [Xen-devel] [PATCH v2 4/6] xen/arm: optee: handle shared buffer translation error

2019-09-24 Thread Julien Grall
On 24/09/2019 12:37, Volodymyr Babchuk wrote: Hi Julien, Julien Grall writes: Hi, On 18/09/2019 19:51, Volodymyr Babchuk wrote: +/* Handles return from Xen-issued RPC */ +static void handle_xen_rpc_return(struct optee_domain *ctx, + struct cpu_user_regs

Re: [Xen-devel] [PATCH v2 4/6] xen/arm: optee: handle shared buffer translation error

2019-09-24 Thread Julien Grall
On 24/09/2019 14:30, Volodymyr Babchuk wrote: Julien Grall writes: On 24/09/2019 12:37, Volodymyr Babchuk wrote: Hi Julien, Julien Grall writes: Hi, On 18/09/2019 19:51, Volodymyr Babchuk wrote: +/* Handles return from Xen-issued RPC */ +static void handle_xen_rpc_return(struct

Re: [Xen-devel] [PATCH for-4.13] xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate

2019-09-24 Thread Julien Grall
Hi Volodymyr, On 24/09/2019 15:06, Volodymyr Babchuk wrote: Julien Grall writes: Both Cortex-A57 (erratum 1319537) and Cortex-A72 (erratum 1319367) can end with corrupt TLBs if they speculate an AT instruction while S1/S2 system registers in inconsistent state. The workaround is the same

[Xen-devel] [PATCH for-4.13 v2 1/2] xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate

2019-09-24 Thread Julien Grall
d for Cortex-A76 erratum 1165522", so it is only necessary to plumb in the cpuerrata framework. Signed-off-by: Julien Grall --- Changes in v2: - Add missing | --- docs/misc/arm/silicon-errata.txt | 2 ++ xen/arch/arm/cpuerrata.c | 10 ++ 2 files changed, 12

[Xen-devel] [PATCH for-4.13 v2 0/2] Errata implementation and doc update

2019-09-24 Thread Julien Grall
Hi all, The two patches are not related but the second one dependends on the first one. So I decided to merge them together. Cheers, Julien Grall (2): xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate docs: Replace all instance of ARM by Arm SUPPORT.md

[Xen-devel] [PATCH for-4.13 v2 2/2] docs: Replace all instance of ARM by Arm

2019-09-24 Thread Julien Grall
The documentation is using a mix of ARM (old) and Arm (new). To stay consistent, use only the new name. Signed-off-by: Julien Grall --- Cc: jgr...@suse.com Changes in v2: - Patch added --- SUPPORT.md | 50 +++--- docs/INDEX

Re: [Xen-devel] [PATCH for-4.13 v2 2/2] docs: Replace all instance of ARM by Arm

2019-09-24 Thread Julien Grall
Hi, On 9/24/19 3:56 PM, Volodymyr Babchuk wrote: Julien Grall writes: The documentation is using a mix of ARM (old) and Arm (new). To stay consistent, use only the new name. Honestly, this rename confuses me. I think, this commit is the good place to clarify a couple of questions. It did

Re: [Xen-devel] [PATCH for-4.13 v2 2/2] docs: Replace all instance of ARM by Arm

2019-09-24 Thread Julien Grall
On 9/24/19 4:37 PM, Volodymyr Babchuk wrote: Julien Grall writes: Hi, On 9/24/19 3:56 PM, Volodymyr Babchuk wrote: Julien Grall writes: The documentation is using a mix of ARM (old) and Arm (new). To stay consistent, use only the new name. Honestly, this rename confuses me. I think

Re: [Xen-devel] [PATCH V5 6/8] iommu: Order the headers alphabetically in device_tree.c

2019-09-24 Thread Julien Grall
Hi, On 9/24/19 4:30 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Clean up the code a bit by putting the headers in alphabetical order. Signed-off-by: Oleksandr Tyshchenko Acked-by: Julien Grall Cheers, --- xen/drivers/passthrough/device_tree.c | 6 +++--- 1 file

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

2019-09-24 Thread Julien Grall
73065118e "Linux 5.3-rc8" Subsequent patches will use of that support. [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/iommu/iommu.txt Signed-off-by: Oleksandr Tyshchenko Acked-by: Julien Grall Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-09-24 Thread Julien Grall
u_add_dt_device(dev); Same here. +if ( !dt_device_is_protected(dev) ) +{ +ret = -EINVAL; +break; +} This is already checked in iommu_assign_dt_device(). Cheers, -- Julien Grall ___ Xen-devel m

Re: [Xen-devel] [PATCH v3 1/3] xen/arm: optee: handle shared buffer translation error

2019-09-24 Thread Julien Grall
future to preempt mediator during translation large (>512 pages) shared buffers. Signed-off-by: Volodymyr Babchuk Acked-by: Julien Grall Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenprojec

Re: [Xen-devel] [PATCH v3 3/3] xen/arm: optee: update description in Kconfig

2019-09-24 Thread Julien Grall
Hi, On 9/24/19 4:46 PM, Volodymyr Babchuk wrote: OP-TEE mediator now is "Tech Preview" state, and we want to update it's description in Kconfig accordingly. Signed-off-by: Volodymyr Babchuk Acked-by: Julien Grall Cheers, --- Note to commiter: this patch depends on fir

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

2019-09-24 Thread Julien Grall
Hi Stefano, On 9/24/19 5:52 PM, Stefano Stabellini wrote: On Wed, 11 Sep 2019, Julien Grall wrote: It also raises the question what should we do if the size passed in not page-aligned? Shall we just blindly round up/down? Should we warn? This was not important for dom0, but is potentially

[Xen-devel] [PATCH for-4.13] xen: sched: Fix Arm build after commit f855dd9625

2019-09-24 Thread Julien Grall
dd minimalistic idle scheduler for free cpus') Signed-off-by: Julien Grall --- xen/common/xmalloc_tlsf.c | 5 - xen/include/xen/config.h | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/xmalloc_tlsf.c b/xen/common/xmalloc_tlsf.c index e98ad65455..1e8d72d

[Xen-devel] [RESEND][PATCH for-4.13] xen: sched: Fix Arm build after commit f855dd9625

2019-09-24 Thread Julien Grall
dd minimalistic idle scheduler for free cpus') Signed-off-by: Julien Grall --- xen/common/xmalloc_tlsf.c | 5 - xen/include/xen/config.h | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/xmalloc_tlsf.c b/xen/common/xmalloc_tlsf.c index e98ad65455..1e8d72d

Re: [Xen-devel] [PATCH for-4.13] xen: sched: Fix Arm build after commit f855dd9625

2019-09-24 Thread Julien Grall
Hi, I forgot to CC the maintainers on it :/. Please ignore this e-mail. Sorry for the noise. Cheers, On 9/24/19 6:17 PM, Julien Grall wrote: Commit f855dd9625 "sched: add minimalistic idle scheduler for free cpus" introduce the use of ZERO_BLOCK_PTR in the scheduler code. However,

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

2019-09-24 Thread Julien Grall
Hi Oleksandr, On 9/24/19 5:22 PM, Oleksandr wrote: 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(&qu

Re: [Xen-devel] [RESEND][PATCH for-4.13] xen: sched: Fix Arm build after commit f855dd9625

2019-09-24 Thread Julien Grall
Hi all, On 9/24/19 6:17 PM, Julien Grall wrote: Commit f855dd9625 "sched: add minimalistic idle scheduler for free cpus" introduce the use of ZERO_BLOCK_PTR in the scheduler code. However, the define does not exist outside of xmalloc_tsf.c for non-x86 architecture. This will r

Re: [Xen-devel] [PATCH v4 7/8] xen/arm: introduce nr_spis

2019-09-25 Thread Julien Grall
Hi, On 24/09/2019 18:56, Stefano Stabellini wrote: On Wed, 11 Sep 2019, Julien Grall wrote: Hi Stefano, On 8/21/19 4:53 AM, Stefano Stabellini wrote: We don't have a clear way to know how many virtual SPIs we need for the dom0-less domains. Introduce a new option under xen,domain to sp

Re: [Xen-devel] [PATCH v4 8/8] xen/arm: add dom0-less device assignment info to docs

2019-09-25 Thread Julien Grall
On 24/09/2019 19:07, Stefano Stabellini wrote: On Wed, 11 Sep 2019, Julien Grall wrote: On 8/21/19 4:53 AM, Stefano Stabellini wrote: I can replace 0xX by X for #address-cells and #size-cells everywhere in the example. I don't think it makes sense to do it for reg and interrupts prope

Re: [Xen-devel] [PATCH v4 4/8] xen/arm: copy dtb fragment to guest dtb

2019-09-25 Thread Julien Grall
On 24/09/2019 22:06, Stefano Stabellini wrote: On Wed, 11 Sep 2019, Julien Grall wrote: On 8/21/19 4:53 AM, Stefano Stabellini wrote: Signed-off-by: Stefano Stabellini Changes in v4: - use recursion in the implementation - rename handle_properties to handle_prop_pfdt - rename

Re: [Xen-devel] [PATCH v3 0/3] arch/arm: optee: fix TODOs and change status to "Tech Preview"

2019-09-25 Thread Julien Grall
Describe OP-TEE mediator xen/arm: optee: update description in Kconfig The series is now merged. Thank you for the contribution! Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] dom0less + sched=null => broken in staging

2019-09-25 Thread Julien Grall
atch as soon as I find time. Just wanted to follow-up on this. Do you have an update for the fix? I would rather not want to see Xen 4.13 released with this. So I have CCed Juergen to mark it as a blocker. Cheers, -- Julien Grall ___ Xen-devel mailing

Re: [Xen-devel] [[PATCH for-4.13]] xen/arm: mm: Allow generic xen page-tables helpers to be called early

2019-09-25 Thread Julien Grall
Hi, I am CCing Juergen to mark this as a blocker for 4.13. Without this patch, Xen cannot be booted using GRUB. Cheers, On 17/09/2019 17:02, Julien Grall wrote: The current implementations of xen_{map, unmap}_table() expect {map, unmap}_domain_page() to be usable. Those helpers are used to

Re: [Xen-devel] dom0less + sched=null => broken in staging

2019-09-25 Thread Julien Grall
Hi, On 25/09/2019 16:34, Dario Faggioli wrote: On Wed, 2019-09-25 at 16:19 +0100, Julien Grall wrote: (+Juergen) Hi Dario, Hi, On 11/09/2019 14:53, Dario Faggioli wrote: On Fri, 2019-08-23 at 18:16 -0700, Stefano Stabellini wrote: Ok, thanks again for testing, and good to know. I&#

Re: [Xen-devel] [PATCH v4 7/8] xen/arm: introduce nr_spis

2019-09-25 Thread Julien Grall
Hi, On 25/09/2019 17:16, Stefano Stabellini wrote: On Wed, 25 Sep 2019, Julien Grall wrote: Hi, On 24/09/2019 18:56, Stefano Stabellini wrote: On Wed, 11 Sep 2019, Julien Grall wrote: Hi Stefano, On 8/21/19 4:53 AM, Stefano Stabellini wrote: We don't have a clear way to know how

Re: [Xen-devel] [PATCH v5 2/8] xen/arm: export device_tree_get_reg and device_tree_get_u32

2019-09-25 Thread Julien Grall
Hi, On 25/09/2019 19:49, Stefano Stabellini wrote: > They'll be used in later patches. > > Signed-off-by: Stefano Stabellini Acked-by: Julien Grall Cheers, > > --- > Changes in v5: > - move declarations to xen/include/asm-arm/setup.h > > Changes in v4: >

Re: [Xen-devel] [PATCH v5 3/8] xen/arm: introduce kinfo->guest_phandle_gic

2019-09-25 Thread Julien Grall
nel.h > +++ b/xen/include/asm-arm/kernel.h > @@ -36,6 +36,9 @@ struct kernel_info { > /* Enable pl011 emulation */ > bool vpl011; > > +/* GIC phandle */ > +uint32_t guest_phandle_gic; This would also allow to drop the guest_ prefix. > + > /* lo

Re: [Xen-devel] [PATCH v5 4/8] xen/arm: copy dtb fragment to guest dtb

2019-09-25 Thread Julien Grall
t; goto err; > I would add a comment here mentioning that the code below always need to be called before the rest of the DT is generated. This is because you depend on the value of the field guest_phandle_gic. > +if ( kinfo->dtb_bootmodule ) > +{ > +ret = domain_handle_dtb_bootmodule(d, kinfo); > +if ( ret ) > +return ret; > +} > + > ret = make_gic_domU_node(kinfo); > if ( ret ) > goto err; > diff --git a/xen/include/asm-arm/kernel.h b/xen/include/asm-arm/kernel.h > index 760434369b..7f5e659561 100644 > --- a/xen/include/asm-arm/kernel.h > +++ b/xen/include/asm-arm/kernel.h > @@ -28,7 +28,7 @@ struct kernel_info { > paddr_t gnttab_size; > > /* boot blob load addresses */ > -const struct bootmodule *kernel_bootmodule, *initrd_bootmodule; > +const struct bootmodule *kernel_bootmodule, *initrd_bootmodule, > *dtb_bootmodule; > const char* cmdline; > paddr_t dtb_paddr; > paddr_t initrd_paddr; > Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-09-25 Thread Julien Grall
FDT_ERR_NOTFOUND => There is no more properties for this node */ > @@ -2254,7 +2346,8 @@ void __init create_domUs(void) > struct xen_domctl_createdomain d_cfg = { > .arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE, > .arch.nr_spis = 0, > -.flags = XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap, > +.flags = XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap | > + XEN_DOMCTL_CDF_iommu, 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). > .max_evtchn_port = -1, > .max_grant_frames = 64, > .max_maptrack_frames = 1024, > Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v5 7/8] xen/arm: introduce nr_spis

2019-09-25 Thread Julien Grall
+d_cfg.arch.nr_spis = MAX(d_cfg.arch.nr_spis, > + GUEST_VPL011_SPI - 32 + 1); > +} > + > d = domain_create(++max_init_domid, &d_cfg, false); > if ( IS_ERR(d) ) > panic("Error creating domain %s\n", dt_node_name(node)); > Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v5 8/8] xen/arm: add dom0-less device assignment info to docs

2019-09-25 Thread Julien Grall
is > +used. This is not correct anymore when vpl011 is set. With that fixed: Acked-by: Julien Grall https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v4 3/8] xen/arm32: head: Remove 1:1 mapping as soon as it is not used

2019-09-25 Thread Julien Grall
Hi, On 25/09/2019 21:33, Stefano Stabellini wrote: > On Tue, 17 Sep 2019, Julien Grall wrote: >> The 1:1 mapping may clash with other parts of the Xen virtual memory >> layout. At the moment, Xen is handling the clash by only creating a >> mapping to the runtime virtual ad

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

2019-09-25 Thread Julien Grall
Wilk ; Andrew Cooper >> ; David Scott ; Tim (Xen.org) >> ; George Dunlap >> ; Tamas K Lengyel ; Ian >> Jackson >> ; Anthony Perard ; >> xen-devel@lists.xenproject.org; >> Volodymyr Babchuk ; Roger Pau Monne >> ; Julien Grall >> >> Sub

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

2019-09-26 Thread Julien Grall
Hi, On 9/26/19 9:39 AM, Paul Durrant wrote: -Original Message- From: Julien Grall Sent: 25 September 2019 22:34 To: Paul Durrant ; 'Oleksandr' ; 'Jan Beulich' Cc: nd ; Petre Pircalabu ; Stefano Stabellini ; Wei Liu ; KonradRzeszutek Wilk ; Andrew Cooper ; David

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

2019-09-26 Thread Julien Grall
when this will happen. Anyway, I will have a look at your next patch :). Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API

2019-09-26 Thread Julien Grall
DMA will not be coherent for the grant-table. Oleksandr, do you know why they can't be coherent? Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH 00/84] Remove direct map from Xen

2019-09-26 Thread Julien Grall
t map, so reviews and further testing are more than welcome. Do you have a branch with this series applied? Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH 58/84] x86/mm: fix leaks in map_xen_pagetable.

2019-09-26 Thread Julien Grall
iomem *ioremap(paddr_t, size_t); static inline void iounmap(void __iomem *va) Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH 68/84] page_alloc: actually do the mapping and unmapping on xenheap.

2019-09-26 Thread Julien Grall
nt_info &= ~PGC_xen_heap; +ASSERT((unsigned long)v >= DIRECTMAP_VIRT_START); +map_pages_to_xen((unsigned long)v, INVALID_MFN, 1UL << order, _PAGE_NONE); + free_heap_pages(pg, order, true); } Cheers, -- Julien Grall _

Re: [Xen-devel] [RFC PATCH 69/84] page_alloc: comments on (un)mapping pages in xenheap allocations.

2019-09-26 Thread Julien Grall
Hi, On 9/26/19 10:46 AM, hong...@amazon.com wrote: From: Hongyan Xia This patch should be squashed in the previous patch (#68). This would also help review as it give more insight of why you need to map/unmap. Cheers, -- Julien Grall ___ Xen

Re: [Xen-devel] [RFC PATCH 68/84] page_alloc: actually do the mapping and unmapping on xenheap.

2019-09-26 Thread Julien Grall
Hi, On 9/26/19 11:39 AM, Julien Grall wrote: Hi, NIT Title: Please remove full stop. On 9/26/19 10:46 AM, hong...@amazon.com wrote: From: Hongyan Xia Please provide a description of what/why you are doing this in the commit message. Also, IIRC, x86 always have !CONFIG_SEPARATE_XENHEAP

Re: [Xen-devel] [RFC PATCH 71/84] x86/setup: start tearing down the direct map.

2019-09-26 Thread Julien Grall
-return page_to_virt(pg); +return ret; This change looks spurious. Did you intend to do it in a previous patch? Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH 73/84] x86/mm: Move vmap_to_mfn() to mm.c and rename to virt_to_mfn_walk().

2019-09-26 Thread Julien Grall
id __iomem *ioremap(paddr_t, size_t); static inline void iounmap(void __iomem *va) Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

<    1   2   3   4   5   6   7   8   9   10   >