Re: [PATCH] misra: fix violations in macros GVA_INFO, TRACE_TIME

2025-07-31 Thread Jürgen Groß
On 31.07.25 17:32, Jan Beulich wrote: On 31.07.2025 17:16, Dmytro Prokopchuk1 wrote: --- a/xen/arch/arm/guestcopy.c +++ b/xen/arch/arm/guestcopy.c @@ -109,27 +109,31 @@ static unsigned long copy_guest(void *buf, uint64_t addr, unsigned int len, unsigned long raw_copy_to_guest(void *to, con

Re: [XEN][PATCH v2 1/2] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-31 Thread Jürgen Groß
On 31.07.25 11:25, Grygorii Strashko wrote: Hi Juergen, Dario, George, Sorry that disturbing you. Would it be possible to take a look at this patch as it has change in common/sched/core.c? On 18.07.25 13:11, Grygorii Strashko wrote: From: Grygorii Strashko On platforms without PIRQ support e

Re: [PATCH v3] x86/hvm: Replace do_sched_op calls with their underlying logic

2025-07-31 Thread Jürgen Groß
On 31.07.25 11:10, Teddy Astie wrote: do_sched_op(SCHEDOP_yield) just calls vcpu_yield(). Remove the indirection through the hypercall handler and use the function directly. Export vcpu_block_enable_events() to perform the same for SCHEDOP_block. Not a functional change. Signed-off-by: Teddy A

Re: [PATCH v2 7/7] tools: allow to limit xenstore features via guest config

2025-07-30 Thread Jürgen Groß
On 30.07.25 18:21, Anthony PERARD wrote: On Fri, Jul 25, 2025 at 03:19:28PM +0200, Juergen Gross wrote: diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c index a61085ca3b..2a7923533f 100644 --- a/tools/libs/light/libxl_dom.c +++ b/tools/libs/light/libxl_dom.c @@ -494,6 +49

Re: [PATCH v3 1/9] xenstored: use fread() instead of mmap() for reading live update state

2025-07-30 Thread Jürgen Groß
On 30.07.25 16:38, Jan Beulich wrote: On 30.07.2025 14:22, Juergen Gross wrote: Mini-OS doesn't support using mmap() for accessing a file. In order to support reading the live update state from a 9pfs based file, use fread() instead of mmap(). While adding the offset member to lu_state, change

Re: [PATCH v2 1/9] xenstored: use fread() instead of mmap() for reading live update state

2025-07-29 Thread Jürgen Groß
On 29.07.25 21:25, Andrew Cooper wrote: On 29/07/2025 8:21 pm, Andrew Cooper wrote: On 29/07/2025 12:01 pm, Juergen Gross wrote: diff --git a/tools/xenstored/lu.c b/tools/xenstored/lu.c index 77e0d377c5..f2c8b92d07 100644 --- a/tools/xenstored/lu.c +++ b/tools/xenstored/lu.c @@ -27,9 +27,11 @@

Re: [PATCH v2 5/9] tools/libxenevtchn: add xenevtchn_bind() under Mini-OS

2025-07-29 Thread Jürgen Groß
On 29.07.25 19:00, Anthony PERARD wrote: On Tue, Jul 29, 2025 at 01:01:41PM +0200, Juergen Gross wrote: In order to reactivate an event channel after kexec() of Mini-OS, libxenevtchn needs to allocate the port data for the event channel and set the handler again. Add a new interface xenevtchn_bi

Re: [MINI-OS PATCH v2 2/2] x86: don't use a memory page for mapping the shared info page

2025-07-29 Thread Jürgen Groß
On 29.07.25 11:00, Jan Beulich wrote: On 29.07.2025 10:38, Juergen Gross wrote: --- a/arch/x86/x86_64.S +++ b/arch/x86/x86_64.S @@ -33,13 +33,8 @@ _start: stack_start: .quad stack+(2*__STACK_SIZE) -.globl shared_info, hypercall_page -/* Unpleasant -- the PTE that maps thi

Re: [MINI-OS PATCH v2 1/2] mm: provide a way to do very early page table allocations

2025-07-29 Thread Jürgen Groß
On 29.07.25 10:52, Jan Beulich wrote: On 29.07.2025 10:38, Juergen Gross wrote: --- a/arch/x86/mm.c +++ b/arch/x86/mm.c @@ -640,13 +640,20 @@ void change_readonly(bool readonly) /* * return a valid PTE for a given virtual address. If PTE does not exist, * allocate page-table pages. + * P

Re: [MINI-OS PATCH 2/2] x86: don't use a memory page for mapping the shared info page

2025-07-28 Thread Jürgen Groß
On 28.07.25 16:21, Jan Beulich wrote: On 08.07.2025 08:37, Juergen Gross wrote: --- a/hypervisor.c +++ b/hypervisor.c @@ -27,8 +27,10 @@ #include #include +#include #include #include +#include #include EXPORT_SYMBOL(hypercall_page); @@ -37,7 +39,8 @@ EXPORT_SYMBOL(hype

Re: [MINI-OS PATCH 1/2] mm: provide a way to do very early page table allocations

2025-07-28 Thread Jürgen Groß
On 28.07.25 16:09, Jan Beulich wrote: On 08.07.2025 08:37, Juergen Gross wrote: Add a small pool of statically allocated memory pages to be handed out for very early page table allocations. This will make it possible to do virtual allocations e.g. for mapping the shared info page. Signed-off-b

Re: [PATCH v5 10/11] tools/xenstored: Remove stubdom special casing

2025-07-28 Thread Jürgen Groß
On 26.07.25 01:58, Jason Andryuk wrote: posix.c and minios.c implement the same named functions serving slightly different purposes. For xenbus_map() posix.c maps the local /dev/xen/xsd_kva minios.c maps dom0 via grant and there is open coding for stub_domid in map_interface. Change xenbus_map(

Re: [PATCH v5 09/11] tools/xenstored: Rename dom0_domid to store_domid

2025-07-28 Thread Jürgen Groß
On 26.07.25 01:58, Jason Andryuk wrote: The dom0_domid variable is misnamed and conflates purposes. If we have xenstored running in a Linux domain that is not dom0, this variable controls the lookup of /proc/xen/xsd_kva and the event channel. Rename to store_domid to better show its purpose. O

Re: [PATCH v5 08/11] tools/xenstored: Use priv_domid for manual nodes and permission

2025-07-28 Thread Jürgen Groß
On 26.07.25 01:58, Jason Andryuk wrote: Usually, priv_domid == dom0_domid == 0, and that is what is expected. If we rename s/dom0_domid/store_domid/, it seems more likely we want to actually have the priv_domid as the owner. That leads to follow on changes to ensure that the priv_domid is create

Re: [PATCH v5 08/11] tools/xenstored: Use priv_domid for manual nodes and permission

2025-07-28 Thread Jürgen Groß
On 26.07.25 01:58, Jason Andryuk wrote: Usually, priv_domid == dom0_domid == 0, and that is what is expected. If we rename s/dom0_domid/store_domid/, it seems more likely we want to actually have the priv_domid as the owner. That leads to follow on changes to ensure that the priv_domid is create

Re: [PATCH v5 07/11] tools/xenstored: Auto-introduce domains

2025-07-28 Thread Jürgen Groß
On 26.07.25 01:58, Jason Andryuk wrote: Replace dom0_init() with init_domains() which uses libxenmanage to iterate through all existing domains, storing them in a list. The xenstore domain is introduced first, and then all the other domains are introduced. The xenstore domain needs to be introd

Re: [PATCH v5 06/11] tools/xenstored: Add get_domain_evtchn() to find evtchn

2025-07-28 Thread Jürgen Groß
On 26.07.25 01:58, Jason Andryuk wrote: Add helpers to lookup the event channel for a domid. This hides some of the differences between dom0 and stubdom xenstored. Each version defines its own. It highlights the different meanings between get_xenbus_evtchn() in a stubdom, where it looks up dom

Re: [PATCH] xen: Rename xenmem_reservation_increase to xenmem_populate_physmap

2025-07-27 Thread Jürgen Groß
On 25.07.25 12:12, Teddy Astie wrote: xenmem_reservation_increase currently calls XENMEM_populate_physmap. Rename the function to avoid confusion with XENMEM_increase_reservation. Hmm, I'm not convinced this is a good move. xenmem_reservation_increase() has the counterpart xenmem_reservation_d

Re: [PATCH] xen/credit2: factor in previous active unit's credit in csched2_runtime()

2025-07-25 Thread Jürgen Groß
On 21.06.25 16:14, Koichiro Den wrote: When a running unit is about to be scheduled out due to a competing unit with the highest remaining credit, the residual credit of the previous unit is currently ignored in csched2_runtime() because it hasn't yet been reinserted into the runqueue. As a resu

Re: [PATCH v4 12/12] tools/xenstored: Remove hardcoded implicit path

2025-07-25 Thread Jürgen Groß
On 25.07.25 04:28, Jason Andryuk wrote: Update get_implicit_path to return the correct value for a non-dom0 xenstored domain. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description

Re: [PATCH v4 11/12] tools/xenstored: Rename xenbus_master_domid -> xenbus_store_domain

2025-07-25 Thread Jürgen Groß
On 25.07.25 04:28, Jason Andryuk wrote: Rename the helper that access store_domid accordingly. While doing this, rename the is_store_domain variable. No functional change. Signed-off-by: Jason Andryuk With my remark on the previous patch this one can just be dropped. Juergen OpenPGP_0xB

Re: [PATCH v4 10/12] tools/xenstored: Rename dom0_domid to store_domid

2025-07-25 Thread Jürgen Groß
On 25.07.25 04:28, Jason Andryuk wrote: The dom0_domid variable is misnamed and conflates purposes. If we have xenstored running in a Linux domain that is not dom0, this variable controls the lookup of /proc/xen/xsd_kva and the event channel. One implication of this change is that the xenstore

Re: [PATCH v4 09/12] tools/xenstored: Use priv_domid for manual nodes and permission

2025-07-25 Thread Jürgen Groß
On 25.07.25 04:28, Jason Andryuk wrote: Usually, priv_domid == dom0_domid == 0, and that is what is expected. If we rename s/dom0_domid/store_domid/, it seems more likely we want to actually have the priv_domid as the owner. Yes, I agree. That leads to follow on changes to ensure that the pr

Re: [PATCH v4 08/12] tools/xenstored: Remove stubdom special casing

2025-07-25 Thread Jürgen Groß
On 25.07.25 04:28, Jason Andryuk wrote: posix.c and minios.c implement the same named functions serving slightly different purposes. For xenbus_map() posix.c maps the local /dev/xen/xsd_kva minios.c maps dom0 via grant and there is open coding for stub_domid in map_interface. Change xenbus_map(

Re: [PATCH v4 07/12] tools/xenstored: Auto-introduce domains

2025-07-25 Thread Jürgen Groß
On 25.07.25 04:28, Jason Andryuk wrote: Replace dom0_init() with init_domains() which uses libxenmanage to iterate through all existing domains, storing them in a list. The xenstore domain is introduced first, and then all the other domains are introduced. The xenstore domain needs to be introd

Re: [PATCH v4 06/12] tools/xenstored: Add get_domain_evtchn() to find evtchn

2025-07-24 Thread Jürgen Groß
On 25.07.25 04:28, Jason Andryuk wrote: Add a helper to lookup the event channel for a domid. This hides some of the differences between dom0 and stubdom xenstored. It highlights the different meanings between get_xenbus_evtchn() in a stubdom, where it looks up dom0's event channel, and dom0, w

Re: [PATCH v4 05/12] tools/xenstored: Read event channel from xenstored page

2025-07-24 Thread Jürgen Groß
On 25.07.25 04:28, Jason Andryuk wrote: Make introduce_domain() use an event channel from the the xenstore page. It is only used if non-zero. Otherwise the passed in event channel port is used. The is useful for a xenstored stubdom to configure domains autonomously. Signed-off-by: Jason Andryu

Re: [PATCH 4/7] tools/xenstored: add server feature support

2025-07-24 Thread Jürgen Groß
On 25.07.25 00:48, Jason Andryuk wrote: On 2025-07-22 10:06, Juergen Gross wrote: Add per domain server features, which are initialized by the supported features at domain introduction, or by live update from the migration stream. This requires to add the DOMAIN_DATA record to the migration st

Re: [PATCH v3 1/2] xen: Add capabilities to get_domain_state

2025-07-23 Thread Jürgen Groß
On 23.07.25 09:04, Jan Beulich wrote: On 23.07.2025 08:55, Jürgen Groß wrote: On 23.07.25 08:43, Jan Beulich wrote: On 23.07.2025 08:34, Jürgen Groß wrote: On 23.07.25 08:28, Jan Beulich wrote: On 22.07.2025 02:19, Jason Andryuk wrote: --- a/xen/common/domain.c +++ b/xen/common/domain.c

Re: [PATCH v3 1/2] xen: Add capabilities to get_domain_state

2025-07-22 Thread Jürgen Groß
On 23.07.25 08:43, Jan Beulich wrote: On 23.07.2025 08:34, Jürgen Groß wrote: On 23.07.25 08:28, Jan Beulich wrote: On 22.07.2025 02:19, Jason Andryuk wrote: --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -195,6 +195,14 @@ static void set_domain_state_info(struct

Re: [PATCH v3 1/2] xen: Add capabilities to get_domain_state

2025-07-22 Thread Jürgen Groß
On 23.07.25 08:25, Jan Beulich wrote: On 22.07.2025 14:09, Jason Andryuk wrote: On 2025-07-21 20:19, Jason Andryuk wrote: Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropria

Re: [PATCH v3 1/2] xen: Add capabilities to get_domain_state

2025-07-22 Thread Jürgen Groß
On 23.07.25 08:28, Jan Beulich wrote: On 22.07.2025 02:19, Jason Andryuk wrote: --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -195,6 +195,14 @@ static void set_domain_state_info(struct xen_domctl_get_domain_state *info, info->state |= XEN_DOMCTL_GETDOMSTATE_STATE_DYING;

Re: [PATCH 2/2] sched/core: Update vcpu_runstate_get() to return nonaffine time

2025-07-21 Thread Jürgen Groß
On 21.07.25 11:49, Bernhard Kaindl wrote: Update vcpu_runstate_get() to return a snapshot of the accumulated non-affine vCPU running time at the current time of this call. We cannot change the struct vcpu_runstate_info: It is part of the Guest shared memory area that is part of the frozen VM ABI

Re: [PATCH 1/2] sched/core: For a new metric, add vcpu->nonaffine_time

2025-07-21 Thread Jürgen Groß
On 21.07.25 11:49, Bernhard Kaindl wrote: To monitor the effectiveness of vCPU soft-affinity on NUMA hosts, we'd like to create a vCPU metric that accumulates the amount of vCPU time running outside of the soft affinity mask of the sched-unit: - Add a new time counter, nonaffine_time to struct v

Re: [PATCH v5 1/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests

2025-07-21 Thread Jürgen Groß
On 28.06.25 20:17, Julien Grall wrote: Hi Mykola, On 27/06/2025 11:51, Mykola Kvach wrote: diff --git a/xen/arch/arm/include/asm/perfc_defn.h b/xen/arch/arm/include/asm/ perfc_defn.h index effd25b69e..8dfcac7e3b 100644 --- a/xen/arch/arm/include/asm/perfc_defn.h +++ b/xen/arch/arm/include/asm/

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

2025-07-18 Thread Jürgen Groß
On 15.07.25 15:44, WangYuli wrote: 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 Reviewed-by: Juergen Gross Juergen OpenPGP_0x

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

2025-07-18 Thread Jürgen Groß
On 17.07.25 16:29, Jakub Kicinski wrote: On Tue, 15 Jul 2025 16:11:29 + Anthoine Bourgeois wrote: Fixes: b27d47950e48 ("xen/netfront: harden netfront against event channel storms") Not entirely sure who you expect to apply this patch, but if networking then I wouldn't classify this is a f

Re: [PATCH v2 14/17] tools/xenstored: Auto-introduce domains

2025-07-17 Thread Jürgen Groß
On 17.07.25 23:39, Jason Andryuk wrote: On 2025-07-17 04:50, Juergen Gross wrote: On 16.07.25 23:15, Jason Andryuk wrote: Replace dom0_init() with init_domains() which uses libxenmanage to iterate through all existing domains and introduce them. dom0_domid is updated with the xenstore domain,

Re: [PATCH v2 12/17] tools/manage: Expose domain capabilities

2025-07-17 Thread Jürgen Groß
On 17.07.25 22:23, Jason Andryuk wrote: On 2025-07-17 02:28, Juergen Gross wrote: On 16.07.25 23:14, Jason Andryuk wrote: Add an additional "caps" argument to the libxenmanage functions to obtain a domains capabilities - control, hardware, and xenstore. Update the xenstored callers at the same

Re: [PATCH v2 11/17] xen: Add capabilities to get_domain_state

2025-07-17 Thread Jürgen Groß
On 17.07.25 22:16, Jason Andryuk wrote: On 2025-07-17 02:24, Juergen Gross wrote: On 16.07.25 23:14, Jason Andryuk wrote: Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropria

Re: [PATCH] kexec: initialize kexec_page in kexec()

2025-07-17 Thread Jürgen Groß
On 17.07.25 14:04, Jan Beulich wrote: On 17.07.2025 13:58, Jürgen Groß wrote: On 17.07.25 13:53, Jan Beulich wrote: For the error patch to not see it uninitialized. Fixes: 560c2a5584c4 ("mini-os: kexec: do the final kexec step") Signed-off-by: Jan Beulich Reviewed-by: Jue

Re: [PATCH] kexec: initialize kexec_page in kexec()

2025-07-17 Thread Jürgen Groß
On 17.07.25 13:53, Jan Beulich wrote: For the error patch to not see it uninitialized. Fixes: 560c2a5584c4 ("mini-os: kexec: do the final kexec step") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_si

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

2025-07-16 Thread Jürgen Groß
On 17.07.25 08:39, Jan Beulich wrote: On 02.07.2025 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 Confi

Re: [PATCH v2 09/17] xen/dom0less: store xenstore event channel in page

2025-07-16 Thread Jürgen Groß
On 17.07.25 08:25, Jan Beulich wrote: On 17.07.2025 08:19, Juergen Gross wrote: On 16.07.25 23:14, Jason Andryuk wrote: Write the associated event channel into the xenstore page so xenstored can read it. xenstored can map the grant by the reserved grant table entry, and then read out the event

Re: [MINI-OS PATCH] e820: fix e820_get_reserved_pfns() to reserve page aligned area

2025-07-14 Thread Jürgen Groß
On 14.07.25 16:02, Jan Beulich wrote: On 11.07.2025 14:03, Juergen Gross wrote: e820_get_reserved_pfns() needs to make sure to reserve only page aligned memory areas. Fixes: a7d27a7332ba ("mini-os: add memory map service functions") Signed-off-by: Juergen Gross I've committed this, but ...

Re: [PATCH] xen: Remove some deadcode (x)

2025-07-14 Thread Jürgen Groß
On 13.07.25 15:26, li...@treblig.org wrote: From: "Dr. David Alan Gilbert" Remove three uncalled functions: xenbus_mkdir() was added in 2007 by commit 4bac07c993d0 ("xen: add the Xenbus sysfs and virtual device hotplug driver") but has remained unused. xen_get_runstate_snapshot() last u

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

2025-07-11 Thread Jürgen Groß
On 10.07.25 18:11, Anthoine Bourgeois wrote: 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 t

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

2025-07-11 Thread Jürgen Groß
On 11.07.25 11:29, Teddy Astie wrote: You also probably want to send this to linux kernel mailing list too. Le 10/07/2025 à 18:14, Anthoine Bourgeois a écrit : We found at Vates that there are lot of spurious interrupts when benchmarking the PV drivers of Xen. This issue appeared with a patch t

Re: [MINI-OS PATCH 11/19] mini-os: config: add support for config items with numerical values

2025-07-11 Thread Jürgen Groß
On 11.07.25 08:24, Jan Beulich wrote: On 02.07.2025 10:12, Juergen Gross wrote: 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 Albeit I'm puzzled by the use in the next patch. Bes

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

2025-07-11 Thread Jürgen Groß
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: as the 9pfs device used for storing and retrieving the state of Xenstore needs to b

Re: [PATCH] xen/gntdev: remove struct gntdev_copy_batch from stack

2025-07-11 Thread Jürgen Groß
On 11.07.25 03:03, Stefano Stabellini wrote: On Wed, 9 Jul 2025, Jürgen Groß wrote: On 08.07.25 21:01, Stefano Stabellini wrote: On Thu, 3 Jul 2025, Juergen Gross wrote: When compiling the kernel with LLVM, the following warning was issued: drivers/xen/gntdev.c:991: warning: stack frame

Re: [MINI-OS PATCH 06/19] mm: don't add module pages to free memory

2025-07-09 Thread Jürgen Groß
On 08.07.25 23:14, Jason Andryuk wrote: On 2025-07-02 04:12, 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

Re: [PATCH] xen/gntdev: remove struct gntdev_copy_batch from stack

2025-07-08 Thread Jürgen Groß
On 08.07.25 21:01, Stefano Stabellini wrote: On Thu, 3 Jul 2025, Juergen Gross wrote: When compiling the kernel with LLVM, the following warning was issued: drivers/xen/gntdev.c:991: warning: stack frame size (1160) exceeds limit (1024) in function 'gntdev_ioctl' The main reason is struc

Re: [RFC PATCH] xen/gntdev: reduce stack usage by dynamically allocating gntdev_copy_batch

2025-07-02 Thread Jürgen Groß
On 03.07.25 00:42, Tu Dinh wrote: On 01/07/2025 23:53, Abinash wrote: Hi , Thanks for pointing that out. I haven’t measured the performance impact yet — my main focus was on getting rid of the stack usage warning triggered by LLVM due to inlining. But you're right, gntdev_ioctl_grant_copy() is

Re: [PATCH] tools/golang: update auto-generated libxl based types

2025-07-02 Thread Jürgen Groß
On 02.07.25 11:56, Roger Pau Monne wrote: As a result of the addition of a new field in libxl domain build info structure the golang types need to be regnerated, this was missing as part of 22650d6054. Regenerate the headers now. Reported-by: Juergen Gross Fixes: 22650d605462 ('x86/hvmloader:

Re: [PATCH v2 0/3] stubdom/grub: avoid relying on start_info definition

2025-06-30 Thread Jürgen Groß
On 30.06.25 09:57, Jan Beulich wrote: On 26.06.2025 17:13, Juergen Gross wrote: With the related change having been added to Mini-OS, the single V1 patch can now be expanded to a 3 patch series, especially meant to untangle the close dependencies between grub-pv and Mini-OS internals. Changes i

Re: [PATCH] stubdom/grub: avoid relying on start_info definition

2025-06-25 Thread Jürgen Groß
On 25.06.25 16:30, Andrew Cooper wrote: On 25/06/2025 3:28 pm, Jürgen Groß wrote: On 25.06.25 16:20, Jan Beulich wrote: On 25.06.2025 13:08, Juergen Gross wrote: @@ -432,3 +431,10 @@ out:   allocated = 0;   xc_interface_close(xc_handle );   } + +static void call_start_info_hook

Re: [PATCH] stubdom/grub: avoid relying on start_info definition

2025-06-25 Thread Jürgen Groß
On 25.06.25 16:20, Jan Beulich wrote: On 25.06.2025 13:08, Juergen Gross wrote: @@ -432,3 +431,10 @@ out: allocated = 0; xc_interface_close(xc_handle ); } + +static void call_start_info_hook(struct xc_dom_image *dom) +{ +#undef start_info +if ( dom->arch_hooks->start_info ) +

Re: xenstore - Suggestion of batching watch events

2025-06-24 Thread Jürgen Groß
On 24.06.25 16:51, Andriy Sultanov wrote: Currently, as far as I am aware, the ability of xenstore clients to properly handle and detect batch updates is somewhat lacking. Transactions are not directly visible to the clients watching a particular directory - they will receive a lot of individual

Re: [MINI-OS PATCH 0/6] hide struct start_info from PVH code

2025-06-23 Thread Jürgen Groß
On 23.06.25 10:45, Jan Beulich wrote: On 19.06.2025 13:37, Juergen Gross wrote: While working on xenstore-stubdom live update support I came across some really unpleasant code using struct start_info even when running in PVH mode. Especially suspend/resume was doing some crazy stuff, including

Re: [PATCH v2] xen/xenbus: fix W=1 build warning in xenbus_va_dev_error function

2025-06-20 Thread Jürgen Groß
On 20.06.25 02:41, jiang.pe...@zte.com.cn wrote: From: Peng Jiang This patch fixes a W=1 format-string warning reported by GCC 12.3.0 by annotating xenbus_switch_fatal() and xenbus_va_dev_error() with the __printf attribute. The attribute enables compile-time validation of printf-style format s

Re: [PATCH] xen/xenbus: fix W=1 build warning in xenbus_va_dev_error function

2025-06-19 Thread Jürgen Groß
On 18.06.25 04:01, jiang.pe...@zte.com.cn wrote: From: Peng Jiang This patch fixes a W=1 format-string warning reported by GCC 12.3.0 by annotating xenbus_switch_fatal() and xenbus_va_dev_error() with the __printf attribute. The attribute enables compile-time validation of printf-style form

Re: [MINI-OS PATCH 12/12] kexec: do the final kexec step

2025-06-16 Thread Jürgen Groß
On 14.06.25 19:39, Jason Andryuk wrote: On Fri, Mar 21, 2025 at 5:30 AM Juergen Gross wrote: With all kexec preparations done, activate the new kernel. Signed-off-by: Juergen Gross --- kexec.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/kexec.c b

Re: [MINI-OS PATCH 11/12] kexec: add kexec callback functionality

2025-06-16 Thread Jürgen Groß
On 14.06.25 19:34, Jason Andryuk wrote: On Fri, Mar 21, 2025 at 5:32 AM Juergen Gross wrote: Add a kexec_call() macro which will provide the capability to register a function for being called when doing a kexec() call. The called functions will be called with a boolean parameter "undo" indicat

Re: [MINI-OS PATCH 07/12] kexec: build parameters for new kernel

2025-06-16 Thread Jürgen Groß
On 14.06.25 19:02, Jason Andryuk wrote: On Fri, Mar 21, 2025 at 5:30 AM Juergen Gross wrote: Build the parameters for the new kernel, consisting of the hvm_start_info struct, the memory map and the command line. Signed-off-by: Juergen Gross @@ -212,4 +213,61 @@ void kexec_set_param_loc(co

Re: [MINI-OS PATCH 04/12] kexec: analyze new kernel for kexec

2025-06-15 Thread Jürgen Groß
On 14.06.25 18:41, Jason Andryuk wrote: On Fri, Mar 21, 2025 at 5:25 AM Juergen Gross wrote: Analyze the properties of the new kernel to be loaded by kexec. The data needed is: - upper boundary in final location - copy and memory clear operations - entry point and entry parameter Signed-off-

Re: [MINI-OS PATCH 02/12] kexec: add final kexec stage

2025-06-15 Thread Jürgen Groß
On 14.06.25 18:40, Jason Andryuk wrote: On Fri, Mar 21, 2025 at 5:25 AM Juergen Gross wrote: Add the code and data definitions of the final kexec stage. Put the code and related data into a dedicated section in order to be able to copy it to another location. For this reason there must be no

Re: [MINI-OS PATCH 01/12] kexec: add kexec framework

2025-06-15 Thread Jürgen Groß
Jason, thanks for having a look at the series! I very much appreciate that! On 14.06.25 18:40, Jason Andryuk wrote: On Fri, Mar 21, 2025 at 5:25 AM Juergen Gross wrote: Add a new config option CONFIG_KEXEC for support of kexec-ing into a new mini-os kernel. Add a related kexec.c source and a

Re: [PATCH 5/6] x86/paravirt: Switch MSR access pv_ops functions to instruction interfaces

2025-06-13 Thread Jürgen Groß
On 13.06.25 09:31, Xin Li wrote: On 6/11/2025 5:58 AM, Juergen Gross wrote: Here is a patch I cooked.  I added an ALTERNATIVE() hack because the new instructions can't be more than 6 bytes long.  But with the patch you just sent, it shouldn't be needed. I have meanwhile dropped the patch copy

Re: [REGRESSION] Linux 6.15.1 xen/dom0 domain_crash_sync called from entry.S

2025-06-09 Thread Jürgen Groß
On 10.06.25 00:43, Chuck Zmudzinski wrote: Hi, I am seeing the following regression between Linux 6.14.8 and 6.15.1. Kernel version 6.14.8 boots fine but version 6.15.1 crashes and reboots on Xen. I don't know if 6.14.9 or 6.14.10 is affected, or if 6.15 or the 6.15 release candidates are affec

Re: [PATCH v2] x86/hvmloader: select xenpci MMIO BAR UC or WB MTRR cache attribute

2025-06-04 Thread Jürgen Groß
On 03.06.25 13:18, Roger Pau Monne wrote: The Xen PCI device (vendor ID 0x5853) exposed to x86 HVM guests doesn't have the functionality of a traditional PCI device. The exposed MIO BAR is s/MIO/MMIO/ ? used by some guests (including Linux) as a safe place to map foreign memory, including th

Re: [PATCH v3 2/4] tools: remove support for running a guest with qemu-traditional

2025-05-19 Thread Jürgen Groß
On 19.05.25 15:30, Anthony PERARD wrote: On Tue, Apr 29, 2025 at 01:06:32PM +0200, Juergen Gross wrote: diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c index 34f6753f61..227b5ceafb 100644 --- a/tools/libacpi/mk_dsdt.c +++ b/tools/libacpi/mk_dsdt.c @@ -105,7 +81,7 @@ int main(int a

Re: [PATCH v1A 2/3] x86/xen/msr: Fix uninitialized symbol 'err'

2025-05-17 Thread Jürgen Groß
On 17.05.25 18:57, Xin Li (Intel) wrote: xen_read_msr_safe() currently passes an uninitialized argument err to xen_do_read_msr(). But as xen_do_read_msr() may not set the argument, xen_read_msr_safe() could return err with an unpredictable value. To ensure correctness, initialize err to 0 (repr

Re: [PATCH v1 2/3] x86/xen/msr: Fix uninitialized symbol 'err'

2025-05-16 Thread Jürgen Groß
On 15.05.25 20:11, Xin Li wrote: On 5/15/2025 8:29 AM, Ingo Molnar wrote: * Xin Li (Intel) wrote: xen_read_msr_safe() currently passes an uninitialized argument err to xen_do_read_msr().  But as xen_do_read_msr() may not set the argument, xen_read_msr_safe() could return err with an unpredic

Re: [RFC PATCH 00/16] Confidential computing and AMD SEV support

2025-05-16 Thread Jürgen Groß
On 16.05.25 11:31, Teddy Astie wrote: Hello, This series introduce support for confidential computing along with a AMD SEV implementation. It also bundles some of the functional requirements (ASID scheme, ABI, ...) which could be separated if needed. (I bundled everything in this serie to have

Re: [PATCH] xen/arm: call uaccess_ttbr0_enable for dm_op hypercall

2025-05-15 Thread Jürgen Groß
On 12.05.25 23:54, Stefano Stabellini wrote: From: Stefano Stabellini dm_op hypercalls might come from userspace and pass memory addresses as parameters. The memory addresses typically correspond to buffers allocated in userspace to hold extra hypercall parameters. On ARM, when CONFIG_ARM64_SW

Re: [PATCH] xen/x86: fix initial memory balloon target

2025-05-14 Thread Jürgen Groß
On 14.05.25 10:04, Roger Pau Monne wrote: When adding extra memory regions as ballooned pages also adjust the balloon target, otherwise when the balloon driver is started it will populate memory to match the target value and consume all the extra memory regions added. This made the usage of the

Re: [PATCH] xen: enable XEN_UNPOPULATED_ALLOC as part of xen.config

2025-05-14 Thread Jürgen Groß
On 14.05.25 11:20, Roger Pau Monne wrote: PVH dom0 is useless without XEN_UNPOPULATED_ALLOC, as otherwise it will very likely balloon out all dom0 memory to map foreign and grant pages. Enable it by default as part of xen.config. This also requires enabling MEMORY_HOTREMOVE and ZONE_DEVICE. Si

Re: [PATCH 5/6] x86/paravirt: Switch MSR access pv_ops functions to instruction interfaces

2025-05-12 Thread Jürgen Groß
On 13.05.25 07:55, Xin Li wrote: On 5/12/2025 4:24 AM, Juergen Gross wrote: Now with the mentioned patch really attached. :-) Does it allow patching with an instruction more than 6 bytes long? The immediate form MSR instructions are 9 bytes long. Yes, shouldn't be a problem. Juergen Op

Re: [PATCH 5/6] x86/paravirt: Switch MSR access pv_ops functions to instruction interfaces

2025-05-12 Thread Jürgen Groß
On 09.05.25 10:18, Xin Li wrote: On 5/6/2025 2:20 AM, Juergen Gross wrote: Instead of having callback functions for rdmsr/wrmsr on native, switch to inline the respective instructions directly in order to avoid overhead with the call interface. To me, this is a beneficial addition to the exist

Re: [PATCH] xenbus: Use kref to track req lifetime

2025-05-07 Thread Jürgen Groß
On 06.05.25 23:09, Jason Andryuk wrote: Marek reported seeing a NULL pointer fault in the xenbus_thread callstack: BUG: kernel NULL pointer dereference, address: RIP: e030:__wake_up_common+0x4c/0x180 Call Trace: __wake_up_common_lock+0x82/0xd0 process_msg+0x18e/0x2f0 xen

Re: NULL pointer dereference in xenbus_thread->...

2025-04-30 Thread Jürgen Groß
On 30.04.25 16:29, Jason Andryuk wrote: On 2025-04-30 06:56, Marek Marczykowski-Górecki wrote: On Tue, Apr 29, 2025 at 08:59:45PM -0400, Jason Andryuk wrote: Hi Marek, On Wed, Apr 23, 2025 at 8:42 AM Marek Marczykowski-Górecki wrote: I've got some more report confirming it's still happenin

Re: [PATCH v3 2/4] tools: remove support for running a guest with qemu-traditional

2025-04-29 Thread Jürgen Groß
On 29.04.25 14:01, Jan Beulich wrote: On 29.04.2025 13:06, Juergen Gross wrote: --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -59,6 +59,7 @@ OBJS += optionroms.o 32bitbios_support.o rombios.o CFLAGS += -DENABLE_ROMBIOS ROMBIOS_ROM := $(ROMBIOS_DIR)/BIOS-b

Re: [PATCH v2 2/6] docs: remove qemu-traditional support from documentation

2025-04-28 Thread Jürgen Groß
On 28.04.25 17:31, Alejandro Vallejo wrote: On Mon Apr 28, 2025 at 4:15 PM BST, Jürgen Groß wrote: On 28.04.25 17:12, Alejandro Vallejo wrote: On Thu Apr 24, 2025 at 10:41 AM BST, Anthony PERARD wrote: On Tue, Apr 08, 2025 at 02:35:20PM +0200, Juergen Gross wrote: @@ -1903,10 +1894,7 @@ it

Re: [PATCH v2 2/6] docs: remove qemu-traditional support from documentation

2025-04-28 Thread Jürgen Groß
On 28.04.25 17:12, Alejandro Vallejo wrote: On Thu Apr 24, 2025 at 10:41 AM BST, Anthony PERARD wrote: On Tue, Apr 08, 2025 at 02:35:20PM +0200, Juergen Gross wrote: @@ -1903,10 +1894,7 @@ it may be useful to request a different one, like UEFI. =item B -Loads ROMBIOS, a 16-bit x86 compa

Re: [PATCH v2 4/6] tools: remove qemu-traditional

2025-04-28 Thread Jürgen Groß
On 24.04.25 16:43, Anthony PERARD wrote: On Tue, Apr 08, 2025 at 02:35:22PM +0200, Juergen Gross wrote: diff --git a/INSTALL b/INSTALL index 88c1464816..786e3da996 100644 --- a/INSTALL +++ b/INSTALL There's one "--enable-ioemu-stubdom" left in this file. Oh, thanks for noticing. diff --g

Re: [PATCH v2 2/6] docs: remove qemu-traditional support from documentation

2025-04-28 Thread Jürgen Groß
On 24.04.25 11:41, Anthony PERARD wrote: On Tue, Apr 08, 2025 at 02:35:20PM +0200, Juergen Gross wrote: diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index 7339c44efd..ccf0c58895 100644 --- a/docs/man/xl.cfg.5.pod.in +++ b/docs/man/xl.cfg.5.pod.in @@ -895,12 +895,6 @@ is used.

Re: [RFC PATCH v2 21/34] x86/msr: Utilize the alternatives mechanism to write MSR

2025-04-25 Thread Jürgen Groß
On 25.04.25 14:33, Peter Zijlstra wrote: On Wed, Apr 23, 2025 at 06:05:19PM +0200, Jürgen Groß wrote: It's not a major change, but when it is patched to use the immediate form MSR write instruction, it's straightforwardly streamlined. It should be rather easy to switch the cur

Re: [PATCH v3 10/14] x86/xen/msr: Remove pmu_msr_{read,write}()

2025-04-25 Thread Jürgen Groß
On 25.04.25 10:34, Xin Li (Intel) wrote: As pmu_msr_{read,write}() are now wrappers of pmu_msr_chk_emulated(), remove them and use pmu_msr_chk_emulated() directly. As pmu_msr_chk_emulated() could easily return false in the cases where it would set *emul to false, remove the "emul" argument and u

Re: [PATCH v3 09/14] x86/xen/msr: Remove calling native_{read,write}_msr{,_safe}() in pmu_msr_{read,write}()

2025-04-25 Thread Jürgen Groß
On 25.04.25 10:34, Xin Li (Intel) wrote: hpa found that pmu_msr_write() is actually a completely pointless function [1]: all it does is shuffle some arguments, then calls pmu_msr_chk_emulated() and if it returns true AND the emulated flag is clear then does *exactly the same thing* that the calli

Re: [RFC PATCH v2 21/34] x86/msr: Utilize the alternatives mechanism to write MSR

2025-04-25 Thread Jürgen Groß
On 25.04.25 05:44, H. Peter Anvin wrote: On 4/24/25 18:15, H. Peter Anvin wrote: On 4/24/25 01:14, Jürgen Groß wrote: Actually, that is how we get this patch with the existing alternatives infrastructure.  And we took a step further to also remove the pv_ops MSR APIs... And this is what I&#

Re: [RFC PATCH v2 21/34] x86/msr: Utilize the alternatives mechanism to write MSR

2025-04-24 Thread Jürgen Groß
On 25.04.25 03:15, H. Peter Anvin wrote: On 4/24/25 01:14, Jürgen Groß wrote: Actually, that is how we get this patch with the existing alternatives infrastructure.  And we took a step further to also remove the pv_ops MSR APIs... And this is what I'm questioning. IMHO this approa

Re: [RFC PATCH v2 14/34] x86/msr: refactor pv_cpu_ops.write_msr{_safe}()

2025-04-24 Thread Jürgen Groß
On 22.04.25 10:21, Xin Li (Intel) wrote: An MSR value is represented as a 64-bit unsigned integer, with existing MSR instructions storing it in EDX:EAX as two 32-bit segments. The new immediate form MSR instructions, however, utilize a 64-bit general-purpose register to store the MSR value. To

Re: [RFC PATCH v2 13/34] x86/xen/msr: Remove the error pointer argument from set_reg()

2025-04-24 Thread Jürgen Groß
On 22.04.25 10:21, Xin Li (Intel) wrote: set_reg() is used to write the following MSRs on Xen: MSR_FS_BASE MSR_KERNEL_GS_BASE MSR_GS_BASE But none of these MSRs are written using any MSR write safe API. Therefore there is no need to pass an error pointer argument to set_reg() for

Re: [RFC PATCH v2 12/34] x86/msr: Remove pmu_msr_{read,write}()

2025-04-24 Thread Jürgen Groß
On 22.04.25 10:21, Xin Li (Intel) wrote: As pmu_msr_{read,write}() are now wrappers of pmu_msr_chk_emulated(), remove them and use pmu_msr_chk_emulated() directly. While at it, convert the data type of MSR index to u32 in functions called in pmu_msr_chk_emulated(). Suggested-by: H. Peter Anvin

Re: [RFC PATCH v2 21/34] x86/msr: Utilize the alternatives mechanism to write MSR

2025-04-24 Thread Jürgen Groß
On 24.04.25 10:06, Xin Li wrote: On 4/23/2025 9:05 AM, Jürgen Groß wrote: It's not a major change, but when it is patched to use the immediate form MSR write instruction, it's straightforwardly streamlined. It should be rather easy to switch the current wrmsr/rdmsr paravirt patching

Re: [RFC PATCH v2 22/34] x86/msr: Utilize the alternatives mechanism to read MSR

2025-04-23 Thread Jürgen Groß
On 23.04.25 11:03, Xin Li wrote: On 4/22/2025 4:12 AM, Jürgen Groß wrote: + +static __always_inline bool __rdmsrq(u32 msr, u64 *val, int type) +{ +    bool ret; + +#ifdef CONFIG_XEN_PV +    if (cpu_feature_enabled(X86_FEATURE_XENPV)) +    return __xenpv_rdmsrq(msr, val, type); I don&#

Re: [RFC PATCH v2 21/34] x86/msr: Utilize the alternatives mechanism to write MSR

2025-04-23 Thread Jürgen Groß
On 23.04.25 10:51, Xin Li wrote: On 4/22/2025 2:57 AM, Jürgen Groß wrote: On 22.04.25 10:22, Xin Li (Intel) wrote: The story started from tglx's reply in [1]:    For actual performance relevant code the current PV ops mechanics    are a horrorshow when the op defaults to the n

Re: [RFC PATCH v2 22/34] x86/msr: Utilize the alternatives mechanism to read MSR

2025-04-22 Thread Jürgen Groß
On 22.04.25 10:22, Xin Li (Intel) wrote: To eliminate the indirect call overhead introduced by the pv_ops API, utilize the alternatives mechanism to read MSR: 1) When built with !CONFIG_XEN_PV, X86_FEATURE_XENPV becomes a disabled feature, preventing the Xen code from being built

Re: [RFC PATCH v2 22/34] x86/msr: Utilize the alternatives mechanism to read MSR

2025-04-22 Thread Jürgen Groß
On 22.04.25 11:20, Xin Li wrote: On 4/22/2025 1:59 AM, Jürgen Groß wrote: On 22.04.25 10:22, Xin Li (Intel) wrote: To eliminate the indirect call overhead introduced by the pv_ops API, utilize the alternatives mechanism to read MSR: 1) When built with !CONFIG_XEN_PV, X86_FEATURE_XENPV

  1   2   3   4   5   6   7   8   9   10   >