Re: [Xen-devel] [PATCH v4 5/5] ARM: ITS: Expose ITS in the MADT table

2017-10-04 Thread Manish Jaggi
Hi Andre, On 10/3/2017 8:03 PM, Julien Grall wrote: Hi Manish, On 21/09/17 14:17, mja...@caviumnetworks.com wrote: From: Manish Jaggi Add gicv3_its_make_hwdom_madt to update hwdom MADT ITS information. Signed-off-by: Manish Jaggi --- xen/arch/arm/gic-v3-its.c| 19

[Xen-devel] [qemu-upstream-4.6-testing test] 114018: tolerable FAIL - PUSHED

2017-10-04 Thread osstest service owner
flight 114018 qemu-upstream-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114018/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-xl-rtds 16 guest-start/debian.repeatfail like 111045 test-armhf-armhf-libvir

Re: [Xen-devel] How to prepare the COLO test environment

2017-10-04 Thread 山本真吾
2017/09/19 午後10:11 "Zhang Chen" : > > On 09/19/2017 04:32 PM, Dario Faggioli wrote: > > On Mon, 2017-09-18 at 18:52 +, Zhang Chen wrote: > >> 山本真吾 于2017年9月18日周一 下午6:27写道: > >>> I have read the following documents: > >>> > >>> COLO - Coarse Grain Lock Stepping > >>> https://wiki.xen.org/wiki/COL

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

2017-10-04 Thread osstest service owner
flight 114028 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114028/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt 12 guest-start fail REGR. vs. 113972 build-armhf

[Xen-devel] [qemu-upstream-4.9-testing test] 114016: tolerable FAIL - PUSHED

2017-10-04 Thread osstest service owner
flight 114016 qemu-upstream-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114016/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds16 guest-start/debian.repeat fail REGR. vs. 110939 test-amd64-amd

Re: [Xen-devel] [PATCH v4 07/15] x86: implement set value flow for MBA

2017-10-04 Thread Yi Sun
On 17-10-03 23:59:46, Jan Beulich wrote: > >>> Yi Sun 09/29/17 4:58 AM >>> > >On 17-09-28 05:36:11, Jan Beulich wrote: > >> >>> On 23.09.17 at 11:48, wrote: > >> > This patch implements set value flow for MBA including its callback > >> > function and domctl interface. > >> > > >> > It also chan

Re: [Xen-devel] [PATCH v4 04/15] x86: implement data structure and CPU init flow for MBA

2017-10-04 Thread Yi Sun
On 17-10-03 23:52:09, Jan Beulich wrote: > >>> Yi Sun 09/29/17 3:55 AM >>> > >On 17-09-28 05:00:09, Jan Beulich wrote: > >> >>> On 23.09.17 at 11:48, wrote: > >> > One thrtl register of MBA stores a throttle value for one or more > >> > domains. The throttle value means the delay between L2 cache

[Xen-devel] [qemu-upstream-unstable test] 114014: regressions - FAIL

2017-10-04 Thread osstest service owner
flight 114014 qemu-upstream-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/114014/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 16 guest-start/debian.repeat fail REGR. vs. 113699 Tests wh

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

2017-10-04 Thread osstest service owner
flight 114025 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114025/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt 12 guest-start fail REGR. vs. 113972 build-armhf

[Xen-devel] [linux-linus test] 114012: regressions - FAIL

2017-10-04 Thread osstest service owner
flight 114012 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/114012/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-arndale 6 xen-install fail REGR. vs. 113982 build-armhf-libvirt

[Xen-devel] ARM32 - build-issues with xen/arm: vpl011: Add a new vuart node in the xenstore

2017-10-04 Thread Konrad Rzeszutek Wilk
I get this when compiling under ARM32 (Ubuntu 15.04, gcc (Ubuntu/Linaro 4.9.2-10ubuntu13) 4.9.2): libxl_console.c: In function ‘libxl__device_vuart_add’: libxl_console.c:379:5: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘xen_pfn_t’ [-Werror=format=]

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

2017-10-04 Thread osstest service owner
flight 114022 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114022/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt 12 guest-start fail REGR. vs. 113972 build-armhf

Re: [Xen-devel] [PATCH 7/7] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN

2017-10-04 Thread Andrew Cooper
On 04/10/2017 19:15, Julien Grall wrote: > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 093ebf1a8e..0753d03aac 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -104,11 +104,11 @@ static bool insert_11_bank(struct domain *d, >

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

2017-10-04 Thread osstest service owner
flight 114021 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114021/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt 12 guest-start fail REGR. vs. 113972 build-armhf

Re: [Xen-devel] [PATCH 6/7] xen/tmem: Convert the file common/tmem_xen.c to use typesafe MFN

2017-10-04 Thread Andrew Cooper
On 04/10/2017 19:15, Julien Grall wrote: > @@ -68,16 +72,16 @@ static inline void *cli_get_page(xen_pfn_t cmfn, unsigned > long *pcli_mfn, > > *pcli_mfn = page_to_mfn(page); > *pcli_pfp = page; Newline. > -return map_domain_page(_mfn(*pcli_mfn)); > +return map_domain_page(*pc

Re: [Xen-devel] [PATCH 5/7] xen/xenoprof: Convert the file to use typesafe MFN

2017-10-04 Thread Andrew Cooper
On 04/10/2017 19:15, Julien Grall wrote: > @@ -134,25 +140,26 @@ static void xenoprof_reset_buf(struct domain *d) > } > > static int > -share_xenoprof_page_with_guest(struct domain *d, unsigned long mfn, int > npages) > +share_xenoprof_page_with_guest(struct domain *d, mfn_t mfn, int npages) >

Re: [Xen-devel] [PATCH 4/7] xen/kimage: Remove defined but unused variables

2017-10-04 Thread Andrew Cooper
On 04/10/2017 19:15, Julien Grall wrote: > In the function kimage_alloc_normal_control_page, the variables mfn and > emfn are defined but not used. Remove them. > > Signed-off-by: Julien Grall Oops. Reviewed-by: Andrew Cooper ___ Xen-devel mailing li

Re: [Xen-devel] [PATCH 3/7] xen/x86: Use maddr_to_page and maddr_to_mfn to avoid open-coded >> PAGE_SHIFT

2017-10-04 Thread Andrew Cooper
On 04/10/2017 19:15, Julien Grall wrote: > The constructions _mfn(... > PAGE_SHIFT) and mfn_to_page(... >> PAGE_SHIFT) > could respectively be replaced by maddr_to_mfn(...) and > maddr_to_page(...). > > Signed-off-by: Julien Grall Reviewed-by: Andrew Cooper _

Re: [Xen-devel] [PATCH 1/7] xen/arm: domain_build: Clean-up insert_11_bank

2017-10-04 Thread Andrew Cooper
On 04/10/2017 19:15, Julien Grall wrote: > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 3723dc3f78..093ebf1a8e 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -109,11 +109,11 @@ static bool insert_11_bank(struct domain *d, > >

Re: [Xen-devel] [PATCH 7/7] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN

2017-10-04 Thread Tamas K Lengyel
On Wed, Oct 4, 2017 at 12:15 PM, Julien Grall wrote: > 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 defaul

[Xen-devel] [RFC v3 22/27] x86/modules: Add option to start module section after kernel

2017-10-04 Thread Thomas Garnier
Add an option so the module section is just after the mapped kernel. It will ensure position independent modules are always at the right distance from the kernel and do not require mcmodule=large. It also optimize the available size for modules by getting rid of the empty space on kernel randomizat

[Xen-devel] [RFC v3 19/27] x86: Support global stack cookie

2017-10-04 Thread Thomas Garnier
Add an off-by-default configuration option to use a global stack cookie instead of the default TLS. This configuration option will only be used with PIE binaries. For kernel stack cookie, the compiler uses the mcmodel=kernel to switch between the fs segment to gs segment. A PIE binary does not use

[Xen-devel] [RFC v3 26/27] x86/relocs: Add option to generate 64-bit relocations

2017-10-04 Thread Thomas Garnier
The x86 relocation tool generates a list of 32-bit signed integers. There was no need to use 64-bit integers because all addresses where above the 2G top of the memory. This change add a large-reloc option to generate 64-bit unsigned integers. It can be used when the kernel plan to go below the to

[Xen-devel] [RFC v3 20/27] x86/ftrace: Adapt function tracing for PIE support

2017-10-04 Thread Thomas Garnier
When using -fPIE/PIC with function tracing, the compiler generates a call through the GOT (call *__fentry__@GOTPCREL). This instruction takes 6 bytes instead of 5 on the usual relative call. With this change, function tracing supports 6 bytes on traceable function and can still replace relative ca

[Xen-devel] [RFC v3 24/27] x86/mm: Make the x86 GOT read-only

2017-10-04 Thread Thomas Garnier
The GOT is changed during early boot when relocations are applied. Make it read-only directly. This table exists only for PIE binary. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier ---

[Xen-devel] [RFC v3 23/27] x86/modules: Adapt module loading for PIE support

2017-10-04 Thread Thomas Garnier
Adapt module loading to support PIE relocations. Generate dynamic GOT if a symbol requires it but no entry exist in the kernel GOT. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier --- ar

[Xen-devel] [RFC v3 21/27] x86/mm/dump_pagetables: Fix address markers index on x86_64

2017-10-04 Thread Thomas Garnier
The address_markers_idx enum is not aligned with the table when EFI is enabled. Add an EFI_VA_END_NR entry in this case. Signed-off-by: Thomas Garnier --- arch/x86/mm/dump_pagetables.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch

[Xen-devel] [RFC v3 18/27] kvm: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. The new __ASM_GET_PTR_PRE macro is used to get the address of a symbol on both 32 and 64-bit with PIE support. Position Independent Executable (PIE) support will allow to extended the KASLR ran

[Xen-devel] [RFC v3 16/27] x86/relocs: Handle PIE relocations

2017-10-04 Thread Thomas Garnier
Change the relocation tool to correctly handle relocations generated by -fPIE option: - Add relocation for each entry of the .got section given the linker does not generate R_X86_64_GLOB_DAT on a simple link. - Ignore R_X86_64_GOTPCREL and R_X86_64_PLT32. Signed-off-by: Thomas Garnier ---

[Xen-devel] [RFC v3 27/27] x86/kaslr: Add option to extend KASLR range from 1GB to 3GB

2017-10-04 Thread Thomas Garnier
Add a new CONFIG_RANDOMIZE_BASE_LARGE option to benefit from PIE support. It increases the KASLR range from 1GB to 3GB. The new range stars at 0x just above the EFI memory region. This option is off by default. The boot code is adapted to create the appropriate page table spanning

[Xen-devel] [RFC v3 17/27] xen: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use the new _ASM_GET_PTR macro which get a symbol reference while being PIE compatible. Adapt the relocation tool to ignore 32-bit Xen code. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. S

[Xen-devel] [RFC v3 10/27] x86/boot/64: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Early at boot, the kernel is mapped at a temporary address while preparing the page table. To know the changes needed for the page table with KASLR, the boot code calculate the difference betwe

[Xen-devel] [RFC v3 25/27] x86/pie: Add option to build the kernel as PIE

2017-10-04 Thread Thomas Garnier
Add the CONFIG_X86_PIE option which builds the kernel as a Position Independent Executable (PIE). The kernel is currently build with the mcmodel=kernel option which forces it to stay on the top 2G of the virtual address space. With PIE, the kernel will be able to move below the current limit. The

[Xen-devel] [RFC v3 13/27] x86/boot/64: Use _text in a global for PIE support

2017-10-04 Thread Thomas Garnier
By default PIE generated code create only relative references so _text points to the temporary virtual address. Instead use a global variable so the relocation is done as expected. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memo

[Xen-devel] [RFC v3 04/27] x86: Add macro to get symbol address for PIE support

2017-10-04 Thread Thomas Garnier
Add a new _ASM_GET_PTR macro to fetch a symbol address. It will be used to replace "_ASM_MOV $, %dst" code construct that are not compatible with PIE. Signed-off-by: Thomas Garnier --- arch/x86/include/asm/asm.h | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/x86/include/

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

2017-10-04 Thread osstest service owner
flight 114020 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114020/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt 12 guest-start fail REGR. vs. 113972 build-armhf

[Xen-devel] [RFC v3 14/27] x86/percpu: Adapt percpu for PIE support

2017-10-04 Thread Thomas Garnier
Perpcu uses a clever design where the .percu ELF section has a virtual address of zero and the relocation code avoid relocating specific symbols. It makes the code simple and easily adaptable with or without SMP support. This design is incompatible with PIE because generated code always try to acc

[Xen-devel] [RFC v3 15/27] compiler: Option to default to hidden symbols

2017-10-04 Thread Thomas Garnier
Provide an option to default visibility to hidden except for key symbols. This option is disabled by default and will be used by x86_64 PIE support to remove errors between compilation units. The default visibility is also enabled for external symbols that are compared as they maybe equals (start/

[Xen-devel] [RFC v3 08/27] x86/CPU: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Use the new _ASM_GET_PTR macro instead of the 'mov $symbol, %dst' construct to not have an absolute reference. Position Independent Executable (PIE) support will allow to extended the KASLR ran

[Xen-devel] [RFC v3 01/27] x86/crypto: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier --- arch/x86/crypto/aes-x86_64-as

[Xen-devel] [RFC v3 05/27] x86: relocate_kernel - Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier --- arch/x86/kernel/relocate_kern

[Xen-devel] [RFC v3 02/27] x86: Use symbol name on bug table for PIE support

2017-10-04 Thread Thomas Garnier
Replace the %c constraint with %P. The %c is incompatible with PIE because it implies an immediate value whereas %P reference a symbol. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier ---

[Xen-devel] [RFC v3 07/27] x86: pm-trace - Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change assembly to use the new _ASM_GET_PTR macro instead of _ASM_MOV for the assembly to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier --- arch/x86/include/asm/pm-t

[Xen-devel] [RFC v3 06/27] x86/entry/64: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier --- arch/x86/entry/entry_64.S | 2

[Xen-devel] [RFC v3 09/27] x86/acpi: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier --- arch/x86/kernel/acpi/wakeup_6

[Xen-devel] [RFC v3 11/27] x86/power/64: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier --- arch/x86/power/hibernate_asm_

[Xen-devel] x86: PIE support and option to extend KASLR randomization

2017-10-04 Thread Thomas Garnier
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel &

[Xen-devel] [RFC v3 03/27] x86: Use symbol name in jump table for PIE support

2017-10-04 Thread Thomas Garnier
Replace the %c constraint with %P. The %c is incompatible with PIE because it implies an immediate value whereas %P reference a symbol. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier ---

[Xen-devel] [RFC v3 12/27] x86/paravirt: Adapt assembly for PIE support

2017-10-04 Thread Thomas Garnier
if PIE is enabled, switch the paravirt assembly constraints to be compatible. The %c/i constrains generate smaller code so is kept by default. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garni

[Xen-devel] [PATCH v7 10/11] arm: vsmc: remove 64 bit mode check in PSCI handler

2017-10-04 Thread Volodymyr Babchuk
PSCI handling code had helper routine that checked calling convention. It does not needed anymore, because: - Generic handler checks that 64 bit calls can be made only by 64 bit guests. - SMCCC requires that 64-bit handler should support both 32 and 64 bit calls even if they originate fro

[Xen-devel] [PATCH v7 11/11] public: add and enable XENFEAT_ARM_SMCCC_supported feature

2017-10-04 Thread Volodymyr Babchuk
This feature indicates that hypervisor is compatible with ARM SMC calling convention. Previously hypervisor would inject an undefined instruction exception if an invalid SMC function were called or would crash a domain if an invalid HVC function were invoked. XENFEAT_ARM_SMCCC_supported feature mea

[Xen-devel] [PATCH v7 06/11] arm: add SMCCC protocol definitions

2017-10-04 Thread Volodymyr Babchuk
Add generic definitions used in ARM SMC call convention. Those definitions was originally added to Linux kernel as include/linux/arm-smccc.h by commit 98dd64f34f47 ("ARM: 8478/2: arm/arm64: add arm-smccc") I extended them and formatted according to XEN coding style. Some of the macros were convert

[Xen-devel] [PATCH v7 08/11] arm: traps: handle PSCI calls inside `vsmc.c`

2017-10-04 Thread Volodymyr Babchuk
PSCI is part of HVC/SMC interface, so it should be handled in appropriate place: `vsmc.c`. This patch moves PSCI handler calls from `traps.c` to `vsmc.c`. Also it corrects coding style of the PSCI handler functions. Older PSCI 0.1 uses SMC function identifiers in range that is reserved for existin

[Xen-devel] [PATCH v7 09/11] arm: PSCI: use definitions provided by asm/smccc.h

2017-10-04 Thread Volodymyr Babchuk
smccc.h provides definitions to construct SMC call function number according to SMCCC. We don't need multiple definitions for one thing, and definitions in smccc.h are more generic than ones used in psci.h. So psci.h will only provide function codes, while whole SMC function identifier will be con

[Xen-devel] [PATCH v7 07/11] arm: smccc: handle SMCs according to SMCCC

2017-10-04 Thread Volodymyr Babchuk
SMCCC (SMC Call Convention) describes how to handle both HVCs and SMCs. SMCCC states that both HVC and SMC are valid conduits to call to different firmware functions. Thus, for example, PSCI calls can be made both by SMC or HVC. Also SMCCC defines function number coding for such calls. Besides func

[Xen-devel] [PATCH v7 05/11] arm: processor.h: add definition for immediate value mask

2017-10-04 Thread Volodymyr Babchuk
This patch defines HSR_XXC_IMM_MASK. It can be used to extract immediate value for trapped HVC32, HVC64, SMC64, SVC32, SVC64 instructions, as described in the ARM ARM (ARM DDI 0487B.a pages D7-2270, D7-2272). Signed-off-by: Volodymyr Babchuk Acked-by: Julien Grall --- xen/include/asm-arm/proces

[Xen-devel] [PATCH v7 02/11] arm: traps: use generic register accessors in the PSCI code

2017-10-04 Thread Volodymyr Babchuk
There are standard functions set_user_reg() and get_user_reg(). We can use them in PSCI_SET_RESULT()/PSCI_ARG() macros instead of relying on CONFIG_ARM_64 definition. Signed-off-by: Volodymyr Babchuk Reviewed-by: Julien Grall --- xen/arch/arm/traps.c | 38 +-

[Xen-devel] [PATCH v7 00/11] Handle SMCs and HVCs in conformance with SMCCC

2017-10-04 Thread Volodymyr Babchuk
Hello all, v7: * Added new patch "arm: traps: use only least 32 bits of fid in PSCI handler" It fixes fid usage on 64 bit machines. Now only least 32 bits are used, as required by SMCCC. It is a separate change, so it can be back-ported. * Fixed the same issue in "arm: traps: handle PSCI

[Xen-devel] [PATCH v7 04/11] public: xen.h: add definitions for UUID handling

2017-10-04 Thread Volodymyr Babchuk
Added type xen_uuid_t. This type represents UUID as an array of 16 bytes in big endian format. Added macro XEN_DEFINE_UUID that constructs UUID in the usual way: XEN_DEFINE_UUID(0x00112233, 0x4455, 0x6677, 0x8899, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff) will construct UUID 00112233-

[Xen-devel] [PATCH v7 03/11] arm: traps: check if SMC was conditional before handling it

2017-10-04 Thread Volodymyr Babchuk
Trapped SMC instruction can fail condition check on ARMv8 architecture (ARM DDI 0487B.a page D7-2271). So we need to check if condition was meet. Signed-off-by: Volodymyr Babchuk Reviewed-by: Julien Grall --- xen/arch/arm/traps.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/xen/arc

[Xen-devel] [PATCH v7 01/11] arm: traps: use only least 32 bits of fid in PSCI handler

2017-10-04 Thread Volodymyr Babchuk
According to SMCCC (ARM DEN 0028B, page 12), function id is stored in least 32 bits of r0/x0 register: The least significant 32-bits are used, and the most significant 32-bits are zero. Implementations must ignore the least significant bits. Signed-off-by: Volodymyr Babchuk --- xen/

[Xen-devel] [xen-unstable test] 114003: tolerable FAIL - PUSHED

2017-10-04 Thread osstest service owner
flight 114003 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/114003/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-xsm 14 saverestore-support-checkfail like 113959 test-armhf-armhf-xl-rtds 16 gues

Re: [Xen-devel] [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype

2017-10-04 Thread Greg KH
On Wed, Oct 04, 2017 at 10:01:26AM -0700, Stefano Stabellini wrote: > On Wed, 4 Oct 2017, Arnd Bergmann wrote: > > xen_swiotlb_dma_mmap was backported from v4.10, but older > > kernels before commit 00085f1efa38 ("dma-mapping: use unsigned long > > for dma_attrs") use a different signature: > > >

Re: [Xen-devel] [PATCH 7/7] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN

2017-10-04 Thread Razvan Cojocaru
On 10/04/2017 09:15 PM, Julien Grall wrote: > 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. > > O

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

2017-10-04 Thread osstest service owner
flight 114015 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114015/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt 12 guest-start fail REGR. vs. 113972 build-armhf

[Xen-devel] [distros-debian-squeeze test] 72196: tolerable trouble: broken/fail/pass

2017-10-04 Thread Platform Team regression test user
flight 72196 distros-debian-squeeze real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72196/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: build-arm64 2 hosts-allocate broken like 72166 build-arm64-pvops

[Xen-devel] [linux-next test] 113999: regressions - FAIL

2017-10-04 Thread osstest service owner
flight 113999 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/113999/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-pvops 6 kernel-build fail REGR. vs. 113902 Tests which did not

[Xen-devel] [PATCH 3/7] xen/x86: Use maddr_to_page and maddr_to_mfn to avoid open-coded >> PAGE_SHIFT

2017-10-04 Thread Julien Grall
The constructions _mfn(... > PAGE_SHIFT) and mfn_to_page(... >> PAGE_SHIFT) could respectively be replaced by maddr_to_mfn(...) and maddr_to_page(...). Signed-off-by: Julien Grall --- Cc: Elena Ufimtseva Cc: Jan Beulich Cc: Andrew Cooper Cc: Tim Deegan Cc: George Dunlap --- xen/arch/x86/d

[Xen-devel] [PATCH 2/7] xen/arm32: mm: Rework is_xen_heap_page to avoid nameclash

2017-10-04 Thread Julien Grall
The arm32 version of the function is_xen_heap_page currently define a variable _mfn. This will lead to a compiler when use typesafe MFN in a folow-up patch: called object '_mfn' is not a function or function pointer Fix it by renaming the local variable _mfn to mfn_. Signed-off-by: Julien Grall

[Xen-devel] [PATCH 7/7] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN

2017-10-04 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. Only reasonable clean-ups are done in this patch because it

[Xen-devel] [PATCH 0/7] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN

2017-10-04 Thread Julien Grall
Hi all, 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 becaue the rest of the function use mfn_t. So I think it is time to make __page_to_mfn and __mfn_to_page using typesafe MFN. The first 6 patches will convert o

[Xen-devel] [PATCH 6/7] xen/tmem: Convert the file common/tmem_xen.c to use typesafe MFN

2017-10-04 Thread Julien Grall
The file common/tmem_xen.c is now converted to use typesafe. This is requiring to override the macro page_to_mfn to make it work with mfn_t. Note that all variables converted to mfn_t havem there initial value, when set, switch from 0 to INVALID_MFN. This is fine because the initial values was alw

[Xen-devel] [PATCH 5/7] xen/xenoprof: Convert the file to use typesafe MFN

2017-10-04 Thread Julien Grall
The file common/xenoprof.c is now converted to use typesafe. This is requiring to override the macros virt_to_mfn and mfn_to_page to make them work with mfn_t. Signed-off-by: Julien Grall --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc:

[Xen-devel] [PATCH 1/7] xen/arm: domain_build: Clean-up insert_11_bank

2017-10-04 Thread Julien Grall
- Remove spurious () - Add missing spaces - Turn 1 << to 1UL << Signed-off-by: Julien Grall --- Cc: Stefano Stabellini --- 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

[Xen-devel] [PATCH 4/7] xen/kimage: Remove defined but unused variables

2017-10-04 Thread Julien Grall
In the function kimage_alloc_normal_control_page, the variables mfn and emfn are defined but not used. Remove them. Signed-off-by: Julien Grall --- Cc: Andrew Cooper --- xen/common/kimage.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/common/kimage.c b/xen/common/kimage.c index e

Re: [Xen-devel] DomD: passthroughing an arbitrary device

2017-10-04 Thread Oleksandr Andrushchenko
sorry, pressed send too fast On 10/04/2017 09:02 PM, Oleksandr Andrushchenko wrote: On 10/04/2017 08:22 PM, Julien Grall wrote: On 04/10/17 17:32, Oleksandr Andrushchenko wrote: Hi, all! Hello, We have a use-case where we want to passthrough and arbitrary device to driver domain, e.g. G

Re: [Xen-devel] DomD: passthroughing an arbitrary device

2017-10-04 Thread Oleksandr Andrushchenko
On 10/04/2017 08:22 PM, Julien Grall wrote: On 04/10/17 17:32, Oleksandr Andrushchenko wrote: Hi, all! Hello, We have a use-case where we want to passthrough and arbitrary device to driver domain, e.g. GPIO controller or the like (doesn't do any DMA). I will assume you are speaking abo

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

2017-10-04 Thread Wei Liu
On Wed, Oct 04, 2017 at 05:12:47PM +, osstest service owner wrote: > flight 114010 xen-unstable-smoke real [real] > http://logs.test-lab.xenproject.org/osstest/logs/114010/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: > test-

Re: [Xen-devel] DomD: passthroughing an arbitrary device

2017-10-04 Thread Julien Grall
On 04/10/17 17:32, Oleksandr Andrushchenko wrote: Hi, all! Hello, We have a use-case where we want to passthrough and arbitrary device to driver domain, e.g. GPIO controller or the like (doesn't do any DMA). I will assume you are speaking about Xen Arm and not Xen x86. Please correct if

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

2017-10-04 Thread osstest service owner
flight 114010 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114010/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt 12 guest-start fail REGR. vs. 113972 build-armhf

Re: [Xen-devel] [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype

2017-10-04 Thread Stefano Stabellini
On Wed, 4 Oct 2017, Arnd Bergmann wrote: > xen_swiotlb_dma_mmap was backported from v4.10, but older > kernels before commit 00085f1efa38 ("dma-mapping: use unsigned long > for dma_attrs") use a different signature: > > arm/xen/mm.c:202:10: error: initialization from incompatible pointer type > [

Re: [Xen-devel] [PATCH v2 08/13] fuzz/x86_emulate: Take multiple test files for inputs

2017-10-04 Thread George Dunlap
On 10/04/2017 09:24 AM, Jan Beulich wrote: On 25.09.17 at 16:26, wrote: >> --- a/tools/fuzz/x86_instruction_emulator/afl-harness.c >> +++ b/tools/fuzz/x86_instruction_emulator/afl-harness.c >> @@ -16,6 +16,8 @@ int main(int argc, char **argv) >> { >> size_t size; >> FILE *fp = NULL

Re: [Xen-devel] [PATCH v2 09/13] fuzz/x86_emulate: Move all state into fuzz_state

2017-10-04 Thread George Dunlap
On 10/04/2017 09:25 AM, Jan Beulich wrote: On 25.09.17 at 16:26, wrote: >> @@ -39,6 +33,12 @@ struct fuzz_corpus >> */ >> struct fuzz_state >> { >> +unsigned long options; >> +unsigned long cr[5]; >> +uint64_t msr[MSR_INDEX_MAX]; >> +struct segment_register segments[SEG_NU

Re: [Xen-devel] [PATCH v2 07/13] fuzz/x86_emulate: Add 'afl-cov' target

2017-10-04 Thread George Dunlap
On 10/04/2017 09:23 AM, Jan Beulich wrote: On 25.09.17 at 16:26, wrote: >> --- a/tools/fuzz/README.afl >> +++ b/tools/fuzz/README.afl >> @@ -41,3 +41,17 @@ Use the x86 instruction emulator fuzzer as an example. >> $ $AFLPATH/afl-fuzz -t 1000 -i testcase_dir -o findings_dir -- >> ./afl-ha

Re: [Xen-devel] [PATCH v2 06/13] fuzz/x86_emulate: Rename the file containing the wrapper code

2017-10-04 Thread George Dunlap
On 10/04/2017 09:23 AM, Jan Beulich wrote: On 25.09.17 at 16:26, wrote: >> --- a/tools/fuzz/x86_instruction_emulator/Makefile >> +++ b/tools/fuzz/x86_instruction_emulator/Makefile >> @@ -18,22 +18,22 @@ asm: >> >> asm/%: asm ; >> >> -x86_emulate.c x86_emulate.h: %: >> +x86_emulate_user.c

[Xen-devel] DomD: passthroughing an arbitrary device

2017-10-04 Thread Oleksandr Andrushchenko
Hi, all! We have a use-case where we want to passthrough and arbitrary device to driver domain, e.g. GPIO controller or the like (doesn't do any DMA). I know that for device to be pass throughed it must be tied to an IOMMU, but in my case the controller doesn’t have any. The problem is that it

[Xen-devel] [PATCH 8/8] RFC configure: do_compiler: Dump some extra info under bash

2017-10-04 Thread Ian Jackson
This makes it much easier to find a particular thing in config.log. The information may be lacking in other shells, resulting in harmless empty output. (This is why we don't use the proper ${FUNCNAME[*]} array syntax - other shells will choke on that.) The extra output is only printed if configu

Re: [Xen-devel] [PATCH v2 05/13] fuzz/x86_emulate: Implement input_read() and input_avail()

2017-10-04 Thread George Dunlap
On 10/04/2017 09:22 AM, Jan Beulich wrote: On 25.09.17 at 16:26, wrote: >> --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c >> +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c >> @@ -52,6 +52,22 @@ struct fuzz_state >> struct x86_emulate_ops ops; >> }; >> >> +static inline b

[Xen-devel] [PATCH 3/8] xen: defer call to xen_restrict until after os_setup_post

2017-10-04 Thread Ian Jackson
We need to restrict *all* the control fds that qemu opens. Looking in /proc/PID/fd shows there are many; their allocation seems scattered throughout Xen support code in qemu. We must postpone the restrict call until roughly the same time as qemu changes its uid, chroots (if applicable), and so on

[Xen-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-04 Thread Ian Jackson
This allows the caller to specify a uid and gid to use, even if there is no corresponding password entry. This will be useful in certain Xen configurations. Signed-off-by: Ian Jackson --- v2: Coding style fixes. --- os-posix.c | 31 +++ qemu-options.hx | 12

[Xen-devel] [PATCH 2/8] xen: restrict: use xentoolcore_restrict_all

2017-10-04 Thread Ian Jackson
And insist that it works. Drop individual use of xendevicemodel_restrict and xenforeignmemory_restrict. These are not actually effective in this version of qemu, because qemu has a large number of fds open onto various Xen control devices. The restriction arrangements are still not right, becaus

[Xen-devel] [PATCH 4/8] xen: destroy_hvm_domain: Move reason into a variable

2017-10-04 Thread Ian Jackson
We are going to want to reuse this. No functional change. Signed-off-by: Ian Jackson Reviewed-by: Anthony PERARD --- hw/i386/xen/xen-hvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 7b60ec6..83420cd 100644 --- a/

[Xen-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements

2017-10-04 Thread Ian Jackson
(Resending this because 1. I got the CC for xen-devel wrong; 2. I got the subject wrong: there are actually 8 patches; 3. I mangled Anthony's name in theheaders. Sorry for the noise.) I have been working on trying to get qemu, when running as a Xen device model, to _actually_ not have power equiv

[Xen-devel] [PATCH 6/8] xen: destroy_hvm_domain: Try xendevicemodel_shutdown

2017-10-04 Thread Ian Jackson
xc_interface_open etc. is not going to work if we have dropped privilege, but xendevicemodel_shutdown will if everything is new enough. xendevicemodel_shutdown is only availabe in Xen 4.10 and later, so provide a stub for earlier versions. Signed-off-by: Ian Jackson --- v2: Add compatibility stu

[Xen-devel] [PATCH 5/8] xen: move xc_interface compatibility fallback further up the file

2017-10-04 Thread Ian Jackson
We are going to want to use the dummy xendevicemodel_handle type in new stub functions in the CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000 section. So we need to provide that definition, or (as applicable) include the appropriate header, earlier in the file. (Ideally the newer compatibility layers w

[Xen-devel] [PATCH 1/8] xen: link against xentoolcore

2017-10-04 Thread Ian Jackson
From: Anthony PERARD Xen libraries 4.10 will include a new xentoolcore library, without which xendevicemodel et al will not work. Signed-off-by: Ian Jackson --- configure | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure b/configure index fd7e3a5..6f691df 10

[Xen-devel] [PATCH 18/24] xentoolcore, _restrict_all: Document implementation "complete"

2017-10-04 Thread Ian Jackson
Signed-off-by: Ian Jackson --- v2: Fix typo in comment --- tools/libs/toolcore/include/xentoolcore.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/libs/toolcore/include/xentoolcore.h b/tools/libs/toolcore/include/xentoolcore.h index 93eaf23..881ff11 100644 --- a

[Xen-devel] [PATCH 23/24] libxl: dm_restrict: Support uid range user

2017-10-04 Thread Ian Jackson
Signed-off-by: Ian Jackson --- docs/man/xl.cfg.pod.5.in | 11 ++- tools/libxl/libxl_dm.c | 32 tools/libxl/libxl_internal.h | 1 + 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/docs/man/xl.cfg.pod.5.in b/docs/man/xl.cfg.pod.5.in

[Xen-devel] [PATCH 11/24] xentoolcore_restrict: Break out xentoolcore__restrict_by_dup2_null

2017-10-04 Thread Ian Jackson
Signed-off-by: Ian Jackson Acked-by: Wei Liu --- tools/libs/call/core.c | 30 +- tools/libs/toolcore/handlereg.c| 26 +++ tools/libs/toolcore/include/xentoolcore_internal.h | 12 + tools/libs/toolcore/lib

[Xen-devel] [PATCH 19/24] xl, libxl: Provide dm_restrict

2017-10-04 Thread Ian Jackson
This functionality is still quite imperfect, but it will be useful in certain restricted use cases. Signed-off-by: Ian Jackson Acked-by: Wei Liu --- docs/man/xl.cfg.pod.5.in| 86 + tools/libxl/libxl_create.c | 1 + tools/libxl/libxl_dm.c |

  1   2   3   >