[Xen-devel] [for-4.11][PATCH v6 08/16] xen/mm: Drop the parameter mfn from populate_pt_range

2018-03-20 Thread Julien Grall
The function populate_pt_range is used to populate in advance the page-table but it will not do the actual mapping. So passing the MFN in parameter is pointless. Note that the only caller pass 0... At the same time replace 0 by INVALID_MFNs. While this does not matter as the entry will marked as n

[Xen-devel] [for-4.11][PATCH v6 09/16] xen/pdx: Introduce helper to convert MFN <-> PDX

2018-03-20 Thread Julien Grall
This will avoid use of pfn_to_pdx(mfn_x(mfn)) over the code base. Signed-off-by: Julien Grall Reviewed-by: Wei Liu Acked-by: Andrew Cooper --- 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

[Xen-devel] [for-4.11][PATCH v6 10/16] xen/mm: Switch map_pages_to_xen to use MFN typesafe

2018-03-20 Thread Julien Grall
The current prototype is slightly confusing because it takes a virtual address and a physical frame (not address!). Switching to MFN will improve safety and reduce the chance to mistakenly invert the 2 parameters. Also, take the opportunity to switch (a - b) >> PAGE_SHIFT to PFN_DOWN(a - b) in the

[Xen-devel] [for-4.11][PATCH v6 03/16] xen/arm: mm: Use gaddr_to_gfn rather than _gfn(paddr_to_pfn(...))

2018-03-20 Thread Julien Grall
Signed-off-by: Julien Grall --- Cc: Stefano Stabellini Changes in v6: - Remove the justification from the commit message - Add George's reviewed-by Changes in v4: - Patch added --- xen/arch/arm/mm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[Xen-devel] [for-4.11][PATCH v6 01/16] x86/mm: skip incrementing mfn if it is not a valid mfn

2018-03-20 Thread Julien Grall
From: Wei Liu In a follow-up patches, some callers will be switched to pass INVALID_MFN instead of zero for non-present mappings. So skip incrementing mfn if it is not a valid one. Signed-off-by: Wei Liu Signed-off-by: Julien Grall [Rework the commit message] -- Cc: Jan Beulich Cc: Andrew C

[Xen-devel] [for-4.11][PATCH v6 06/16] xen/x86: Remove unused override of page_to_mfn/mfn_to_page

2018-03-20 Thread Julien Grall
A few files override page_to_mfn/mfn_to_page but actually never use those macros. So drop them. Signed-off-by: Julien Grall Acked-by: George Dunlap Acked-by: Jan Beulich --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Changes in v5: - Add George and Jan's acked-by

[Xen-devel] [for-4.11][PATCH v6 11/16] xen/mm: Switch some of page_alloc.c to typesafe MFN

2018-03-20 Thread Julien Grall
No functional change intended. Signed-off-by: Julien Grall Reviewed-by: Wei Liu Reviewed-by: George Dunlap --- 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 Wei, I have

[Xen-devel] [for-4.11][PATCH v6 05/16] xen/arm: mm: Remove unused relinquish_shared_pages

2018-03-20 Thread Julien Grall
relinquish_shared_pages is never called on Arm. Signed-off-by: Julien Grall Reviewed-by: George Dunlap --- Cc: Stefano Stabellini Changes in v6: - Add George's reviewed-by Changes in v4: - Patch added --- xen/include/asm-arm/mm.h | 4 1 file changed, 4 deletion

[Xen-devel] [for-4.11][PATCH v6 13/16] xen/grant: Switch {create, replace}_grant_p2m_mapping to typesafe MFN

2018-03-20 Thread Julien Grall
The current prototype is slightly confusing because it takes a guest physical address and a machine physical frame (not address!). Switching to MFN will improve safety and reduce the chance to mistakenly invert the 2 parameters. Signed-off-by: Julien grall Reviewed-by: Wei Liu Reviewed-by: Jan B

[Xen-devel] [for-4.11][PATCH v6 12/16] xen/mm: Switch common/memory.c to use typesafe MFN

2018-03-20 Thread Julien Grall
A new helper __copy_mfn_to_guest is introduced to easily to copy a MFN to the guest memory. Not functional change intended Signed-off-by: Julien Grall --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan C

[Xen-devel] [for-4.11][PATCH v6 00/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-03-20 Thread Julien Grall
Hi all, This is v6 of the series. For all the changes see in each patch. To avoid the last patch (#16) to be a huge patch some files are converted to use typesafe upfront. I have tried my best to push _mfn/mfn_x as down as possible in the callers. Some of them was not feasible without major rewor

[Xen-devel] [for-4.11][PATCH v6 14/16] xen/grant: Switch common/grant_table.c to use typesafe MFN

2018-03-20 Thread Julien Grall
At the same time replace MFN 0 by INVALID_MFN or drop the initializer when it is not necessary. This will make clearer that the MFN initialized is not valid. Other than MFN 0 -> INVALID_MFN, no functional change intended. Signed-off-by: Julien Grall Reviewed-by: Jan Beulich Reviewed-by: Wei Liu

[Xen-devel] [for-4.11][PATCH v6 16/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-03-20 Thread Julien Grall
Most of the users of page_to_mfn and mfn_to_page are either overriding the macros to make them work with mfn_t or use mfn_x/_mfn because the rest of the function use mfn_t. So make page_to_mfn and mfn_to_page return mfn_t by default. The __* version are now dropped as this patch will convert all t

Re: [Xen-devel] [PATCH v1 00/15] arm64: Mediate access to GICv3 sysregs at EL2

2018-03-20 Thread Manish Jaggi
Hi Julien, On 03/20/2018 01:16 PM, Julien Grall wrote: On 03/16/2018 11:58 AM, Manish Jaggi wrote: This patchset is a Xen port of Marc's patchset. arm64: KVM: Mediate access to GICv3 sysregs at EL2 [1] The current RFC patchset is a subset of [1], as it handleing only Group1 traps as a PoC.

Re: [Xen-devel] [PATCH v1 00/15] arm64: Mediate access to GICv3 sysregs at EL2

2018-03-20 Thread Julien Grall
On 03/21/2018 04:58 AM, Manish Jaggi wrote: Hi Julien, On 03/20/2018 01:16 PM, Julien Grall wrote: On 03/16/2018 11:58 AM, Manish Jaggi wrote: This patchset is a Xen port of Marc's patchset. arm64: KVM: Mediate access to GICv3 sysregs at EL2 [1] The current RFC patchset is a subset of [1

Re: [Xen-devel] [PATCH 03/20] xen/public: Rename xen_domctl_createdomain.config to arch

2018-03-20 Thread Julien Grall
Hi, On 03/19/2018 07:13 PM, Andrew Cooper wrote: This is a tools only hypercall so fine to change. Altering the name avoids having confusing code such as config->config all over the hypervisor and toolstack. Signed-off-by: Andrew Cooper Acked-by: Julien Grall Cheers, --- CC: Jan Beulich

Re: [Xen-devel] [PATCH v1 02/15] arm64: Add config for Cavium Thunder erratum 30115

2018-03-20 Thread Manish Jaggi
On 03/20/2018 01:13 PM, Julien Grall wrote: Hi, On 03/16/2018 11:58 AM, Manish Jaggi wrote: Some Cavium Thunder CPUs suffer a problem where a Xen guest may inadvertently cause the host kernel to quit receiving interrupts. This patch adds CONFIG_CAVIUM_ERRATUM_30115. Subsequent patches will pr

[Xen-devel] [xen-unstable-smoke test] 121014: regressions - FAIL

2018-03-20 Thread osstest service owner
flight 121014 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/121014/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-xl-xsm 7 xen-boot fail REGR. vs. 120949 Tests which

[Xen-devel] [Not Xen] Facing issues running guest OS on custom Hypervisor

2018-03-20 Thread Brijen Raval
Hello Julien, As requested I am moving the conversation to email from IRC To summarize my setup: 1. I am running a custom kernel on QEMU ARM64(without KVM) on my linux machine 2. I have my custom implementation of Hypervisor 3. I am trying to run the same custom kernel as guest OS on top of my H

Re: [Xen-devel] [PATCH 04/20] xen/domctl: Drop vcpu_alloc_lock

2018-03-20 Thread Juergen Gross
On 20/03/18 18:22, Andrew Cooper wrote: > On 20/03/18 16:58, Jan Beulich wrote: > On 19.03.18 at 20:13, wrote: >>> It is not entirely clear why this interlock was introduced in c/s 8cbb5278e >>> "x86/AMD: Add support for AMD's OSVW feature in guests". >>> >>> At the time, svm_handle_osvw() cou

<    1   2   3