Re: [PATCH v6 3/6] xen/arm: ffa: Introduce VM to VM support

2025-07-15 Thread Bertrand Marquis
Hi Julien, Sorry for the very long delay. > On 30 May 2025, at 23:00, Julien Grall wrote: > > Hi Bertrand, > > On 22/05/2025 16:08, Bertrand Marquis wrote: >> diff --git a/xen/arch/arm/tee/ffa_partinfo.c >> b/xen/arch/arm/tee/ffa_partinfo.c >> index dfa0b23eaf38..66ea1860e97a 100644 >> --- a/

[PATCH v8] xen/console: introduce domain_console struct

2025-07-15 Thread dmukhin
From: Denis Mukhin Introduce domain_console for grouping data structures used for integrating domain's diagnostic console with Xen's console driver. Group all pbuf-related data structures under domain_console. Rename the moved fields to plain .buf, .idx and .lock names, since all uses of the fi

Re: [RFC PATCH 0/3] Remove unused EFI runtime APIs

2025-07-15 Thread Ard Biesheuvel
On Wed, 16 Jul 2025 at 00:58, Sunil V L wrote: > > On Tue, Jul 15, 2025 at 01:29:15PM +1000, Ard Biesheuvel wrote: > > On Mon, 14 Jul 2025 at 18:11, Heinrich Schuchardt > > wrote: > > > > > > On 7/14/25 08:08, Ard Biesheuvel wrote: > > > > From: Ard Biesheuvel > > > > > > > > Using EFI runtime s

Re: [PATCH v8 0/7] xen: introduce CONFIG_SYSCTL

2025-07-15 Thread Stefano Stabellini
Heads up, I intend to commit this series shortly as it has been thoroughly reviewed by multiple people and has been on the list for a long time now. On Fri, 11 Jul 2025, Penny Zheng wrote: > It can be beneficial for some dom0less systems to further reduce Xen footprint > via disabling some hyperc

Re: [PATCH v1 0/9] mm: vm_normal_page*() improvements

2025-07-15 Thread Andrew Morton
On Tue, 15 Jul 2025 15:23:41 +0200 David Hildenbrand wrote: > Based on mm/mm-new. I dropped the CoW PFNMAP changes for now, still > working on a better way to sort all that out cleanly. > > Cleanup and unify vm_normal_page_*() handling, also marking the > huge zerofolio as special in the PMD. Ad

RE: Xen FuSa Upstream meeting

2025-07-15 Thread Stefano Stabellini
Hi Matt, It looks like your configuration is very similar to the one we are targeting for automotive and industrial with minor differences (e.g. scheduler control). We are well aligned. Cheers, Stefano On Tue, 15 Jul 2025, Weber (US), Matthew L wrote: > Looping the list in  @xen-devel@lists.xe

[PATCH] x86: Drop rep_nop() and use the PAUSE mnemonic directly

2025-07-15 Thread Andrew Cooper
In udelay(), use cpu_relax() directly which, for better or worse, is the common way to refer to the PAUSE instruction. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/delay.c | 2 +- xen/arch/x86/include/asm/processor

Re: [PATCH v2] hw/arm/xen-pvh: Remove unnecessary 'hw/xen/arch_hvm.h' header

2025-07-15 Thread Philippe Mathieu-Daudé
On 15/7/25 09:15, Philippe Mathieu-Daudé wrote: "hw/xen/arch_hvm.h" only declares the arch_handle_ioreq() and arch_xen_set_memory() prototypes, which are not used by xen-pvh.c. Remove the unnecessary header inclusion. Cc: Xiaoyao Li Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20250513

Re: [PATCH] hw/xen/arch_hvm: Unify x86 and ARM variants

2025-07-15 Thread Philippe Mathieu-Daudé
On 13/5/25 19:17, Philippe Mathieu-Daudé wrote: As each target declares the same prototypes, we can use a single header, removing the TARGET_XXX uses. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/xen_arch_hvm.h | 9 - include/hw/i386/xen_arch_hvm.h | 11 --- in

Re: [PATCH] xen/netfront: Fix TX response spurious interrupts

2025-07-15 Thread Elliott Mitchell
On Tue, Jul 15, 2025 at 08:21:40AM +, Anthoine Bourgeois wrote: > On Mon, Jul 14, 2025 at 05:37:51PM -0700, Elliott Mitchell wrote: > >On Mon, Jul 14, 2025 at 07:11:06AM +, Anthoine Bourgeois wrote: > >> On Fri, Jul 11, 2025 at 05:33:43PM +0200, Juergen Gross wrote: > >> >On 10.07.25 18:11,

Re: [MINI-OS PATCH v2 07/14] mini-os: kexec: add support for handing over some memory across kexec

2025-07-15 Thread Jason Andryuk
On 2025-07-15 09:29, Juergen Gross wrote: Especially for support of Xenstore-stubdom live update some memory must be handed over to the new kernel without moving it around: as the 9pfs device used for storing and retrieving the state of Xenstore needs to be kept operational across kexec (it can't

Re: [MINI-OS PATCH v2 01/14] mm: don't add module pages to free memory

2025-07-15 Thread Jason Andryuk
On 2025-07-15 09:29, Juergen Gross wrote: When initializing the memory allocator, don't add memory pages of modules and the initial boot info structure to the free memory. This is relevant only when running in PVH mode, as in PV mode only memory above the initial page tables is added to free mem

[PATCH v7 09/11] xen: Split HAS_DEVICE_TREE in two

2025-07-15 Thread Alejandro Vallejo
Moving forward the idea is for there to be: 1. Basic DT support: used by dom0less/hyperlaunch. 2. Full DT support: used for device discovery and HW setup. Rename HAS_DEVICE_TREE to HAS_DEVICE_TREE_DISCOVERY to describe (2) and create a new DEVICE_TREE_PARSE to describe (1). Have DEVICE_TREE_

[PATCH v7 11/11] xen/dt: Allow CONFIG_DEVICE_TREE_PARSE to include device-tree/

2025-07-15 Thread Alejandro Vallejo
This allows bootfdt.c and device-tree.c to be usable without CONFIG_HAS_DEVICE_TREE_DISCOVERY. Gate everything else on CONFIG_HAS_DEVICE_TREE_DISCOVERY. Signed-off-by: Alejandro Vallejo --- xen/common/Makefile | 2 +- xen/common/device-tree/Makefile | 4 +++- 2 files changed, 4 inse

[PATCH v7 10/11] xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h}

2025-07-15 Thread Alejandro Vallejo
Architectures that don't discover devices via DT may skip anything to do with device_t during the DT unflattening phase. Make device-tree.c stop requiring CONFIG_HAS_DEVICE_TREE_DISCOVERY so it may function with CONFIG_DEVICE_TREE_PARSE alone. This allows CONFIG_DEVICE_TREE_PARSE to unflatten a DT

[PATCH v7 08/11] xen/dt: Extract helper to map nodes to module kinds

2025-07-15 Thread Alejandro Vallejo
This will be required later by x86 code in order to do early identification of boot modules when booting off a DTB. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/common/device-tree/bootfdt.c | 18 ++ xen/common/device-tre

[PATCH v7 05/11] xen/dt: Move bootinfo functions to a new bootinfo.h

2025-07-15 Thread Alejandro Vallejo
Part of an unpicking process to extract bootfdt contents independent of bootinfo to a separate file for x86 to take. With this, bootfdt.h can be cleanly included from x86. A later patch extracts the definitions so the functions may be called too. Not a functional change. Signed-off-by: Alejandro

[PATCH v7 03/11] x86: Replace arch-specific boot_domain with the common one

2025-07-15 Thread Alejandro Vallejo
No functional change intended. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86/include/asm/boot-domain.h | 33 -- xen/arch/x86/include/asm/bootinfo.h| 1 - xen/arch/x86/pv/dom0_build.c

[PATCH v7 00/11] Allow x86 to unflatten DTs

2025-07-15 Thread Alejandro Vallejo
Hi, I've fixed a couple of issues with the 2 refactors. 1. The proposed fixup by Daniel went ahead and was lost on rebase. v7 includes it back. 2. The pre-requisite rename of bootfdt.c to bootinfo-fdt.c was mis-squashed on rebase too. This, too, has been restored to keep a tidier hi

[PATCH v7 01/11] x86: Replace arch-specific boot_module with common one

2025-07-15 Thread Alejandro Vallejo
These types resemble each other very closely in layout and intent, and with "struct boot_module" already in common code it makes perfect sense to merge them. In order to do so, rename identical fields with conflicting names. No functional change intended. Signed-off-by: Alejandro Vallejo Reviewe

[PATCH v7 06/11] xen/dt: Rename bootfdt.c -> bootinfo-fdt.c

2025-07-15 Thread Alejandro Vallejo
bootinfo-fdt.c will eventually contain bootfdt helpers that make heavy use of bootinfo. To simplify git history do the rename here explicitly. A later patch extracts bootinfo-independent helpers into bootfdt.c. Doing so here would needlessly pollute the diffs. Not a functional change. Signed-off

[PATCH v7 07/11] xen/dt: Extract bootinfo-independent functions to bootfdt.c

2025-07-15 Thread Alejandro Vallejo
Move all functions independent of "struct bootinfo" back to bootfdt.c Not a functional change. Signed-off-by: Alejandro Vallejo --- xen/common/device-tree/Makefile | 1 + xen/common/device-tree/bootfdt.c | 99 +++ xen/common/device-tree/bootinfo-fdt.c | 94 +-

[PATCH v7 02/11] xen: Refactor kernel_info to have a header like boot_domain

2025-07-15 Thread Alejandro Vallejo
Create a struct field within kernel_info with the contents common to kernel_info and boot_domain, and define that field in common code. This enables x86 to use that field as-is and drop x86's boot_domain. Note that x86 mutates the module when releasing it, calculating headroom, etc. So they must b

[PATCH v2] xen/netfront: Fix TX response spurious interrupts

2025-07-15 Thread Anthoine Bourgeois
We found at Vates that there are lot of spurious interrupts when benchmarking the PV drivers of Xen. This issue appeared with a patch that addresses security issue XSA-391 (see Fixes below). On an iperf benchmark, spurious interrupts can represent up to 50% of the interrupts. Spurious interrupts a

[PATCH v7 04/11] xen/dt: Move bootfdt functions to xen/bootfdt.h

2025-07-15 Thread Alejandro Vallejo
Part of an unpicking process to extract bootfdt contents independent of bootinfo to a separate file for x86 to take. Move functions required for early FDT parsing from device_tree.h and arm's setup.h onto bootfdt.h Declaration motion only. Not a functional change. Signed-off-by: Alejandro Vallej

Re: [PATCH v2] xen/arm: fix arm_iommu_map_page after f9f6b22ab

2025-07-15 Thread Stewart Hildebrand
On 7/14/25 18:47, Julien Grall wrote: > Hi Stewards, > > On 14/07/2025 22:12, Stewart Hildebrand wrote: >> On 7/12/25 06:08, Julien Grall wrote: >>> Hi Stefano, >>> >>> On 11/07/2025 01:25, Stefano Stabellini wrote: diff --git a/xen/drivers/passthrough/arm/iommu_helpers.c b/xen/drivers/

RE: Xen FuSa Upstream meeting

2025-07-15 Thread Weber (US), Matthew L
Looping the list in @xen-devel@lists.xenproject.org From: Weber (US), Matthew L Sent: Tuesday, July 15, 2025 10:16 AM To: Halder, Ayan Kumar ; Stabellini, Stefano ; Orzel, Michal ; Andryuk, Jason ; Garcia Vallejo, Alejandro Subject: RE: Xen FuSa Upstrea

Re: [PATCH v2 2/8] cxl: mce: Fix typo "notifer"

2025-07-15 Thread Dave Jiang
On 7/15/25 6:44 AM, WangYuli wrote: > According to the context, "mce_notifer" should be "mce_notifier". > > Link: > https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ > Fixes: 516e5bd0b6bf ("cxl: Add mce notifier to emit aliased address for > extended

Re: [RFC PATCH 0/3] Remove unused EFI runtime APIs

2025-07-15 Thread Sunil V L
On Tue, Jul 15, 2025 at 01:29:15PM +1000, Ard Biesheuvel wrote: > On Mon, 14 Jul 2025 at 18:11, Heinrich Schuchardt > wrote: > > > > On 7/14/25 08:08, Ard Biesheuvel wrote: > > > From: Ard Biesheuvel > > > > > > Using EFI runtime services to program the RTC to wake up the system is > > > supporte

Re: [PATCH v2 13/17] xen/riscv: Implement p2m_entry_from_mfn() and support PBMT configuration

2025-07-15 Thread Oleksii Kurochko
On 7/1/25 5:08 PM, Jan Beulich wrote: On 10.06.2025 15:05, Oleksii Kurochko wrote: --- a/xen/arch/riscv/p2m.c +++ b/xen/arch/riscv/p2m.c @@ -345,6 +345,26 @@ static pte_t *p2m_get_root_pointer(struct p2m_domain *p2m, gfn_t gfn) return __map_domain_page(p2m->root + root_table_indx); }

[PATCH v1 0/9] mm: vm_normal_page*() improvements

2025-07-15 Thread David Hildenbrand
This is the follow-up of [1]: [PATCH RFC 00/14] mm: vm_normal_page*() + CoW PFNMAP improvements Based on mm/mm-new. I dropped the CoW PFNMAP changes for now, still working on a better way to sort all that out cleanly. Cleanup and unify vm_normal_page_*() handling, also marking the huge ze

Re: [PATCH 0/9] Enable Xenstore-stubdom Live Update

2025-07-15 Thread Juergen Gross
On 02.07.25 10:12, Juergen Gross wrote: With this series applied I was able to perform Live Update of Xenstore running in a PVH stubdom. This series is based on a related Mini-OS patch series AND it needs the Mini-OS commit id updated accordingly in Config.mk. One relevant change in this series

Re: [PATCH v3 04/22] x86/boot/slaunch-early: implement early initialization

2025-07-15 Thread Sergii Dmytruk
On Thu, Jul 03, 2025 at 12:50:39PM +0200, Jan Beulich wrote: > As indicated in reply to patch 3 - imo all code additions here want to be > under some CONFIG_xyz. I repeat this here, but I don't think I'll repeat it > any further. I'll add one. In case this is problematic for some reason I want to

[PATCH v2 7/8] xen/xenbus: Fix typo "notifer"

2025-07-15 Thread WangYuli
There is a spelling mistake of 'notifer' in the comment which should be 'notifier'. Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Signed-off-by: WangYuli --- include/xen/xenbus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH v2 8/8] scripts/spelling.txt: Add notifer||notifier to spelling.txt

2025-07-15 Thread WangYuli
This typo was not listed in scripts/spelling.txt, thus it was more difficult to detect. Add it for convenience. Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Signed-off-by: WangYuli --- scripts/spelling.txt | 1 + 1 file changed, 1 insertion(

Re: [PATCH v2 8/8] scripts/spelling.txt: Add notifer||notifier to spelling.txt

2025-07-15 Thread Jonathan Cameron
On Tue, 15 Jul 2025 21:44:07 +0800 WangYuli wrote: > This typo was not listed in scripts/spelling.txt, thus it was more > difficult to detect. Add it for convenience. > > Link: > https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Adding a link tag to y

Re: [PATCH v2 2/8] cxl: mce: Fix typo "notifer"

2025-07-15 Thread Jonathan Cameron
On Tue, 15 Jul 2025 21:44:01 +0800 WangYuli wrote: > According to the context, "mce_notifer" should be "mce_notifier". > > Link: > https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ > Fixes: 516e5bd0b6bf ("cxl: Add mce notifier to emit aliased address f

[MINI-OS PATCH v2 13/14] 9pfs: add support to keep device opened across kexec

2025-07-15 Thread Juergen Gross
In order to support Xenstore-stubdom live update, the 9pfs device used to save and restore the Xenstore state needs to be kept open across kexec, as otherwise re-opening of the device using the new kernel would not work (this would require Xenstore to be active, which is obviously not possible befo

[MINI-OS PATCH v2 10/14] 9pfs: refactor init_9pfront()

2025-07-15 Thread Juergen Gross
Move the Xenstore and backend interface related handling into a sub-function in order to prepare supporting reconnecting to an active 9pfs device after kexec. Don't use gnttab_alloc_and_grant(), as this will hard code to use dom0 as backend. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryu

[PATCH v2 4/8] net: mvneta: Fix typo "notifer"

2025-07-15 Thread WangYuli
There is a spelling mistake of 'notifer' in the comment which should be 'notifier'. Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Signed-off-by: WangYuli --- drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH v2 6/8] serial: 8250_dw: Fix typo "notifer"

2025-07-15 Thread WangYuli
There is a spelling mistake of 'notifer' in the comment which should be 'notifier'. Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Signed-off-by: WangYuli --- drivers/tty/serial/8250/8250_dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 5/8] wifi: brcmfmac: Fix typo "notifer"

2025-07-15 Thread WangYuli
There is a spelling mistake of 'notifer' in the comment which should be 'notifier'. Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Signed-off-by: WangYuli --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed,

[PATCH v2 3/8] drm/xe: Fix typo "notifer"

2025-07-15 Thread WangYuli
There is a spelling mistake of 'notifer' in the comment which should be 'notifier'. Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Signed-off-by: WangYuli --- drivers/gpu/drm/xe/xe_vm_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH v2 2/8] cxl: mce: Fix typo "notifer"

2025-07-15 Thread WangYuli
According to the context, "mce_notifer" should be "mce_notifier". Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Fixes: 516e5bd0b6bf ("cxl: Add mce notifier to emit aliased address for extended linear cache") Signed-off-by: WangYuli --- drive

[PATCH v2 1/8] KVM: x86: Fix typo "notifer"

2025-07-15 Thread WangYuli
There are some spelling mistakes of 'notifer' which should be 'notifier'. Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ Signed-off-by: WangYuli --- arch/x86/kvm/i8254.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a

[MINI-OS PATCH v2 12/14] gnttab: add function to obtain memory address from grantref

2025-07-15 Thread Juergen Gross
Add a new function gnttab_get_addr() to obtain a memory pointer for a given grant reference. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- gnttab.c | 10 ++ include/gnttab.h | 1 + 2 files changed, 11 insertions(+) diff --git a/gnttab.c b/gnttab.c index 6bac0905.

[MINI-OS PATCH v2 14/14] events: export bind_evtchn()

2025-07-15 Thread Juergen Gross
Export the bind_evtchn() function, as it will be needed for reactivating events after kexec(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- events.c | 1 + 1 file changed, 1 insertion(+) diff --git a/events.c b/events.c index 9f3dbf05..a9c1ccac 100644 --- a/events.c +++ b/events

[PATCH v2 0/8] treewide: Fix typo "notifer"

2025-07-15 Thread WangYuli
There are some spelling mistakes of 'notifer' in comments which should be 'notifier'. Fix them and add it to scripts/spelling.txt. Link: https://lore.kernel.org/all/b3c019b63c93846f+20250715071245.398846-1-wangy...@uniontech.com/ WangYuli (8): KVM: x86: Fix typo "notifer" cxl: mce: Fix typo

[MINI-OS PATCH v2 11/14] gnttab: remove gnttab_alloc_and_grant() function

2025-07-15 Thread Juergen Gross
The last user of gnttab_alloc_and_grant() is gone. Remove gnttab_alloc_and_grant() as it is doing more harm than good. It is hard coded to only grant access for dom0, which is not really clear from looking at the function name. It would be possible to add a domid parameter, but given its now 0 use

[MINI-OS PATCH v2 07/14] mini-os: kexec: add support for handing over some memory across kexec

2025-07-15 Thread Juergen Gross
Especially for support of Xenstore-stubdom live update some memory must be handed over to the new kernel without moving it around: as the 9pfs device used for storing and retrieving the state of Xenstore needs to be kept operational across kexec (it can't be reopened due to Xenstore not being avail

[MINI-OS PATCH v2 06/14] mini-os: config: add support for config items with numerical values

2025-07-15 Thread Juergen Gross
Add support for a Mini-OS config file containing config items with numerical values, e.g. CONFIG_FOO=7. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- Config.mk | 4 1 file changed, 4 insertions(+) diff --git a/Config.mk b/Config.mk index e2afb1b4..b9675e61 100644 --- a/Config.

[MINI-OS PATCH v2 08/14] kexec: add support for allocating pages from kexec module memory

2025-07-15 Thread Juergen Gross
Add the needed functions for allocating and freeing memory pages of the kexec module. As the pages are always related to a kexec module record, add the related utility functions, too. For now only support adding records and retrieving them. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

[MINI-OS PATCH v2 05/14] e820: use special type for software reserved memory

2025-07-15 Thread Juergen Gross
For memory areas used to map foreign domain memory Mini-OS is using the type E820_RESERVED in the memory map today. This is causing problems with kexec, as the new kernel should not see those areas in the memory map. Unfortunately the sequence of actions for calculating the size of the memory map a

[MINI-OS PATCH v2 09/14] 9pfs: store bepath in struct struct dev_9pfs

2025-07-15 Thread Juergen Gross
Use struct dev_9pfs for storing the backend path of the device state in order to avoid code duplication in init_9pfront() and shutdown_9pfront(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- 9pfront.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-)

[MINI-OS PATCH v2 04/14] kexec: restructure building the start info data

2025-07-15 Thread Juergen Gross
Instead of setting most of the struct hvm_start_info fields first and then building the leaf data, restructure kexec_get_entry() by using an opaque "next" pointer where the next leaf data will be stored and handle that leaf data together with the associated hvm_start_info fields. This will make it

[MINI-OS PATCH v2 02/14] kexec: fix physical addresses in start info data

2025-07-15 Thread Juergen Gross
The physical addresses in struct hvm_start_info are pointing to the memory where the data is being built instead of the location where it will finally be moved to. Fix that. Additionally rename kexec_param_loc to kexec_param_pa to better reflect the semantics of the variable. Fixes: b7994b6409a4

[MINI-OS PATCH v2 00/14] Make Xenstore-stubdom live update possible

2025-07-15 Thread Juergen Gross
With this series applied I was able to perform Live Update of Xenstore running in a PVH stubdom. The main problem to solve was to keep the 9pfs device used to store and later retrieve the Xenstore state usable across kexec(). This has been achieved by using a module containing the shared pages of

[MINI-OS PATCH v2 03/14] e820: don't count lapic page as initially reserved

2025-07-15 Thread Juergen Gross
The number of pages marked initially as reserved in the memory map are counted to be allocated, as they are normally populated by Xen tools for e.g. xenbus and console ring pages. This is wrong in case the lapic page is marked as reserved in the memory map, as there is never memory allocated for a

[MINI-OS PATCH v2 01/14] mm: don't add module pages to free memory

2025-07-15 Thread Juergen Gross
When initializing the memory allocator, don't add memory pages of modules and the initial boot info structure to the free memory. This is relevant only when running in PVH mode, as in PV mode only memory above the initial page tables is added to free memory, and the module and start_info pages are

[PATCH v1 6/9] mm/memory: convert print_bad_pte() to print_bad_page_map()

2025-07-15 Thread David Hildenbrand
print_bad_pte() looks like something that should actually be a WARN or similar, but historically it apparently has proven to be useful to detect corruption of page tables even on production systems -- report the issue and keep the system running to make it easier to actually detect what is going wr

[PATCH v1 8/9] mm: introduce and use vm_normal_page_pud()

2025-07-15 Thread David Hildenbrand
Let's introduce vm_normal_page_pud(), which ends up being fairly simple because of our new common helpers and there not being a PUD-sized zero folio. Use vm_normal_page_pud() in folio_walk_start() to resolve a TODO, structuring the code like the other (pmd/pte) cases. Defer introducing vm_normal_f

[PATCH v1 4/9] fs/dax: use vmf_insert_folio_pmd() to insert the huge zero folio

2025-07-15 Thread David Hildenbrand
Let's convert to vmf_insert_folio_pmd(). There is a theoretical change in behavior: in the unlikely case there is already something mapped, we'll now still call trace_dax_pmd_load_hole() and return VM_FAULT_NOPAGE. Previously, we would have returned VM_FAULT_FALLBACK, and the caller would have za

[PATCH v1 1/9] mm/huge_memory: move more common code into insert_pmd()

2025-07-15 Thread David Hildenbrand
Let's clean it all further up. No functional change intended. Reviewed-by: Oscar Salvador Reviewed-by: Alistair Popple Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 72 1 file changed, 24 insertions(+), 48 deletions(-) diff --git a/m

[PATCH v1 7/9] mm/memory: factor out common code from vm_normal_page_*()

2025-07-15 Thread David Hildenbrand
Let's reduce the code duplication and factor out the non-pte/pmd related magic into vm_normal_page_pfn(). To keep it simpler, check the pfn against both zero folios. We could optimize this, but as it's only for the !CONFIG_ARCH_HAS_PTE_SPECIAL case, it's not a compelling micro-optimization. With

[PATCH v1 9/9] mm: rename vm_ops->find_special_page() to vm_ops->find_normal_page()

2025-07-15 Thread David Hildenbrand
... and hide it behind a kconfig option. There is really no need for any !xen code to perform this check. The naming is a bit off: we want to find the "normal" page when a PTE was marked "special". So it's really not "finding a special" page. Improve the documentation, and add a comment in the co

[PATCH v1 2/9] mm/huge_memory: move more common code into insert_pud()

2025-07-15 Thread David Hildenbrand
Let's clean it all further up. No functional change intended. Reviewed-by: Oscar Salvador Reviewed-by: Alistair Popple Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 36 +--- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/mm/huge_memor

[PATCH v1 5/9] mm/huge_memory: mark PMD mappings of the huge zero folio special

2025-07-15 Thread David Hildenbrand
The huge zero folio is refcounted (+mapcounted -- is that a word?) differently than "normal" folios, similarly (but different) to the ordinary shared zeropage. For this reason, we special-case these pages in vm_normal_page*/vm_normal_folio*, and only allow selected callers to still use them (e.g.,

[PATCH v1 3/9] mm/huge_memory: support huge zero folio in vmf_insert_folio_pmd()

2025-07-15 Thread David Hildenbrand
Just like we do for vmf_insert_page_mkwrite() -> ... -> insert_page_into_pte_locked() with the shared zeropage, support the huge zero folio in vmf_insert_folio_pmd(). When (un)mapping the huge zero folio in page tables, we neither adjust the refcount nor the mapcount, just like for the shared zero

Re: [MINI-OS PATCH 17/19] gnttab: add function to obtain memory address from grantref

2025-07-15 Thread Juergen Gross
On 14.07.25 23:23, Jason Andryuk wrote: On 2025-07-02 04:12, Juergen Gross wrote: Add a new function gnttab_get_addr() to obtain a memory pointer for a given grant reference. Signed-off-by: Juergen Gross Maybe you want to name it gnttab_get_vaddr() to be a little more explicit in its return

Re: [PATCH v2] x86/PVH: modify permission checking in hwdom_fixup_p2m()

2025-07-15 Thread Jan Beulich
On 15.07.2025 13:04, Roger Pau Monné wrote: > On Tue, Jul 15, 2025 at 12:47:15PM +0200, Jan Beulich wrote: >> On 15.07.2025 12:09, Roger Pau Monné wrote: >>> On Mon, Jul 14, 2025 at 06:09:27PM +0200, Jan Beulich wrote: We're generally striving to minimize behavioral differences between PV

Re: [PATCH v2] x86/PVH: modify permission checking in hwdom_fixup_p2m()

2025-07-15 Thread Roger Pau Monné
On Tue, Jul 15, 2025 at 12:47:15PM +0200, Jan Beulich wrote: > On 15.07.2025 12:09, Roger Pau Monné wrote: > > On Mon, Jul 14, 2025 at 06:09:27PM +0200, Jan Beulich wrote: > >> We're generally striving to minimize behavioral differences between PV > >> and PVH Dom0. Using is_memory_hole() in the PV

Re: [XEN PATCH v2 3/3] eclair: add deviations of MISRA C Rule 5.5

2025-07-15 Thread Jan Beulich
On 15.07.2025 12:07, Dmytro Prokopchuk1 wrote: > ARM only are: > -config=MC3A2.R5.5,reports+={deliberate, > "any_area(all_loc(file(^xen/include/xen/bitops\\.h$)))"} This one's probably fine. > -config=MC3A2.R5.5,reports+={deliberate, > "all_area(decl(name(parse_gnttab_limit))||macro(name(parse_

Re: [PATCH v2] x86/PVH: modify permission checking in hwdom_fixup_p2m()

2025-07-15 Thread Jan Beulich
On 15.07.2025 12:09, Roger Pau Monné wrote: > On Mon, Jul 14, 2025 at 06:09:27PM +0200, Jan Beulich wrote: >> We're generally striving to minimize behavioral differences between PV >> and PVH Dom0. Using is_memory_hole() in the PVH case looks quite a bit >> weaker to me, compared to the page owners

Re: [XEN PATCH v2 3/3] eclair: add deviations of MISRA C Rule 5.5

2025-07-15 Thread Dmytro Prokopchuk1
On 7/15/25 13:39, Jan Beulich wrote: > On 15.07.2025 12:07, Dmytro Prokopchuk1 wrote: >> ARM only are: >> -config=MC3A2.R5.5,reports+={deliberate, >> "any_area(all_loc(file(^xen/include/xen/bitops\\.h$)))"} >> -config=MC3A2.R5.5,reports+={deliberate, >> "all_area(decl(name(parse_gnttab_limit))||m

Re: [XEN PATCH v2 3/3] eclair: add deviations of MISRA C Rule 5.5

2025-07-15 Thread Jan Beulich
On 15.07.2025 12:07, Dmytro Prokopchuk1 wrote: > ARM only are: > -config=MC3A2.R5.5,reports+={deliberate, > "any_area(all_loc(file(^xen/include/xen/bitops\\.h$)))"} > -config=MC3A2.R5.5,reports+={deliberate, > "all_area(decl(name(parse_gnttab_limit))||macro(name(parse_gnttab_limit)))"} > -config=

Re: [PATCH v2] x86/PVH: modify permission checking in hwdom_fixup_p2m()

2025-07-15 Thread Roger Pau Monné
On Mon, Jul 14, 2025 at 06:09:27PM +0200, Jan Beulich wrote: > We're generally striving to minimize behavioral differences between PV > and PVH Dom0. Using is_memory_hole() in the PVH case looks quite a bit > weaker to me, compared to the page ownership check done in the PV case. > Change checking

Re: [XEN PATCH v2 3/3] eclair: add deviations of MISRA C Rule 5.5

2025-07-15 Thread Dmytro Prokopchuk1
ARM only are: -config=MC3A2.R5.5,reports+={deliberate, "any_area(all_loc(file(^xen/include/xen/bitops\\.h$)))"} -config=MC3A2.R5.5,reports+={deliberate, "all_area(decl(name(parse_gnttab_limit))||macro(name(parse_gnttab_limit)))"} -config=MC3A2.R5.5,reports+={deliberate, "all_area(decl(name(updat

Re: [XEN PATCH v5] misra: address violation of MISRA C Rule 10.1

2025-07-15 Thread Jan Beulich
On 15.07.2025 11:31, Dmytro Prokopchuk1 wrote: > Rule 10.1: Operands shall not be of an > inappropriate essential type > > The following are non-compliant: > - boolean used as a numeric value. > > The result of the '__isleap' macro is a boolean. > Suppress analyser tool finding. > > The result o

Re: [XEN PATCH v2 3/3] eclair: add deviations of MISRA C Rule 5.5

2025-07-15 Thread Jan Beulich
On 15.07.2025 11:46, Dmytro Prokopchuk1 wrote: > Could we proceed with ARM deviations only so far? > I understand Stefano's preferences, but it can unblock me to address > next ARM violations. Hmm, ... > On 7/14/25 10:55, Jan Beulich wrote: >> On 12.07.2025 03:13, Stefano Stabellini wrote: >>> O

Re: [PATCH v3 1/6] arm/mpu: Find MPU region by range

2025-07-15 Thread Orzel, Michal
On 15/07/2025 11:48, Hari Limaye wrote: > Hi Michal, > >> On 15 Jul 2025, at 09:45, Orzel, Michal wrote: >> >> >> >> On 15/07/2025 10:36, Hari Limaye wrote: >>> Hi Michal, >>> > +int mpumap_contains_region(pr_t *table, uint8_t nr_regions, paddr_t base, > + pad

Re: [PATCH v3 1/6] arm/mpu: Find MPU region by range

2025-07-15 Thread Hari Limaye
Hi Michal, > On 15 Jul 2025, at 09:45, Orzel, Michal wrote: > > > > On 15/07/2025 10:36, Hari Limaye wrote: >> Hi Michal, >> +int mpumap_contains_region(pr_t *table, uint8_t nr_regions, paddr_t base, + paddr_t limit, uint8_t *index) +{ +ASSERT

Re: [XEN PATCH v2 3/3] eclair: add deviations of MISRA C Rule 5.5

2025-07-15 Thread Dmytro Prokopchuk1
Hi Jan and Stefano. Could we proceed with ARM deviations only so far? I understand Stefano's preferences, but it can unblock me to address next ARM violations. BR, Dmytro. On 7/14/25 10:55, Jan Beulich wrote: > On 12.07.2025 03:13, Stefano Stabellini wrote: >> On Fri, 11 Jul 2025, Nicola Vetrin

[XEN PATCH v5] misra: address violation of MISRA C Rule 10.1

2025-07-15 Thread Dmytro Prokopchuk1
Rule 10.1: Operands shall not be of an inappropriate essential type The following are non-compliant: - boolean used as a numeric value. The result of the '__isleap' macro is a boolean. Suppress analyser tool finding. The result of 'NOW() > timeout' is a boolean, which is compared to a numeric va

Re: [XEN PATCH v2] xen/arinc653: fix delay in the start of major frame

2025-07-15 Thread Jan Beulich
On 15.07.2025 10:57, Choi, Anderson wrote: >>> Signed-off-by: Anderson Choi >>> Suggested-by: Nathan Studer >> >> Nit: (Most) tags in chronological order, please. >> > > Sorry, I'm not fully familiar with the revisioning / upstreaming process yet. > > In this case, what would be the most approp

Re: [MINI-OS PATCH 12/19] mini-os: kexec: add support for handing over some memory across kexec

2025-07-15 Thread Juergen Gross
On 14.07.25 23:22, Jason Andryuk wrote: On 2025-07-11 03:49, Jürgen Groß wrote: On 11.07.25 01:21, Jason Andryuk wrote: On 2025-07-02 04:12, Juergen Gross wrote: Especially for support of Xenstore-stubdom live update some memory must be handed over to the new kernel without moving it around: a

RE: Re: [XEN PATCH v2] xen/arinc653: fix delay in the start of major frame

2025-07-15 Thread Choi, Anderson
Jan, >> Signed-off-by: Anderson Choi >> Suggested-by: Nathan Studer > > Nit: (Most) tags in chronological order, please. > Sorry, I'm not fully familiar with the revisioning / upstreaming process yet. In this case, what would be the most appropriate action? 1. Create a v3 patch? 2. Send the

Re: [PATCH v3 3/6] arm/mpu: Populate a new region in Xen MPU mapping table

2025-07-15 Thread Orzel, Michal
On 15/07/2025 10:51, Hari Limaye wrote: > Hi Michal. > >>> +if ( base >= limit ) >> Given that limit is exclusive, to prevent empty regions, you would need to >> check >> for base >= (limit - 1), even though it's not really possible because today >> we >> require page aligned addresses (l

Re: [PATCH v3 4/6] arm/mpu: Destroy an existing entry in Xen MPU memory mapping table

2025-07-15 Thread Orzel, Michal
On 15/07/2025 09:45, Hari Limaye wrote: > From: Penny Zheng > > This commit expands xen_mpumap_update/xen_mpumap_update_entry to include > destroying an existing entry. > > We define a new helper "disable_mpu_region_from_index" to disable the MPU > region based on index. If region is within [

Re: [PATCH v3 3/6] arm/mpu: Populate a new region in Xen MPU mapping table

2025-07-15 Thread Hari Limaye
Hi Michal. >> +if ( base >= limit ) > Given that limit is exclusive, to prevent empty regions, you would need to > check > for base >= (limit - 1), even though it's not really possible because today we > require page aligned addresses (limit must be at least bigger or equal than > base > + P

Re: [PATCH v3 1/6] arm/mpu: Find MPU region by range

2025-07-15 Thread Orzel, Michal
On 15/07/2025 10:36, Hari Limaye wrote: > Hi Michal, > >>> +int mpumap_contains_region(pr_t *table, uint8_t nr_regions, paddr_t base, >>> + paddr_t limit, uint8_t *index) >>> +{ >>> +ASSERT(index); >>> +*index = INVALID_REGION_IDX; >>> + >>> +/* >>> + *

Re: [PATCH v3 1/6] arm/mpu: Find MPU region by range

2025-07-15 Thread Hari Limaye
Hi Michal, >> +int mpumap_contains_region(pr_t *table, uint8_t nr_regions, paddr_t base, >> + paddr_t limit, uint8_t *index) >> +{ >> +ASSERT(index); >> +*index = INVALID_REGION_IDX; >> + >> +/* >> + * The caller supplies a half-open interval [base, limit)

[PATCH v9 6/6] tools/ocaml: Add altp2m_count parameter

2025-07-15 Thread Petr Beneš
From: Petr Beneš Allow developers using the OCaml bindings to set the altp2m_count parameter. Signed-off-by: Petr Beneš Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 19 +

[PATCH v9 4/6] tools/libxl: Activate the altp2m_count feature

2025-07-15 Thread Petr Beneš
From: Petr Beneš This commit activates the previously introduced altp2m_count parameter, establishing the connection between libxl and Xen. Signed-off-by: Petr Beneš Acked-by: Anthony PERARD --- tools/libs/light/libxl_create.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/libs

[PATCH v9 1/6] tools/xl: Add altp2m_count parameter

2025-07-15 Thread Petr Beneš
From: Petr Beneš Introduce a new altp2m_count parameter to control the maximum number of altp2m views a domain can use. By default, if altp2m_count is unspecified and altp2m is enabled, the value is set to 10, reflecting the legacy behavior. This change is preparatory; it establishes the groundw

[PATCH v9 2/6] docs/man: Add altp2m_count parameter to the xl.cfg manual

2025-07-15 Thread Petr Beneš
From: Petr Beneš Update manual pages to include detailed information about the altp2m_count configuration parameter. Signed-off-by: Petr Beneš Acked-by: Anthony PERARD --- docs/man/xl.cfg.5.pod.in | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/d

[PATCH v9 3/6] xen: Make the maximum number of altp2m views configurable for x86

2025-07-15 Thread Petr Beneš
From: Petr Beneš This commit introduces the ability to configure the maximum number of altp2m views for the domain during its creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. Th

[PATCH v9 5/6] xen/x86: Disallow creating domains with altp2m enabled and altp2m.nr == 0

2025-07-15 Thread Petr Beneš
From: Petr Beneš Since libxl finally sends the altp2m.nr value, we can remove the previously introduced temporary workaround. Creating domain with enabled altp2m while setting altp2m.nr == 0 doesn't make sense and it's probably not what user wants. Signed-off-by: Petr Beneš Acked-by: Jan Beuli

[PATCH v9 0/6] x86: Make MAX_ALTP2M configurable

2025-07-15 Thread Petr Beneš
From: Petr Beneš This series introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. This enhancem

Re: [PATCH v8 0/7] x86: Make MAX_ALTP2M configurable

2025-07-15 Thread Petr Beneš
On Tue, Jul 15, 2025 at 10:15 AM Jan Beulich wrote: > Hmm, sorry, two of them were indeed reverted. I simply didn't remember, and > checked only for patches authored by you. Patch 1 wasn't reverted, though? Huh, you're right, I missed that. > And then, as to patch 2 (which was the problematic on

Re: [PATCH] xen/netfront: Fix TX response spurious interrupts

2025-07-15 Thread Anthoine Bourgeois
On Mon, Jul 14, 2025 at 05:37:51PM -0700, Elliott Mitchell wrote: >On Mon, Jul 14, 2025 at 07:11:06AM +, Anthoine Bourgeois wrote: >> On Fri, Jul 11, 2025 at 05:33:43PM +0200, Juergen Gross wrote: >> >On 10.07.25 18:11, Anthoine Bourgeois wrote: > >Tested on a VM which this could be tried on. >

  1   2   >