Re: [Xen-devel] [PATCH v3 04/17] SUPPORT.md: Add core ARM features

2017-11-23 Thread Julien Grall
Deegan CC: Julien Grall --- SUPPORT.md | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/SUPPORT.md b/SUPPORT.md index a4cf2da50d..5945ab4926 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -22,6 +22,14 @@ for the definitions of the support status levels

Re: [Xen-devel] [PATCH v3 06/17] SUPPORT.md: Add scalability features

2017-11-23 Thread Julien Grall
: Julien Grall For the ARM bits: Acked-by: Julien Grall Cheers, --- SUPPORT.md | 27 +++ 1 file changed, 27 insertions(+) diff --git a/SUPPORT.md b/SUPPORT.md index df429cb3c4..dd3632b913 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -196,6 +196,33 @@ on embedded platforms

Re: [Xen-devel] [PATCH v3 09/17] SUPPORT.md: Add ARM-specific virtual hardware

2017-11-23 Thread Julien Grall
Deegan CC: Julien Grall --- SUPPORT.md | 21 + 1 file changed, 21 insertions(+) diff --git a/SUPPORT.md b/SUPPORT.md index 98ed18098a..f357291e4e 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -408,6 +408,27 @@ Virtual Performance Management Unit for HVM guests Disabled

Re: [Xen-devel] [PATCH v3 04/17] SUPPORT.md: Add core ARM features

2017-11-23 Thread Julien Grall
On 23/11/17 11:13, George Dunlap wrote: On 11/23/2017 11:11 AM, Julien Grall wrote: The rest looks good. Thanks. With that moved, can it have your Ack? Sure Acked-by: Julien Grall Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel

[Xen-devel] Xen 4.10 RC6

2017-11-23 Thread Julien Grall
://downloads.xenproject.org/release/xen/4.10.0-rc6/xen-4.10.0-rc6.tar.gz.sig Please send bug reports and test reports to xen-devel@lists.xenproject.org. When sending bug reports, please CC relevant maintainers and me (julien.gr...@linaro.org). Thanks, -- Julien Grall

[Xen-devel] [PATCH for-next 11/16] xen/arm: p2m: Rename p2m_flush_tlb and p2m_flush_tlb_sync

2017-11-23 Thread Julien Grall
to shared with. For p2m_flush_tlb_sync, the 'force' was added because the TLBs are flush unconditionally. A follow-up patch will add an helper to flush TLBs only in certain cases. Signed-off-by: Julien Grall --- xen/arch/arm/p2m.c | 18 +- 1 file changed, 9 insertions(+), 9

[Xen-devel] [PATCH for-next 05/16] xen/arm: guest_copy: Extend the prototype to pass the vCPU

2017-11-23 Thread Julien Grall
Currently, guest_copy assumes the copy will only be done for the current vCPU. A follow-up patch will require to use a different vCPU. So extend the prototype to pass the vCPU. Signed-off-by: Julien Grall --- xen/arch/arm/guestcopy.c | 13 +++-- 1 file changed, 7 insertions(+), 6

[Xen-devel] [PATCH for-next 13/16] xen/arm: p2m: Fold p2m_tlb_flush into p2m_force_tlb_flush_sync

2017-11-23 Thread Julien Grall
flushing and avoid misusage in the P2M code. So update p2m_alloc_table to use p2m_force_tlb_flush_sync and fold p2m_tlb_flush in p2m_force_tlb_flush_sync. Signed-off-by: Julien Grall --- xen/arch/arm/p2m.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git

[Xen-devel] [PATCH for-next 06/16] xen/arm: Extend copy_to_guest to support copying from/to guest physical address

2017-11-23 Thread Julien Grall
: Julien Grall --- xen/arch/arm/guestcopy.c | 86 ++-- 1 file changed, 39 insertions(+), 47 deletions(-) diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c index 487f5ab82d..be53bee559 100644 --- a/xen/arch/arm/guestcopy.c +++ b/xen/arch/arm

[Xen-devel] [PATCH for-next 03/16] xen/arm: Extend copy_to_guest to support copying from guest VA and use it

2017-11-23 Thread Julien Grall
the direction of the copy. Lastly, reimplement raw_copy_from_guest using copy_to_guest. Signed-off-by: Julien Grall --- xen/arch/arm/guestcopy.c | 46 +- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/xen/arch/arm/guestcopy.c b/xen

[Xen-devel] [PATCH for-next 02/16] xen/arm: raw_copy_to_guest_helper: Rework the prototype and rename it

2017-11-23 Thread Julien Grall
. Signed-off-by: Julien Grall --- xen/arch/arm/guestcopy.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c index 2620e659b4..d1cfbe922c 100644 --- a/xen/arch/arm/guestcopy.c +++ b/xen/arch/arm/guestcopy.c

[Xen-devel] [PATCH for-next 01/16] xen/arm: raw_copy_to_guest_helper: Rename flush_dcache to flags

2017-11-23 Thread Julien Grall
In a follow-up patch, it will be necessary to pass more flags to the function. Rename flush_dcache to flags and introduce a define to tell whether the cache needs to be flushed after the copy. Signed-off-by: Julien Grall --- xen/arch/arm/guestcopy.c | 8 +--- 1 file changed, 5 insertions

[Xen-devel] [PATCH for-next 09/16] xen/arm: domain_build: Rework initrd_load to use the generic copy helper

2017-11-23 Thread Julien Grall
logic in page-tables (such support for Populate On Demand). The new copy_to_guest_phys_flush_dcache could be used here by temporarily mapping the full initrd in the virtual space. Signed-off-by: Julien Grall --- xen/arch/arm/domain_build.c | 31 --- 1 file changed, 8

[Xen-devel] [PATCH for-next 10/16] xen/arm: domain_build: Use copy_to_guest_phys_flush_dcache in dtb_load

2017-11-23 Thread Julien Grall
. Signed-off-by: Julien Grall --- xen/arch/arm/domain_build.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 42c2e16ef6..9245753a6b 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm

[Xen-devel] [PATCH for-next 12/16] xen/arm: p2m: Introduce p2m_tlb_flush_sync, export it and use it

2017-11-23 Thread Julien Grall
Multiple places in the code requires to flush the TLBs wonly when p2m->need_flush is set. Rather than open-coding it, introduce a new helper p2m_tlb_flush_sync to do it. Note that p2m_tlb_flush_sync is exported as it might be used by other part of Xen. Signed-off-by: Julien Grall --- xen/a

[Xen-devel] [PATCH for-next 07/16] xen/arm: Introduce copy_to_guest_phys_flush_dcache

2017-11-23 Thread Julien Grall
This new function will be used in a follow-up patch to copy data to the guest using the IPA (aka guest physical address) and then clean the cache. Signed-off-by: Julien Grall --- xen/arch/arm/guestcopy.c | 10 ++ xen/include/asm-arm/guest_access.h | 6 ++ 2 files changed

[Xen-devel] [PATCH for-next 00/16] xen/arm: Stage-2 handling cleanup

2017-11-23 Thread Julien Grall
Hi all, This patch series is a collection of cleanup around stage-2 handling. They are consolidating different pieces of the hypervisor. This will make easier to maintain and update stage-2 change in the future. Cheers, Julien Grall (16): xen/arm: raw_copy_to_guest_helper: Rename flush_dcache

[Xen-devel] [PATCH for-next 15/16] xen/arm: traps: Move the definition of mmio_info_t in try_handle_mmio

2017-11-23 Thread Julien Grall
mmio_info_t is currently filled by do_trap_data_guest_abort but only important when emulation an MMIO region. A follow-up patch will merge stage-2 prefetch abort and stage-2 data abort in a single helper. To prepare that, mmio_info_t is now filled by try_handle_mmio. Signed-off-by: Julien Grall

[Xen-devel] [PATCH for-next 04/16] xen/arm: Extend copy_to_guest to support zeroing guest VA and use it

2017-11-23 Thread Julien Grall
The function copy_to_guest can easily be extended to support zeroing guest VA. To avoid using a new bit, it is considered that a NULL buffer (i.e buf == NULL) means the guest memory will be zeroed. Lastly, reimplement raw_clear_guest using copy_to_guest. Signed-off-by: Julien Grall --- xen

[Xen-devel] [PATCH for-next 08/16] xen/arm: kernel: Rework kernel_zimage_load to use the generic copy helper

2017-11-23 Thread Julien Grall
logic in page-tables (such support for Populate On Demand). The new copy_to_guest_phys_flush_dcache could be used here by temporarily mapping the full kernel in the virtual space. Signed-off-by: Julien Grall --- xen/arch/arm/domain_build.c | 1 + xen/arch/arm/kernel.c | 33

[Xen-devel] [PATCH for-next 16/16] xen/arm: traps: Merge do_trap_instr_abort_guest and do_trap_data_abort_guest

2017-11-23 Thread Julien Grall
maintain stage-2 abort handling. So consolidate the two helpers in a new helper do_trap_stage2_abort. Signed-off-by: Julien Grall --- xen/arch/arm/traps.c | 133 --- 1 file changed, 41 insertions(+), 92 deletions(-) diff --git a/xen/arch/arm

[Xen-devel] [PATCH for-next 14/16] xen/arm: traps: Remove the field gva from mmio_info_t

2017-11-23 Thread Julien Grall
mmio_info_t is used to gather information in order do emulation a region. Guest virtual address is unlikely to be a useful information and not currently used. So remove the field gva from mmio_info_t and replace by a local variable. Signed-off-by: Julien Grall --- xen/arch/arm/traps.c

Re: [Xen-devel] [PATCH for-next 07/16] xen/arm: Introduce copy_to_guest_phys_flush_dcache

2017-11-23 Thread Julien Grall
Hi Andrew, On 23/11/17 18:49, Andrew Cooper wrote: On 23/11/17 18:32, Julien Grall wrote: This new function will be used in a follow-up patch to copy data to the guest using the IPA (aka guest physical address) and then clean the cache. Signed-off-by: Julien Grall --- xen/arch/arm

Re: [Xen-devel] [PATCH 2/3 v3] xen: Add support for initializing 16550 UART using ACPI

2017-11-24 Thread Julien Grall
that table. Just wondering what the Moonshot gives you in this table? Is it "7"? What is the point to use the baud rate from the table? It should have been configured by the firmware and there are no point for the driver to reconfigure it. It will likely make it worst as AFAICT we

Re: [Xen-devel] [PATCH 1/3 v3] xen: Refactor 16550 UART code

2017-11-24 Thread Julien Grall
patches. CC: Andrew Cooper CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Tim Deegan CC: Wei Liu CC: Julien Grall xen/drivers/char/ns16550.c | 53 ++ 1 file changed, 40 insertions(+), 13

Re: [Xen-devel] [PATCH 2/3 v3] xen: Add support for initializing 16550 UART using ACPI

2017-11-24 Thread Julien Grall
- aligned some assignment statements - some coding style changes CC: Andrew Cooper CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Tim Deegan CC: Wei Liu CC: Julien Grall xen/drivers/char/ns16550.c | 67

Re: [Xen-devel] [PATCH 3/3 v3] xen: Fix 16550 UART console for HP Moonshot (Aarch64) platform

2017-11-27 Thread Julien Grall
roblem here is the firmware table does not describe correctly the hardware. I have CCed Graeme which might be able to confirm. Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [BUG] win2008 guest cannot get ip through sriov

2017-11-27 Thread Julien Grall
-acked-by: Julien Grall Note that I think we would need to update xen also to point to the commit with this backport included. Confirmed Xen 4.10 RC5 cleans away this issue. Thank you for the testing! Cheers, -- Julien Grall ___ Xen-devel mailing

Re: [Xen-devel] [PATCH 0/3] XENMEM_add_to_physmap handling adjustments

2017-11-27 Thread Julien Grall
mprovement to code quality. 1: x86: replace bad ASSERT() in xenmem_add_to_physmap_one() 2: x86: check paging mode earlier in xenmem_add_to_physmap_one() 3: improve XENMEM_add_to_physmap_batch address checking Signed-off-by: Jan Beulich Release-acked-by: Julien Gral

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

2017-11-27 Thread Julien Grall
Hi Sameer, On 22/11/17 02:17, Goel, Sameer wrote: On 11/20/2017 7:25 AM, Julien Grall wrote: On 19/11/17 07:45, Goel, Sameer wrote: On 10/12/2017 10:36 AM, Julien Grall wrote: Please use #if 0 rather than removing the code + comment on top. But I am not sure why you drop the S2 free code

Re: [Xen-devel] [PATCH] arm64: ITS: fix cacheability adjustment

2017-11-28 Thread Julien Grall
you please test this patch and confirm that it works? Also how does the bug manifest for you? Julien, Stefano: Are there any objections against taking this patch for > 4.10? This was introduced with the ITS emulation. Reviewed-by: Julien Grall This is new code and in technical preview. S

Re: [Xen-devel] [PATCH] xen/arm: domain_builder: irq sanity check logic fix

2017-11-28 Thread Julien Grall
Hi Stewart, On 11/28/2017 02:42 PM, Stewart Hildebrand wrote: It's not possible for an irq to be both below 16 and greater/equal than 32. Also fix the reference to linux documentation while we're at it. Signed-off-by: Stewart Hildebrand Whoops. Well spotted! Reviewed-by: Ju

[Xen-devel] Commit moratorium for branching Xen 4.10

2017-11-28 Thread Julien Grall
Hi all, Xen tree is going to branch at RC7. I don't want to branch when master != staging, so please avoid committing new patches to staging now to let master catch up with staging. Another announcement will be made when the moratorium is lifted. Cheers, _

[Xen-devel] [PATCH] Use non-debug build for Xen 4.10

2017-11-29 Thread Julien Grall
Modify Config.mk and Kconfig.debug to disable debug by default in preparation for late RCs and eventual release. Signed-off-by: Julien Grall --- I would like this to get included before branching. So we can cut the RC right after branching. --- tools/Rules.mk| 2 +- xen/Kconfig.debug | 2

Re: [Xen-devel] [PATCH] xen/arm: domain_builder: irq sanity check logic fix

2017-11-29 Thread Julien Grall
On 11/28/2017 07:03 PM, Julien Grall wrote: Hi Stewart, Hi, On 11/28/2017 02:42 PM, Stewart Hildebrand wrote: It's not possible for an irq to be both below 16 and greater/equal than 32. Also fix the reference to linux documentation while we're at it. Signed-off-by: Stewart

Re: [Xen-devel] [PATCH] migration, xen: Fix block image lock issue on live migration

2017-11-29 Thread Julien Grall
+ Stefano On 11/27/2017 03:00 PM, Anthony PERARD wrote: Hi Julien, Hi Anthony, Can I get a release-ack for this patch? This fix local live migration of HVM guest when the disk backend is qdisk. osstest doesn't report a regression because the kernel or the glibc is just a bit too old. Wh

Re: [Xen-devel] [PATCH] Use non-debug build for Xen 4.10

2017-11-29 Thread Julien Grall
Hi Jan, On 11/29/2017 01:29 PM, Jan Beulich wrote: On 29.11.17 at 13:09, wrote: Modify Config.mk and Kconfig.debug to disable debug by default in preparation for late RCs and eventual release. Signed-off-by: Julien Grall --- I would like this to get included before branching. So we can

[Xen-devel] [PATCH] arm64/xen: Add missing #address-cells and #size-cells properties

2017-11-29 Thread Julien Grall
they are never set by GRUB and will result to later failure when the device-tree is generated by GRUB or contain different values. To prevent this failure, create the both properties in the chosen nodes. Signed-off-by: Julien Grall --- grub-core/loader/arm64/xen_boot.c | 11 +++ 1 f

[Xen-devel] [PATCH] xen/arm: Surround HSR_SYSREG macro value with ()

2017-11-29 Thread Julien Grall
The value of the macro HCR_SYSREG is not surrounded by (). This means the behavior may change depend on how it is used. Thanksfully recent GCC will issue a warning for that. Signed-off-by: Julien Grall --- I am not aware of any "bad" usage today in Xen. This was found whilst pl

[Xen-devel] [PATCH] xen/arm: bootfdt: Use proper default for #address-cells and #size-cells

2017-11-29 Thread Julien Grall
Per the device-tree specific [1], when the property #address-cells and #size-cells are not present, the default value should be resp. 1 and 2. [1] https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdf Signed-off-by: Julien Grall --- This was discovered

Re: [Xen-devel] [PATCH] arm64/xen: Add missing #address-cells and #size-cells properties

2017-11-30 Thread Julien Grall
Hi Daniel, On 30/11/17 13:06, Daniel Kiper wrote: On Wed, Nov 29, 2017 at 05:08:12PM +, Julien Grall wrote: The properties #address-cells and #size-cells are used to know the number of cells for ranges provided by "regs". If they don't exist, the value are resp. 2 and 1.

Re: [Xen-devel] [PATCH] arm64/xen: Add missing #address-cells and #size-cells properties

2017-11-30 Thread Julien Grall
On 30 November 2017 at 21:22, Daniel Kiper wrote: > On Thu, Nov 30, 2017 at 01:22:37PM +0000, Julien Grall wrote: >> Hi Daniel, >> >> On 30/11/17 13:06, Daniel Kiper wrote: >> >On Wed, Nov 29, 2017 at 05:08:12PM +, Julien Grall wrote: >> >>The pro

Re: [Xen-devel] Commit moratorium for branching Xen 4.10

2017-12-01 Thread Julien Grall
Hi, On 01/12/17 15:23, Ian Jackson wrote: Julien Grall writes ("Commit moratorium for branching Xen 4.10"): Xen tree is going to branch at RC7. I don't want to branch when master != staging, so please avoid committing new patches to staging now to let master catch up with s

Re: [Xen-devel] [PATCH v2] x86/hvm: fix interaction between internal and external emulation

2017-12-01 Thread Julien Grall
Hmm, I notice Paul didn't Cc you on this one - despite it getting late, this is still something to be considered for 4.10. It's certainly going to be a backporting candidate. Release-acked-by: Julien Grall Could this be committed today? Cheers, -- Ju

Re: [Xen-devel] [PATCH v2 for-4.10] x86: Avoid corruption on migrate for vcpus using CPUID Faulting

2017-12-01 Thread Julien Grall
Reviewed-by: Jan Beulich I thought that was already clear from the second paragraph. Either way, how about this? Yes, I like this new version better. Thanks. Release-acked-by: Julien Grall Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel

Re: [Xen-devel] [PATCH] migration, xen: Fix block image lock issue on live migration

2017-12-01 Thread Julien Grall
Hi Anthony, On 29/11/17 15:06, Anthony PERARD wrote: On Wed, Nov 29, 2017 at 12:28:39PM +, Julien Grall wrote: + Stefano On 11/27/2017 03:00 PM, Anthony PERARD wrote: Hi Julien, Hi Anthony, Can I get a release-ack for this patch? This fix local live migration of HVM guest when the

[Xen-devel] Xen 4.10 RC7

2017-12-02 Thread Julien Grall
Hi all, Xen 4.10 RC7 is tagged. You can check that out from xen.git: git://xenbits.xen.org/xen.git 4.10.0-rc7 For your convenience, there is also a tarball at: https://downloads.xenproject.org/release/xen/4.10.0-rc7/xen-4.10.0-rc7.tar.gz And the signature is at: https://downloads.xenproject.o

Re: [Xen-devel] [PATCH v2 01/17] xen: x86: expose SGX to HVM domain in CPU featureset

2017-12-04 Thread Julien Grall
, AVX512VBMI, AVX512_4VNNIW, AVX512_4FMAPS, AVX512_VPOPCNTDQ], + +# SGX Launch Control depends on SGX +SGX: [SGX_LC], } deep_features = tuple(sorted(deps.keys())) -- Julien Grall ___ Xen-devel mailing list Xen

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
addr_t)get_user_reg(regs, 1) << 32 | +get_user_reg(regs, 2); + +/* + * Command buffer should start at page boundary. + * This is OP-TEE ABI requirement. + */ +if ( cmd_gaddr & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1) ) +return false; + +cmd_

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
er way. Julien has objections against get_page() as I can see. If you saw my objection about get_page(), you also saw my suggestions on how to do proper pinning in Xen. Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
On 04/12/17 16:24, Volodymyr Babchuk wrote: On Mon, Dec 04, 2017 at 02:30:32PM +, Julien Grall wrote: On 01/12/17 22:58, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: = Page pinning = Guest pages passed to OP-TEE need to be pinned (otherwise Xen doesn&#

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-05 Thread Julien Grall
Hi, On 04/12/17 22:04, Stefano Stabellini wrote: On Mon, 4 Dec 2017, Volodymyr Babchuk wrote: Hi Julien, On Mon, Dec 04, 2017 at 04:27:14PM +, Julien Grall wrote: [...] = Error checking / DOS protection = We need powerful checks on arguments passed by the caller and evaluated by the

Re: [Xen-devel] [RFC PATCH 13/31] xen/arm: Add driver_data field to struct device

2017-12-05 Thread Julien Grall
On 09/11/17 17:10, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Please explain the rationale behind adding a new field in struct device. Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall --- xen/include/asm-arm/device.h | 1 + 1 file changed, 1

Re: [Xen-devel] [RFC v3 2/4] xen/linux_compat: Add a Linux compat header

2017-12-05 Thread Julien Grall
I think this is the right time to think about a common helpers. This will avoid duplication and make easier port. However, I don't agree with all the wrappers set in this file. I will comment on the patch. Cheers, [1] https://lists.xenproject.org/archives/html/xen-devel/2017-11/msg006

[Xen-devel] Xen 4.10 RC8

2017-12-05 Thread Julien Grall
Hi all, Xen 4.10 RC8 is tagged. You can check that out from xen.git: git://xenbits.xen.org/xen.git 4.10.0-rc8 For your convenience, there is also a tarball at: https://downloads.xenproject.org/release/xen/4.10.0-rc8/xen-4.10.0-rc8.tar.gz And the signature is at: https://downloads.xenproject.o

Re: [Xen-devel] [RFC v3 2/4] xen/linux_compat: Add a Linux compat header

2017-12-05 Thread Julien Grall
(NOW() + MICROSECS(i)) +#define ktime_compare(t,i) (NOW() > (i)) + +#endif /* __XEN_LINUX_COMPAT_H__ */ Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2017-12-05 Thread Julien Grall
m_smmu_assign_dev, + .reassign_device = arm_smmu_reassign_dev, + .map_page = arm_smmu_map_page, + .unmap_page = arm_smmu_unmap_page, +}; + +static +struct arm_smmu_device *arm_smmu_get_by_fwnode(struct fwnode_handle *fwnode) +{ + struct arm_smmu_device *smmu = NULL; + + spin_lock(&arm_smmu_devices_lock); + list_for_each_entry(smmu, &arm_smmu_devices, devices) { + if (smmu->dev->fwnode == fwnode) + break; + } + spin_unlock(&arm_smmu_devices_lock); + + return smmu; +} + +static __init int arm_smmu_dt_init(struct dt_device_node *dev, + const void *data) +{ + int rc; + + /* +* Even if the device can't be initialized, we don't want to +* give the SMMU device to dom0. +*/ + dt_device_set_used_by(dev, DOMID_XEN); + + rc = arm_smmu_device_probe(dt_to_dev(dev)); + if (rc) + return rc; + + iommu_set_ops(&arm_smmu_iommu_ops); + + return 0; +} + +DT_DEVICE_START(smmuv3, "ARM SMMU V3", DEVICE_IOMMU) + .dt_match = arm_smmu_of_match, + .init = arm_smmu_dt_init, +DT_DEVICE_END + +#ifdef CONFIG_ACPI +/* Set up the IOMMU */ +static int __init arm_smmu_acpi_init(const void *data) +{ + int rc; + rc = arm_smmu_device_probe((struct device *)data); + + if (rc) + return rc; + + iommu_set_ops(&arm_smmu_iommu_ops); + return 0; +} + +ACPI_DEVICE_START(asmmuv3, "ARM SMMU V3", DEVICE_IOMMU) + .class_type = ACPI_IORT_NODE_SMMU_V3, + .init = arm_smmu_acpi_init, +ACPI_DEVICE_END + +#endif 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 16/31] arm: add SMC wrapper that is compatible with SMCCC

2017-12-05 Thread Julien Grall
Stabellini CC: Julien Grall This patch was sent by Volodymyr a month ago (see [2]) and I had comments on it. I would appreciate if you address them. Cheers, [2] https://lists.xenproject.org/archives/html/xen-devel/2017-10/msg01881.html --- xen/arch/arm/arm32/Makefile | 1 + xe

[Xen-devel] [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH

2017-12-05 Thread Julien Grall
ists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] linux-arm-xen branch, commit access, etc.

2017-12-05 Thread Julien Grall
Hi, Ping? This is going to be very helpful for bringing up osstest on Thunder-X. Cheers, On 02/11/17 13:34, Julien Grall wrote: Hi, On 23/10/17 22:33, Stefano Stabellini wrote: On Fri, 20 Oct 2017, Julien Grall wrote:    Julien, do you think we need to keep a special linux tree around

Re: [Xen-devel] [RFC PATCH 16/31] arm: add SMC wrapper that is compatible with SMCCC

2017-12-05 Thread Julien Grall
On 05/12/17 17:08, Volodymyr Babchuk wrote: Hi Julien, On 05.12.17 16:58, Julien Grall wrote: Hi Oleksandr, On 09/11/17 17:10, Oleksandr Tyshchenko wrote: From: Volodymyr Babchuk Existing SMC wrapper call_smc() allows only 4 parameters and returns only one value. This is enough for

Re: [Xen-devel] linux-arm-xen branch, commit access, etc.

2017-12-05 Thread Julien Grall
We'll initialize /arm/linux.git based on the current linux-arm-xen branch. /arm/linux.git will replace linux-arm-xen in OSSTest. Let me know when you've populated it and I'll change osstest. The tree has been populated based on Stefano&

Re: [Xen-devel] [OSSTEST PATCH] linux-arm-xen: Get from shared arm/linux.git xenbits tree

2017-12-05 Thread Julien Grall
Hi Ian, On 05/12/17 18:28, Ian Jackson wrote: This drops the dependency on Stefano's personal git tree. The osstest output branch remains unmoved. CC: Stefano Stabellini CC: Julien Grall Signed-off-by: Ian Jackson Acked-by: Julien Grall Cheers, --- ap-common | 4 ++-- 1

[Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-05 Thread Julien Grall
if the S/W are expected to be used. Again, a command line option could be introduced here. Any feedbacks on the approach will be welcomed. Cheers, [1] https://lists.xenproject.org/archives/html/xen-devel/2017-09/msg03191.html -- Julien Grall __

Re: [Xen-devel] [OSSTEST PATCH] linux-arm-xen: Get from shared arm/linux.git xenbits tree

2017-12-05 Thread Julien Grall
Hi Ian, On 05/12/17 18:41, Ian Jackson wrote: Stefano Stabellini writes ("Re: [OSSTEST PATCH] linux-arm-xen: Get from shared arm/linux.git xenbits tree"): On Tue, 5 Dec 2017, Julien Grall wrote: Acked-by: Julien Grall Acked-by: Stefano Stabellini Thanks. This queued f

Re: [Xen-devel] [OSSTEST PATCH] Revert "make-flight etc.: drop arm64"

2017-12-05 Thread Julien Grall
On 05/12/17 18:59, Ian Jackson wrote: We have the laxtons back and they seem to be working. Finally! This reverts commit 329ef52c9866b2a8608a598836b7d5813de1e979. > Signed-off-by: Ian Jackson FWIW: Acked-by: Julien Grall Cheers, --- make-flight | 2 +- make-hosts-fli

Re: [Xen-devel] [RFC PATCH 22/31] xen/arm: Add Xen changes to SCPI protocol

2017-12-05 Thread Julien Grall
mailbox before probing it. Include "wrappers.h" which contains all required things the direct ported code relies on. Signed-off-by: Oleksandr Tyshchenko CC: Stefano Stabellini CC: Julien Grall As far as drivers ported from Linux go, this looks pretty clean in terms of changes and

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-05 Thread Julien Grall
On 05/12/2017 22:35, Stefano Stabellini wrote: On Tue, 5 Dec 2017, Julien Grall wrote: Hi all, Even though it is an Arm failure, I have CCed x86 folks to get feedback on the approach. I have a WIP branch I could share if that interest people. Few months ago, we noticed an heisenbug on jobs

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Julien Grall
Hi Jan, I guess I have been CCed because you would like this patch is fixing the regression you mentioned on IRC? Cheers, On 12/05/2017 04:13 PM, Jan Beulich wrote: vio->mmio_retry is being set when a repeated string insn is being split up. In that case we'll exit to the guest, expecting imm

Re: [Xen-devel] [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH

2017-12-06 Thread Julien Grall
Hi Juergen, On 12/05/2017 04:19 PM, Juergen Gross wrote: On 05/12/17 16:23, Julien Grall wrote: Hi Juergen, On 04/12/17 15:49, Juergen Gross wrote: On 21/11/17 12:06, Juergen Gross wrote: The "special pages" for PVH guests include the frames for console and Xenstore ring buffers.

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

2017-12-06 Thread Julien Grall
On 12/05/2017 11:26 PM, Goel, Sameer wrote: On 12/5/2017 7:17 AM, Julien Grall wrote: Hello, On 05/12/17 03:59, Sameer Goel wrote: This driver follows an approach similar to smmu driver. The intent here is to reuse as much Linux code as possible. - Glue code has been introduced in headers

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

2017-12-06 Thread Julien Grall
Hi Sameer, On 12/05/2017 11:26 PM, Goel, Sameer wrote: On 12/5/2017 7:17 AM, Julien Grall wrote: On 05/12/17 03:59, Sameer Goel wrote: + * tables are shared + */ + +    cfg->vmid    = vmid; +    cfg->vttbr    = page_to_maddr(cfg->domain->arch.p2m.root); + 

Re: [Xen-devel] [xen-unstable test] 116178: regressions - FAIL

2017-12-06 Thread Julien Grall
On 11/15/2017 04:46 PM, Julien Grall wrote: > Hi, > > On 11/15/2017 11:29 AM, osstest service owner wrote: >> flight 116178 xen-unstable real [real] >> http://logs.test-lab.xenproject.org/osstest/logs/116178/ >> >> Regressions :-( >> >> Tests which d

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Julien Grall
reverting the offending patch in Xen 4.10 be solution? -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH

2017-12-06 Thread Julien Grall
Hi, On 12/06/2017 11:47 AM, Roger Pau Monné wrote: On Wed, Dec 06, 2017 at 12:22:00PM +0100, Juergen Gross wrote: On 06/12/17 10:53, Julien Grall wrote: Hi Juergen, On 12/05/2017 04:19 PM, Juergen Gross wrote: On 05/12/17 16:23, Julien Grall wrote: Hi Juergen, On 04/12/17 15:49, Juergen

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
t think it would be difficult to add that support for Arm as well. Also, at the moment, PoD code is nearly a verbatim copy of the x86 version. And this is only because the interface with the rest p2m code. I am planning to discuss on the ML the possibility to share the PoD code. -- Julien Grall

Re: [Xen-devel] [PATCH for-next 06/16] xen/arm: Extend copy_to_guest to support copying from/to guest physical address

2017-12-06 Thread Julien Grall
Hi Stefano, On 12/06/2017 01:22 AM, Stefano Stabellini wrote: On Thu, 23 Nov 2017, Julien Grall wrote: The only differences between copy_to_guest and access_guest_memory_by_ipa are: - The latter does not support copying data crossing page boundary - The former is copying from/to

Re: [Xen-devel] [PATCH for-next 07/16] xen/arm: Introduce copy_to_guest_phys_flush_dcache

2017-12-06 Thread Julien Grall
Hi Stefano, On 12/06/2017 01:26 AM, Stefano Stabellini wrote: On Thu, 23 Nov 2017, Julien Grall wrote: Hi Andrew, On 23/11/17 18:49, Andrew Cooper wrote: On 23/11/17 18:32, Julien Grall wrote: This new function will be used in a follow-up patch to copy data to the guest using the IPA (aka

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
Hi George, On 12/06/2017 12:28 PM, George Dunlap wrote: On 12/05/2017 06:39 PM, Julien Grall wrote: Hi all, Even though it is an Arm failure, I have CCed x86 folks to get feedback on the approach. I have a WIP branch I could share if that interest people. Few months ago, we noticed an

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
On 12/06/2017 12:58 PM, Julien Grall wrote: Hi George, On 12/06/2017 12:28 PM, George Dunlap wrote: On 12/05/2017 06:39 PM, Julien Grall wrote: Hi all, Even though it is an Arm failure, I have CCed x86 folks to get feedback on the approach. I have a WIP branch I could share if that

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Julien Grall
Hi Jan, On 12/06/2017 12:58 PM, Jan Beulich wrote: On 06.12.17 at 12:47, wrote: On 12/06/2017 11:45 AM, Jan Beulich wrote: On 06.12.17 at 10:47, wrote: I guess I have been CCed because you would like this patch is fixing the regression you mentioned on IRC? Yes, but first of all we need t

[Xen-devel] [PATCH] xen/arm: gic-v3: Bail out if gicv3_cpu_init fail

2017-12-06 Thread Julien Grall
From: Julien Grall When system registers are not enabled, all the access to them will trap in EL2. In Xen, system registers will be enabled by gicv3_cpu_init only on success. As the rest of the code (e.g gicv3_hyp_init) relies on system register, it is better to bail out directly. This will

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
a very long time (Linux timeout during CPU bring). Yikes. Since you mention 'based on the KVM one' - did they solve this particular problem or do they also have the same issue? KVM is using populate on demand by default. Cheers, -- Ju

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
On 12/06/2017 03:24 PM, George Dunlap wrote: On 12/06/2017 03:19 PM, Julien Grall wrote: Hi Konrad, On 12/06/2017 03:10 PM, Konrad Rzeszutek Wilk wrote: .snip.. The suggested policy is based on the KVM one: - If we trap a S/W instructions, we enable VM trapping (e.g HCR_EL2.TVM) to

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Julien Grall
Hi Andrew, On 12/06/2017 03:08 PM, Andrew Cooper wrote: On 06/12/17 13:04, Julien Grall wrote: Hi Jan, On 12/06/2017 12:58 PM, Jan Beulich wrote: On 06.12.17 at 12:47, wrote: On 12/06/2017 11:45 AM, Jan Beulich wrote: On 06.12.17 at 10:47, wrote: I guess I have been CCed because you

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
support 4TB is not decided, but I think 512MB should be. Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-06 Thread Julien Grall
rn to Xen/OS? Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-06 Thread Julien Grall
Hi, Answering to myself. On 12/04/2017 02:30 PM, Julien Grall wrote: On 01/12/17 22:58, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: = Xen command forwarding = In the code below, it looks like Xen is forwarding everything to OP-TEE. Are there some commands Xen

Re: [Xen-devel] [PATCH v2 06/13] iommu: Add extra use_iommu argument to iommu_domain_init()

2017-12-06 Thread Julien Grall
ml/xen-devel/2017-05/msg01737.html -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC] arm: Handle SiP Service Calls

2017-12-07 Thread Julien Grall
recognize that on yours? Now the next question, is it safe to let the hardware domain to access all SiP service? Can you explain the kind of service present in SiP for your platform? Cheers, -- Julien Grall ___ Xen-devel mailing list X

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-07 Thread Julien Grall
in virtualization context. The difficulty is clearly spell out in the Arm Arm. So the main goal here is to workaround those software. On 06/12/17 17:49, George Dunlap wrote: On 12/06/2017 12:58 PM, Julien Grall wrote: Hi George, On 12/06/2017 12:28 PM, George Dunlap wrote: On 12/05/2017 06

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-07 Thread Julien Grall
e that region on a guest access. Getting back to the hypercall case, I am still trying to figure out if we need to clean & invalidate the buffer used when the guest entry is "misconfigured". I can't convince myself why this would not be necessary. I need to have a more tho

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-07 Thread Julien Grall
Hi Jan, On 07/12/17 15:45, Jan Beulich wrote: On 07.12.17 at 15:53, wrote: On 07/12/17 13:52, Julien Grall wrote: There is exactly one case where set/way makes sense, and that's when you're the only CPU left in the system, your MMU is off, and you're about to go down. With th

[Xen-devel] [PATCH] xen/arm64: head.S: Introduce macro to load the physical address of a symbol

2017-12-07 Thread Julien Grall
of comments associated to the code changed have been removed because the code is now self-explanatory. Signed-off-by: Julien Grall --- xen/arch/arm/arm64/head.S | 48 --- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/xen/arch/arm/arm64

[Xen-devel] [PATCH] xen/arm: Remove unused fixmap slots

2017-12-07 Thread Julien Grall
There are quite a few fixmap slots that have not been used for a while. Remove them. Signed-off-by: Julien Grall --- xen/include/asm-arm/config.h | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index

Re: [Xen-devel] [PATCH for-next 16/16] xen/arm: traps: Merge do_trap_instr_abort_guest and do_trap_data_abort_guest

2017-12-07 Thread Julien Grall
Hi Stefano, On 7 December 2017 at 22:43, Stefano Stabellini wrote: > On Thu, 23 Nov 2017, Julien Grall wrote: >> @@ -2039,10 +1982,11 @@ static void do_trap_data_abort_guest(struct >> cpu_user_regs *regs, >> case FSC_FLT_PERM: >> { >>

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-08 Thread Julien Grall
On 08/12/17 08:03, Tim Deegan wrote: Hi, Hi Tim, Somehow your e-mail was marked as spam by gmail. At 12:58 + on 06 Dec (1512565090), Julien Grall wrote: On 12/06/2017 12:28 PM, George Dunlap wrote: 2. It sounds like rather than using PoD, you could use the "misconfigured p2m

[Xen-devel] linux-xen-arm branch update

2017-12-08 Thread Julien Grall
On 05/12/17 18:42, Julien Grall wrote: Hi Ian, On 05/12/17 18:41, Ian Jackson wrote: Stefano Stabellini writes ("Re: [OSSTEST PATCH] linux-arm-xen: Get from shared arm/linux.git xenbits tree"): On Tue, 5 Dec 2017, Julien Grall wrote: Acked-by: Julien Grall Acked-by: Stefano

Re: [Xen-devel] [PATCH] xen/arm: bootfdt: Use proper default for #address-cells and #size-cells

2017-12-08 Thread Julien Grall
Hi, On 29/11/17 18:12, Stefano Stabellini wrote: On Wed, 29 Nov 2017, Julien Grall wrote: Per the device-tree specific [1], when the property #address-cells and #size-cells are not present, the default value should be resp. 1 and 2. [1] https://www.devicetree.org/downloads/devicetree

Re: [Xen-devel] [PATCH] xen/arm: Surround HSR_SYSREG macro value with ()

2017-12-08 Thread Julien Grall
Hi, Ping? Cheers, On 29/11/17 17:46, Julien Grall wrote: The value of the macro HCR_SYSREG is not surrounded by (). This means the behavior may change depend on how it is used. Thanksfully recent GCC will issue a warning for that. Signed-off-by: Julien Grall --- I am not aware of any

  1   2   3   4   5   6   7   8   9   10   >