[XEN PATCH][for-4.19 v2 0/7] Fix or deviate various instances of missing declarations

2023-10-08 Thread Nicola Vetrini
The patches in this series aim to fix or deviate various instances where a function or variable do not have a declaration visible when such entity is defined (in violation of MISRA C:2012 Rule 8.4). An exception listed under docs/misra/rules.rst allows asm-only functions and variables to be exempte

[XEN PATCH][for-4.19 v2 6/7] xen/console: make function static inline

2023-10-08 Thread Nicola Vetrini
The definition of 'consoled_guest_tx' can be static inline, thereby fixing a violation of MISRA C:2012 Rule 8.4. Fixes: 5ef49f185c2d ("x86/pv-shim: shadow PV console's page for L2 DomU") Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/include/xen/consoled.h | 2 +- 1 file

[XEN PATCH v2 3/7] x86: add deviation comments for asm-only functions

2023-10-08 Thread Nicola Vetrini
As stated in rules.rst, functions used only in asm code are allowed to have no prior declaration visible when being defined, hence these functions are deviated. This also fixes violations of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/arch/x86/hv

[XEN PATCH][for-next v2 4/7] x86/grant: switch included header to make declarations visible

2023-10-08 Thread Nicola Vetrini
The declarations for {create,replace}_grant_p2m_mapping are not visible when these functions are defined, therefore the right header needs to be included to allow them to be visible. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/arch/x86/hvm/grant_table.c | 3

[XEN PATCH][for-next v2 7/7] x86/mem_access: make function static

2023-10-08 Thread Nicola Vetrini
The function is used only within this file, and therefore can be static. No functional change. Signed-off-by: Nicola Vetrini --- xen/arch/x86/mm/mem_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c index c47

[XEN PATCH][for-next v2 5/7] x86/vm_event: add missing include for hvm_vm_event_do_resume

2023-10-08 Thread Nicola Vetrini
The missing header makes the declaration visible when the function is defined, thereby fixing a violation of MISRA C:2012 Rule 8.4. Fixes: 1366a0e76db6 ("x86/vm_event: add hvm/vm_event.{h,c}") Signed-off-by: Nicola Vetrini --- xen/arch/x86/hvm/vm_event.c | 1 + 1 file changed, 1 insertion(+) di

[XEN PATCH v2 2/7] x86: add deviations for variables only used in asm code

2023-10-08 Thread Nicola Vetrini
These variables are only used by asm code, and therefore the lack of a declaration is justified by the corresponding deviation comment. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/arch/x86/include/asm/asm_defns.h | 1 + xen/arch/x86/setup.c | 1 + 2 fil

[XEN PATCH v2 1/7] xen: add declarations for variables where needed

2023-10-08 Thread Nicola Vetrini
Some variables with external linkage used in C code do not have a visible declaration where they are defined. Providing such declaration also resolves violations of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini --- Changes in v2: - make xenpf_lock static on ARM - moved the declaration of c

[PATCH v7 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

2023-10-08 Thread Henry Wang
From: Penny Zheng Current P2M implementation is designed for MMU system only. We move the MMU-specific codes into mmu/p2m.c, and only keep generic codes in p2m.c, like VMID allocator, etc. We also move MMU-specific definitions and declarations to mmu/p2m.h, such as p2m_tlb_flush_sync(). Also expo

[PATCH v7 6/8] xen/arm: Fold pmap and fixmap into MMU system

2023-10-08 Thread Henry Wang
fixmap and pmap are MMU-specific features, so fold them to the MMU system. Do the folding for pmap by moving the HAS_PMAP Kconfig selection under MMU. Since none of the definitions in asm/fixmap.h actually makes sense for the MPU, so do the folding for fixmap by limiting the inclusion of asm/fixmap

[PATCH v7 4/8] xen/arm: Extract MMU-specific MM code

2023-10-08 Thread Henry Wang
Currently, most of the code is in arm/mm.{c,h} and arm/arm64/mm.c is MMU-specific. To make the MM code extendable, this commit extracts the MMU-specific MM code. Extract the boot CPU MM bringup code from arm/mm.c to mmu/setup.c. While moving, mark pte_of_xenaddr() as __init to make clear that this

[PATCH v7 7/8] xen/arm: Rename init_secondary_pagetables() to prepare_secondary_mm()

2023-10-08 Thread Henry Wang
From: Penny Zheng init_secondary_pagetables() is a function in the common code path of both MMU and future MPU support. Since "page table" is a MMU specific concept, rename init_secondary_pagetables() to a generic name prepare_secondary_mm() as the preparation for MPU support. Take the opportuni

[PATCH v7 2/8] xen/arm: Split MMU system SMP MM bringup code to mmu/smpboot.c

2023-10-08 Thread Henry Wang
Move the code related to secondary page table initialization, clear boot page tables and the global variable definitions of these boot page tables from arch/arm/mm.c to arch/arm/mmu/smpboot.c Since arm32 global variable cpu0_pgtable will be used by both arch/arm/mm.c and arch/arm/mmu/smpboot.c, to

[PATCH v7 5/8] xen/arm: Split MMU-specific setup_mm() and related code out

2023-10-08 Thread Henry Wang
setup_mm() is used for Xen to setup memory management subsystem, such as boot allocator, direct-mapping, xenheap initialization, frametable and static memory pages, at boot time. We could inherit some components seamlessly for MPU support, such as the setup of boot allocator, whilst we need to imp

[PATCH v7 0/8] xen/arm: Split MMU code as the prepration of MPU work

2023-10-08 Thread Henry Wang
Based on the discussion in the Xen Summit [1], sending this series out after addressing the comments in v6 [2] as the preparation work to add MPU support. The series passed the GitLab CI check in [3]. Mostly code movement and function folding, with some of Kconfig and build system (mainly Makefile

[PATCH v7 3/8] xen/arm: Fold mmu_init_secondary_cpu() to head.S

2023-10-08 Thread Henry Wang
Currently mmu_init_secondary_cpu() only enforces the page table should not contain mapping that are both Writable and eXecutables after boot. To ease the arch/arm/mm.c split work, fold this function to head.S. Introduce assembly macro pt_enforce_wxn for both arm32 and arm64. For arm64, the macro i

[PATCH v7 1/8] xen/arm: Split page table related code to mmu/pt.c

2023-10-08 Thread Henry Wang
The extraction of MMU related code is the basis of MPU support. This commit starts this work by firstly splitting the page table related code to mmu/pt.c, so that we will not end up with again massive mm.c files. Introduce a mmu specific directory and setup the Makefiles for it. Move the page tabl

[linux-linus test] 183321: tolerable FAIL - PUSHED

2023-10-08 Thread osstest service owner
flight 183321 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183321/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 183318 test-amd64-amd64-xl-qemuu-win7-amd64

[xen-unstable test] 183319: tolerable FAIL - PUSHED

2023-10-08 Thread osstest service owner
flight 183319 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183319/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-vhd 17 guest-start/debian.repeat fail in 183310 pass in 183319 test-armhf-armhf-xl

[ovmf test] 183320: all pass - PUSHED

2023-10-08 Thread osstest service owner
flight 183320 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183320/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 4ddd8ac3a29d9c5974a19f36c1dc5896d813dc6e baseline version: ovmf 5087a07736452518a508a

Re: [PATCH] xen-netback: use default TX queue size for vifs

2023-10-08 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by David S. Miller : On Thu, 5 Oct 2023 16:08:31 +0200 you wrote: > Do not set netback interfaces (vifs) default TX queue size to the ring size. > The TX queue size is not related to the ring size, and using the ring size > (32) > as the qu

[linux-linus test] 183318: tolerable FAIL - PUSHED

2023-10-08 Thread osstest service owner
flight 183318 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183318/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 183308 test-amd64-amd64-xl-qemuu-win7-amd64