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

2025-07-17 Thread Jan Beulich
On 18.07.2025 02:09, Stefano Stabellini wrote: > It looks like this patch is the only one missing an Ack. (Aside from > patch #11). I've sent an ack. Yet according to my records patch 1 also is still lacking an (XSM) ack. Plus, to be honest, a ping after ... > On Tue, 15 Jul 2025, Alejandro Valle

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

2025-07-17 Thread Jan Beulich
On 15.07.2025 18:10, Alejandro Vallejo wrote: > No functional change intended. > > Signed-off-by: Alejandro Vallejo > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [PATCH] x86: Conditionalise init_dom0_cpu_policy()

2025-07-17 Thread Jan Beulich
On 17.07.2025 19:58, Alejandro Vallejo wrote: > Later patches will keep refactoring create_dom0() > until it can create arbitrary domains. This is one > small step in that direction. > > Signed-off-by: Alejandro Vallejo As with the other patch - we first need to settle on principles. And then ..

Re: [PATCH 2/2] x86: generalise vcpu0 creation for a domain

2025-07-17 Thread Jan Beulich
On 18.07.2025 02:04, Stefano Stabellini wrote: > On Thu, 17 Jul 2025, Jason Andryuk wrote: >> On 2025-07-17 13:51, Alejandro Vallejo wrote: >>> Make alloc_dom0_vcpu0() viable as a general vcpu0 allocator. Keep >>> behaviour on any hwdom/ctldom identical to that dom0 used to have, and >>> make non-d

Re: [PATCH] xen/passthrough: add missing error-report include

2025-07-17 Thread Philippe Mathieu-Daudé
On 18/7/25 08:05, Philippe Mathieu-Daudé wrote: On 18/7/25 07:11, Markus Armbruster wrote: Adam Williamson writes: In cfcacba an `error_report` was added to this file, but the    In commit cfcacbab38e ("xen/passthrough: use gsi to map pirq when    dom0 is PVH") an `error_report` was added

Re: [PATCH] xen/passthrough: add missing error-report include

2025-07-17 Thread Philippe Mathieu-Daudé
On 18/7/25 07:11, Markus Armbruster wrote: Adam Williamson writes: In cfcacba an `error_report` was added to this file, but the In commit cfcacbab38e ("xen/passthrough: use gsi to map pirq when dom0 is PVH") an `error_report` was added to this file, but the corresponding include of `

Re: [PATCH] x86/idle: Fix the C6 eoi_errata[] list to include NEHALEM_EX

2025-07-17 Thread Jan Beulich
On 17.07.2025 18:28, Andrew Cooper wrote: > NEHALEM_EX is affected by the erratum too. > > Change the comment to be the full text, rather than interpretation of it. > > Fixes: 95807bcae47e ("C6 state with EOI issue fix for some Intel processors") > Signed-off-by: Andrew Cooper Reviewed-by: Jan

Re: [PATCH] xen/passthrough: add missing error-report include

2025-07-17 Thread Markus Armbruster
Markus Armbruster writes: > Adam Williamson writes: > >> In cfcacba an `error_report` was added to this file, but the >> corresponding include of `qemu/error-report.h` was missed. This >> only becomes apparent when building against Xen 4.20+. >> >> Signed-off-by: Adam Williamson >> --- >> hw/x

Re: [PATCH 5/6] x86/match-cpu: Support matching on steppings

2025-07-17 Thread Jan Beulich
On 17.07.2025 21:39, Andrew Cooper wrote: > On 17/07/2025 9:11 am, Jan Beulich wrote: >> On 16.07.2025 19:31, Andrew Cooper wrote: >>> --- a/xen/arch/x86/cpu/common.c >>> +++ b/xen/arch/x86/cpu/common.c >>> @@ -1003,13 +1003,15 @@ const struct x86_cpu_id *x86_match_cpu(const struct >>> x86_cpu_id

Re: [PATCH 4/6] x86: Convert users of INTEL_FAM6_MODEL() to X86_MATCH_VFM()

2025-07-17 Thread Jan Beulich
On 17.07.2025 19:57, Andrew Cooper wrote: > On 17/07/2025 8:44 am, Jan Beulich wrote: >> On 16.07.2025 19:31, Andrew Cooper wrote: >>> --- a/xen/arch/x86/acpi/cpu_idle.c >>> +++ b/xen/arch/x86/acpi/cpu_idle.c >>> @@ -583,7 +583,6 @@ bool errata_c6_workaround(void) >>> >>> if ( unlikely(fix_n

Re: [PATCH 3/6] x86/match-cpu: Introduce X86_MATCH_VFM() and convert intel_idle_ids[]

2025-07-17 Thread Jan Beulich
On 17.07.2025 19:39, Andrew Cooper wrote: > On 17/07/2025 8:35 am, Jan Beulich wrote: >> On 16.07.2025 19:31, Andrew Cooper wrote: >>> mwait-idle's ICPU() is the most convenient place to get started. Introduce >>> X86_MATCH_CPU() and X86_MATCH_VFM() following their Linux counterparts. >>> >>> This

Re: [PATCH v1] misra: add deviation for rules 21.1 and 21.2

2025-07-17 Thread Jan Beulich
On 17.07.2025 22:47, Dmytro Prokopchuk1 wrote: > > > On 4/23/25 20:54, victorm.l...@amd.com wrote: >> From: Nicola Vetrini >> >> MISRA C Rules 21.1 ("#define and #undef shall not be used on a >> reserved identifier or reserved macro name") and R21.2 ("A reserved >> identifier or reserved macro n

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: [XEN][PATCH] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-17 Thread Jan Beulich
On 17.07.2025 20:55, Grygorii Strashko wrote: > On 17.07.25 18:33, Jan Beulich wrote: >> On 17.07.2025 16:41, Grygorii Strashko wrote: >>> On 17.07.25 16:10, Jan Beulich wrote: On 17.07.2025 15:01, Grygorii Strashko wrote: > --- a/xen/common/event_channel.c > +++ b/xen/common/event_cha

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] xen/passthrough: add missing error-report include

2025-07-17 Thread Markus Armbruster
Adam Williamson writes: > In cfcacba an `error_report` was added to this file, but the > corresponding include of `qemu/error-report.h` was missed. This > only becomes apparent when building against Xen 4.20+. > > Signed-off-by: Adam Williamson > --- > hw/xen/xen_pt.c | 1 + > 1 file changed, 1

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

2025-07-17 Thread Choi, Anderson
Stewart, >>> Stewart, >>> >>> I appreciate your suggestion to eliminate the while loop. >>> What about initializing major_frame and schedule[0].runtime to >>> DEFAULT_TIMESLICE at a653sched_init() and use them until the real >>> parameters are set as below to eliminate the if branch? >> >> It wo

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

2025-07-17 Thread Stewart Hildebrand
On 7/17/25 22:16, Nathan Studer wrote: > On 7/17/25 21:39, Choi, Anderson wrote: >>> On 7/17/25 9:21, Hildebrand, Stewart wrote: >> else +{ +sched_priv->next_switch_time = > sched_priv->next_major_frame + + > sched_priv->schedule[0].runtime; + > sched_priv->next_majo

Re: [PATCH v2 07/17] xsm/dummy: Allow HVMOP_get_param for control domain

2025-07-17 Thread Stefano Stabellini
On Wed, 16 Jul 2025, Jason Andryuk wrote: > The Control domain is denied access to an untargetable domain. However > init-dom0less wants to read the xenstore event channel HVM param to > determine if xenstore should be set up. This could be done differently, for instance if xs_is_domain_introduce

Re: [PATCH v2 16/17] tools/init-dom0less: Configure already-introduced domains

2025-07-17 Thread Stefano Stabellini
On Wed, 16 Jul 2025, Jason Andryuk wrote: > With xenstore automatically introducing domains at startup, the > xs_is_domain_introduced() check is no longer accurate. We can still use xs_is_domain_introduced() to skip configure_xenstore? > Instead, process > all domains and introduce non-introduce

Re: [PATCH v2 17/17] tools/init-dom0less: Continue on error

2025-07-17 Thread Stefano Stabellini
On Wed, 16 Jul 2025, Jason Andryuk wrote: > An error on one domain doesn't apply to others. Continue the loop over > all domains if init_domain() fails. > > Signed-off-by: Jason Andryuk > --- > tools/helpers/init-dom0less.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/tools/helpers/

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

2025-07-17 Thread Nathan Studer
On 7/17/25 21:39, Choi, Anderson wrote: > > On 7/17/25 9:21, Hildebrand, Stewart wrote: > else +{ +sched_priv->next_switch_time = > >>> sched_priv->next_major_frame + + > >>> sched_priv->schedule[0].runtime; + > >>> sched_priv->next_major_frame += sched_priv->major_frame; +

Re: [PATCH v2 06/17] xen/xsm: Expand XSM_XS_PRIV for untargetable domains

2025-07-17 Thread Stefano Stabellini
On Wed, 16 Jul 2025, Jason Andryuk wrote: > Untargetable domains are currently hidden from the control domain - > e.g. xl list will not show them. getdomaininfo fails on the > !is_hypercall_target() check in XSM_TARGET. Add control domain to the > XSM_XS_PRIV check so it can pass. > > Signed-off

Re: [PATCH v2 05/17] xen/dom0less: Workaround XSM for evtchn_alloc_unbound

2025-07-17 Thread Stefano Stabellini
On Wed, 16 Jul 2025, Jason Andryuk wrote: > When used with an untargetable domain, xsm_evtchn_unbound fails even > though the idle domain has is_privileged = true. Switch current to the > domain under construction so that event channel creation is allowed as > XSM_TARGET. > > Signed-off-by: Jason

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

2025-07-17 Thread Choi, Anderson
> EXT email: be mindful of links/attachments. > > On 7/17/25 9:21, Hildebrand, Stewart wrote: else +{ +sched_priv->next_switch_time = >>> sched_priv->next_major_frame + + >>> sched_priv->schedule[0].runtime; + >>> sched_priv->next_major_frame += sched_

Re: [PATCH v2 04/17] xen: Introduce XEN_DOMCTL_CDF_not_hypercall_target

2025-07-17 Thread Stefano Stabellini
On Wed, 16 Jul 2025, Jason Andryuk wrote: > Add a new create domain flag to indicate if a domain can be the target > of hypercalls. By default all domains can be targetted - subject to any > other permission checks. > > This property is useful in a safety environment to isolate domains for > fre

Re: [PATCH v2 03/17] xen: Add DOMAIN_CAPS_DEVICE_MODEL & XEN_DOMCTL_CDF_device_model

2025-07-17 Thread Stefano Stabellini
On Wed, 16 Jul 2025, Jason Andryuk wrote: > To add more flexibility in system configuration add the new > DOMAIN_CAPS_DEVICE_MODEL flag and XEN_DOMCTL_CDF_device_model. > > Thie new flag corresponds to allowing XSM_DM_PRIV for the domain. This > will enable running device model emulators (QEMU) f

Re: [PATCH v2 02/17] xsm/silo: Support hardware & xenstore domains

2025-07-17 Thread Stefano Stabellini
On Wed, 16 Jul 2025, Jason Andryuk wrote: > In a disaggregated environment, dom0 is split into Control, Hardware, > and Xenstore domains, along with domUs. The is_control_domain() check > is not sufficient to handle all these cases. Add is_priv_domain() to > support allowing for the various domai

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

2025-07-17 Thread Stefano Stabellini
Hi Jan, It looks like this patch is the only one missing an Ack. (Aside from patch #11). Cheers, Stefano On Tue, 15 Jul 2025, Alejandro Vallejo wrote: > No functional change intended. > > Signed-off-by: Alejandro Vallejo > Reviewed-by: Stefano Stabellini > --- > xen/arch/x86/hvm/dom0_build.

Re: [PATCH 2/2] x86: generalise vcpu0 creation for a domain

2025-07-17 Thread Stefano Stabellini
On Thu, 17 Jul 2025, Jason Andryuk wrote: > On 2025-07-17 13:51, Alejandro Vallejo wrote: > > Make alloc_dom0_vcpu0() viable as a general vcpu0 allocator. Keep > > behaviour on any hwdom/ctldom identical to that dom0 used to have, and > > make non-dom0 have auto node affinity. > > > > Rename the f

Re: [PATCH 1/2] arm: Remove alloc_dom0_vcpu0()

2025-07-17 Thread Stefano Stabellini
On Thu, 17 Jul 2025, Jason Andryuk wrote: > On 2025-07-17 13:51, Alejandro Vallejo wrote: > > It's a straight vcpu_create(), so the alloc_dom0_vcpu0() call is > > irrelevant. > > > > Not a functional change. > > > > Signed-off-by: Alejandro Vallejo > > Reviewed-by: Jason Andryuk Reviewed-by:

Re: [PATCH 2/2] x86: generalise vcpu0 creation for a domain

2025-07-17 Thread Jason Andryuk
On 2025-07-17 13:51, Alejandro Vallejo wrote: Make alloc_dom0_vcpu0() viable as a general vcpu0 allocator. Keep behaviour on any hwdom/ctldom identical to that dom0 used to have, and make non-dom0 have auto node affinity. Rename the function to alloc_dom_vcpu0() to reflect this change in scope,

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

2025-07-17 Thread Demi Marie Obenour
On 7/17/25 07:52, David Hildenbrand wrote: > 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

[PATCH] xen/passthrough: add missing error-report include

2025-07-17 Thread Adam Williamson
In cfcacba an `error_report` was added to this file, but the corresponding include of `qemu/error-report.h` was missed. This only becomes apparent when building against Xen 4.20+. Signed-off-by: Adam Williamson --- hw/xen/xen_pt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xen/xen_pt

Re: [PATCH 1/2] arm: Remove alloc_dom0_vcpu0()

2025-07-17 Thread Jason Andryuk
On 2025-07-17 13:51, Alejandro Vallejo wrote: It's a straight vcpu_create(), so the alloc_dom0_vcpu0() call is irrelevant. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Jason Andryuk

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

2025-07-17 Thread Jason Andryuk
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, since it really indicates the local domai

Re: [PATCH v1] misra: add deviation for rules 21.1 and 21.2

2025-07-17 Thread Dmytro Prokopchuk1
On 4/23/25 20:54, victorm.l...@amd.com wrote: > From: Nicola Vetrini > > MISRA C Rules 21.1 ("#define and #undef shall not be used on a > reserved identifier or reserved macro name") and R21.2 ("A reserved > identifier or reserved macro name shall not be declared") violations > are not problema

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

2025-07-17 Thread David Hildenbrand
On 17.07.25 20:29, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 01:52:08PM +0200, David Hildenbrand wrote: The huge zero folio is refcounted (+mapcounted -- is that a word?) differently than "normal" folios, similarly (but different) to the ordinary shared zeropage. Yeah, I sort of wonder if

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

2025-07-17 Thread Jason Andryuk
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 time. Luckily the interface was only i

[PATCH v2] systemd: Add hooks to stop/start xen-watchdog on suspend/resume

2025-07-17 Thread Mykola Kvach
From: Mykola Kvach This patch adds a systemd sleep hook script to stop the xen-watchdog service before system suspend and start it again after resume. Stopping the watchdog before a system suspend operation may look unsafe. Let's imagine the following situation: 'systemctl suspend' does not inte

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

2025-07-17 Thread Jason Andryuk
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 appropriate permissions on connections. Repurpose

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

2025-07-17 Thread David Hildenbrand
On 17.07.25 22:03, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 01:52:11PM +0200, David Hildenbrand wrote: 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_wa

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

2025-07-17 Thread David Hildenbrand
-/* - * vm_normal_page -- This function gets the "struct page" associated with a pte. +/** + * vm_normal_page_pfn() - Get the "struct page" associated with a PFN in a + * non-special page table entry. This is a bit nebulous/confusing, I mean you'll get PTE entries with PT

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:12PM +0200, David Hildenbrand wrote: > ... and hide it behind a kconfig option. There is really no need for > any !xen code to perform this check. Lovely :) > > The naming is a bit off: we want to find the "normal" page when a PTE > was marked "special". So it's real

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:11PM +0200, David Hildenbrand wrote: > 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, > stru

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

2025-07-17 Thread David Hildenbrand
The report will now look something like (dumping pgd to pmd values): [ 77.943408] BUG: Bad page map in process XXX entry:8001233f5867 [ 77.944077] addr:7fd84bb1c000 vm_flags:08100071 anon_vma: ... [ 77.945186] pgd:10a89f067 p4d:10a89f067 pud:10e5a2067 pmd:105327067 Not using pgdp_

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

2025-07-17 Thread David Hildenbrand
On 17.07.25 21:55, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 08:51:51PM +0100, Lorenzo Stoakes wrote: @@ -721,37 +772,21 @@ struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr, print_bad_page_map(vma, addr, pmd_val(pmd), NULL); ret

Re: [PATCH v2 10/17] tools/xenstored: Read event channel from xenstored page

2025-07-17 Thread Jason Andryuk
On 2025-07-17 02:22, Juergen Gross wrote: On 16.07.25 23:14, 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

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

2025-07-17 Thread Jason Andryuk
On 2025-07-17 02:43, Jürgen Groß wrote: 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 gr

Re: [PATCH v1 01/16] arm/vpl011: rename virtual PL011 Kconfig option

2025-07-17 Thread dmkhn
On Thu, Jul 17, 2025 at 05:43:22PM +0200, Alejandro Vallejo wrote: > On Tue Jun 24, 2025 at 9:24 AM CEST, dmkhn wrote: > > On Tue, Jun 24, 2025 at 08:13:08AM +0200, Orzel, Michal wrote: > >> > >> > >> On 24/06/2025 05:55, dm...@proton.me wrote: > >> > From: Denis Mukhin > >> > > >> > Rename CONFIG

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 08:51:51PM +0100, Lorenzo Stoakes wrote: > > @@ -721,37 +772,21 @@ struct page *vm_normal_page_pmd(struct vm_area_struct > > *vma, unsigned long addr, > > print_bad_page_map(vma, addr, pmd_val(pmd), NULL); > > return NULL; > > } > > - > > - if

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:10PM +0200, David Hildenbrand wrote: > 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

Re: [PATCH 6/6] x86/apic: Convert the TSC deadline errata table to X86_MATCH_*()

2025-07-17 Thread Andrew Cooper
On 17/07/2025 9:31 am, Jan Beulich wrote: > On 16.07.2025 19:31, Andrew Cooper wrote: >> --- a/xen/arch/x86/apic.c >> +++ b/xen/arch/x86/apic.c >> @@ -1051,64 +1051,32 @@ static void setup_APIC_timer(void) >> local_irq_restore(flags); >> } >> >> -#define DEADLINE_MODEL_MATCH(m, fr) \ >> -

Re: [PATCH] x86: Conditionalise init_dom0_cpu_policy()

2025-07-17 Thread dmkhn
On Thu, Jul 17, 2025 at 07:58:24PM +0200, Alejandro Vallejo wrote: > Later patches will keep refactoring create_dom0() > until it can create arbitrary domains. This is one > small step in that direction. > > Signed-off-by: Alejandro Vallejo Reviewed-by: Denis Mukhin > --- > xen/arch/x86/setu

Re: [PATCH] dom0less: Move single-xenstore check from bindings to set_xs_domain()

2025-07-17 Thread dmkhn
On Thu, Jul 17, 2025 at 04:28:05PM +0200, Alejandro Vallejo wrote: > Later patches extract the bindings to a separate file, where that global > won't be available. Make the check when calling the function instead so > the bindings remain agnostic. > > Signed-off-by: Alejandro Vallejo Reviewed-by

Re: [PATCH 6/6] x86/apic: Convert the TSC deadline errata table to X86_MATCH_*()

2025-07-17 Thread Andrew Cooper
On 17/07/2025 10:33 am, Jan Beulich wrote: > On 17.07.2025 11:02, Andrew Cooper wrote: >> On 17/07/2025 9:26 am, Jan Beulich wrote: >>> On 16.07.2025 19:31, Andrew Cooper wrote: With the ability to match on steppings, introduce a new X86_MATCH_VFMS() helper to match a specific stepping, a

Re: [PATCH 5/6] x86/match-cpu: Support matching on steppings

2025-07-17 Thread Andrew Cooper
On 17/07/2025 9:11 am, Jan Beulich wrote: > On 16.07.2025 19:31, Andrew Cooper wrote: >> --- a/xen/arch/x86/cpu/common.c >> +++ b/xen/arch/x86/cpu/common.c >> @@ -1003,13 +1003,15 @@ const struct x86_cpu_id *x86_match_cpu(const struct >> x86_cpu_id table[]) >> const struct x86_cpu_id *m; >>

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:09PM +0200, David Hildenbrand wrote: > 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 ke

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

2025-07-17 Thread Grygorii Strashko
On 17.07.25 18:33, Jan Beulich wrote: On 17.07.2025 16:41, Grygorii Strashko wrote: On 17.07.25 16:10, Jan Beulich wrote: On 17.07.2025 15:01, Grygorii Strashko wrote: --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -975,6 +975,9 @@ void send_guest_pirq(struct domain

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:08PM +0200, David Hildenbrand wrote: > The huge zero folio is refcounted (+mapcounted -- is that a word?) > differently than "normal" folios, similarly (but different) to the ordinary > shared zeropage. Yeah, I sort of wonder if we shouldn't just _not_ do any of that

Re: [PATCH] dom0less: Move single-xenstore check from bindings to set_xs_domain()

2025-07-17 Thread Jason Andryuk
On 2025-07-17 10:28, Alejandro Vallejo wrote: Later patches extract the bindings to a separate file, where that global won't be available. Make the check when calling the function instead so the bindings remain agnostic. Signed-off-by: Alejandro Vallejo Reviewed-by: Jason Andryuk

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:07PM +0200, David Hildenbrand wrote: > 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. > > Pre

[PATCH] x86: Conditionalise init_dom0_cpu_policy()

2025-07-17 Thread Alejandro Vallejo
Later patches will keep refactoring create_dom0() until it can create arbitrary domains. This is one small step in that direction. Signed-off-by: Alejandro Vallejo --- xen/arch/x86/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/s

Re: [PATCH 4/6] x86: Convert users of INTEL_FAM6_MODEL() to X86_MATCH_VFM()

2025-07-17 Thread Andrew Cooper
On 17/07/2025 8:44 am, Jan Beulich wrote: > On 16.07.2025 19:31, Andrew Cooper wrote: >> --- a/xen/arch/x86/acpi/cpu_idle.c >> +++ b/xen/arch/x86/acpi/cpu_idle.c >> @@ -583,7 +583,6 @@ bool errata_c6_workaround(void) >> >> if ( unlikely(fix_needed == -1) ) >> { >> -#define INTEL_FAM6_MO

[PATCH 0/2] generalise vcpu0 creation for predefined domains

2025-07-17 Thread Alejandro Vallejo
Hi, This patch is a very compressed version of Daniel's. Originally, it performed code motion between dom0_build.c and domain-builder/domain.c, but in order for this to go in early, I've compressed everything in a single hunk and left it in dom0_build.c. We can move whatever must be moved later o

[PATCH 1/2] arm: Remove alloc_dom0_vcpu0()

2025-07-17 Thread Alejandro Vallejo
It's a straight vcpu_create(), so the alloc_dom0_vcpu0() call is irrelevant. Not a functional change. Signed-off-by: Alejandro Vallejo --- xen/arch/arm/domain_build.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_buil

[PATCH 2/2] x86: generalise vcpu0 creation for a domain

2025-07-17 Thread Alejandro Vallejo
Make alloc_dom0_vcpu0() viable as a general vcpu0 allocator. Keep behaviour on any hwdom/ctldom identical to that dom0 used to have, and make non-dom0 have auto node affinity. Rename the function to alloc_dom_vcpu0() to reflect this change in scope, and move the prototype to asm/domain.h from xen/

Re: [PATCH 3/6] x86/match-cpu: Introduce X86_MATCH_VFM() and convert intel_idle_ids[]

2025-07-17 Thread Andrew Cooper
On 17/07/2025 8:35 am, Jan Beulich wrote: > On 16.07.2025 19:31, Andrew Cooper wrote: >> mwait-idle's ICPU() is the most convenient place to get started. Introduce >> X86_MATCH_CPU() and X86_MATCH_VFM() following their Linux counterparts. >> >> This involves match-cpu.h including more headers, whi

Re: [PATCH 2/6] x86: Break struct x86_cpu_id out of processor.h

2025-07-17 Thread Andrew Cooper
On 17/07/2025 8:23 am, Jan Beulich wrote: > On 16.07.2025 19:31, Andrew Cooper wrote: >> Only 5 files use struct x86_cpu_id, so it should not be in processor.h. This >> is in preparation to extend it with VFM support. >> >> No functional change. >> >> Signed-off-by: Andrew Cooper > Reviewed-by: J

RE: Discussion on the delayed start of major frame with ARINC653 scheduler

2025-07-17 Thread Nathan Studer
On 7/14/25 11:11, Weber, Matthew wrote: > > > As a heads up, since this is a bit of a bigger change then some of the > > recent > patches, I am working on running a stress test on it, which may take some > time. > > Out of curiosity, is that something we could plan to run on our end as well >

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

2025-07-17 Thread Nathan Studer
On 7/17/25 9:21, Hildebrand, Stewart wrote: > > -if ( sched_priv->num_schedule_entries < 1 ) > > -sched_priv->next_major_frame = now + DEFAULT_TIMESLICE; > > -else if ( now >= sched_priv->next_major_frame ) > > +/* Switch to next major frame while handling potentially missed fra

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

2025-07-17 Thread Stewart Hildebrand
On 7/16/25 05:59, Julien Grall wrote: > On 16/07/2025 10:56, Julien Grall wrote: >> On 15/07/2025 16:58, Stewart Hildebrand wrote: >>> 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: >>

Re: [PATCH v2 15/17] xen/riscv: Implement superpage splitting for p2m mappings

2025-07-17 Thread Oleksii Kurochko
On 7/2/25 11:25 AM, Jan Beulich wrote: On 10.06.2025 15:05, Oleksii Kurochko wrote: Add support for down large memory mappings ("superpages") in the RISC-V p2m mapping so that smaller, more precise mappings ("finer-grained entries") can be inserted into lower levels of the page table hierarchy.

[PATCH] x86/idle: Fix the C6 eoi_errata[] list to include NEHALEM_EX

2025-07-17 Thread Andrew Cooper
NEHALEM_EX is affected by the erratum too. Change the comment to be the full text, rather than interpretation of it. Fixes: 95807bcae47e ("C6 state with EOI issue fix for some Intel processors") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné Pulled out of the cleanup ser

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:06PM +0200, David Hildenbrand wrote: > 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

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:05PM +0200, David Hildenbrand wrote: > Let's clean it all further up. > > No functional change intended. > > Reviewed-by: Oscar Salvador > Reviewed-by: Alistair Popple > Signed-off-by: David Hildenbrand LGTM: Reviewed-by: Lorenzo Stoakes > --- > mm/huge_memory.

Re: [PATCH v1 01/16] arm/vpl011: rename virtual PL011 Kconfig option

2025-07-17 Thread Alejandro Vallejo
On Tue Jun 24, 2025 at 9:24 AM CEST, dmkhn wrote: > On Tue, Jun 24, 2025 at 08:13:08AM +0200, Orzel, Michal wrote: >> >> >> On 24/06/2025 05:55, dm...@proton.me wrote: >> > From: Denis Mukhin >> > >> > Rename CONFIG_SBSA_VUART_CONSOLE to CONFIG_HAS_VUART_PL011. >> Why? We emulate SBSA UART and n

Re: [PATCH] x86/S3: don't lose previously collected CPU data (AMD extra)

2025-07-17 Thread Juergen Gross
On 17.07.25 17:18, Jan Beulich wrote: smp_store_cpu_info() doesn't call identify_cpu() again during S3 resume, hence it is wrong to zap APs' data while bringing them down (and we're not just parking them there) during suspend. Fixes: 7126b7f806d5 ("x86/CPU: re-work populating of cpu_data[]") Sig

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

2025-07-17 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 01:52:04PM +0200, David Hildenbrand wrote: > Let's clean it all further up. > > No functional change intended. > > Reviewed-by: Oscar Salvador > Reviewed-by: Alistair Popple > Signed-off-by: David Hildenbrand Very nice! Reviewed-by: Lorenzo Stoakes > --- > mm/huge_me

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

2025-07-17 Thread Jan Beulich
On 17.07.2025 16:41, Grygorii Strashko wrote: > > > On 17.07.25 16:10, Jan Beulich wrote: >> On 17.07.2025 15:01, Grygorii Strashko wrote: >>> --- a/xen/common/event_channel.c >>> +++ b/xen/common/event_channel.c >>> @@ -975,6 +975,9 @@ void send_guest_pirq(struct domain *d, const struct >>> pir

[PATCH] x86/S3: don't lose previously collected CPU data (AMD extra)

2025-07-17 Thread Jan Beulich
smp_store_cpu_info() doesn't call identify_cpu() again during S3 resume, hence it is wrong to zap APs' data while bringing them down (and we're not just parking them there) during suspend. Fixes: 7126b7f806d5 ("x86/CPU: re-work populating of cpu_data[]") Signed-off-by: Jan Beulich --- a/xen/arch

Re: [PATCH v3 1/2] docs: fusa: Define the requirements for XEN_VERSION hypercall.

2025-07-17 Thread Bertrand Marquis
Hi Ayan, > On 3 Jun 2025, at 12:15, Ayan Kumar Halder wrote: > > > On 21/05/2025 13:02, Bertrand Marquis wrote: >> Hi Ayan, > > Hi Bertrand, > >> >>> On 9 May 2025, at 13:24, Ayan Kumar Halder >>> wrote: >>> >>> Define the requirements which are common for all the commands for >>> XEN_VE

Re: [PATCH v3 2/2] docs: fusa: Add the requirements for few commands of XEN_VERSION

2025-07-17 Thread Bertrand Marquis
Hi Ayan, Sorry for the delay. > On 3 Jun 2025, at 18:11, Ayan Kumar Halder wrote: > > > On 21/05/2025 13:10, Bertrand Marquis wrote: >> Hi Ayan, > Hi Bertrand, >> >>> On 9 May 2025, at 13:24, Ayan Kumar Halder >>> wrote: >>> >>> Define requirements for specific commands. >>> >>> Signed-of

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

2025-07-17 Thread Orzel, Michal
On 15/07/2025 18:11, Alejandro Vallejo wrote: > Move all functions independent of "struct bootinfo" back to bootfdt.c > > Not a functional change. > > Signed-off-by: Alejandro Vallejo \ Reviewed-by: Michal Orzel ~Michal

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

2025-07-17 Thread Orzel, Michal
On 15/07/2025 18:11, Alejandro Vallejo wrote: > 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 needless

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

2025-07-17 Thread Grygorii Strashko
On 17.07.25 16:10, Jan Beulich wrote: On 17.07.2025 15:01, Grygorii Strashko wrote: --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -975,6 +975,9 @@ void send_guest_pirq(struct domain *d, const struct pirq *pirq) int port; struct evtchn *chn; +if (!IS_

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

2025-07-17 Thread Jakub Kicinski
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 fix. The "regression" happened 4 years ago

[PATCH] dom0less: Move single-xenstore check from bindings to set_xs_domain()

2025-07-17 Thread Alejandro Vallejo
Later patches extract the bindings to a separate file, where that global won't be available. Make the check when calling the function instead so the bindings remain agnostic. Signed-off-by: Alejandro Vallejo --- xen/common/device-tree/dom0less-build.c | 7 +++ 1 file changed, 3 insertions(+)

Re: [PATCH v10 1/9] tools/xl: Add altp2m_count parameter

2025-07-17 Thread Nick Rosbrook
On Wed, Jul 16, 2025 at 4:19 PM Petr Beneš wrote: > > 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 beh

Re: [PATCH v6 13/19] xen/x86: implement amd-cppc-epp driver for CPPC in active mode

2025-07-17 Thread Jan Beulich
On 11.07.2025 05:51, Penny Zheng wrote: > --- a/xen/arch/x86/acpi/cpufreq/amd-cppc.c > +++ b/xen/arch/x86/acpi/cpufreq/amd-cppc.c > @@ -67,7 +67,14 @@ > * max_perf. > * Field des_perf conveys performance level Xen governor is requesting. And > it > * may be set to any performance value in th

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

2025-07-17 Thread Stewart Hildebrand
On 7/14/25 23:16, Anderson Choi wrote: > ARINC653 specificaion requires partition scheduling to be deterministic s/specificaion/specification/ > and periodic over time. > > However, the use of current timestamp (now) as the baseline to calculate > next_major_frame and next_switch_time introduces

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

2025-07-17 Thread Jan Beulich
On 17.07.2025 15:01, Grygorii Strashko wrote: > --- a/xen/common/event_channel.c > +++ b/xen/common/event_channel.c > @@ -975,6 +975,9 @@ void send_guest_pirq(struct domain *d, const struct pirq > *pirq) > int port; > struct evtchn *chn; > > +if (!IS_ENABLED(CONFIG_HAS_PIRQ)) > +

Re: [PATCH v3 5/6] arm/mpu: Implement early_fdt_map support in MPU systems

2025-07-17 Thread Luca Fancellu
Hi Michal, > On 17 Jul 2025, at 14:00, Orzel, Michal wrote: > > > > On 17/07/2025 14:58, Hari Limaye wrote: >> Hi Michal, >> >>> On 17 Jul 2025, at 13:54, Orzel, Michal wrote: +/* + * DTB starting at a different address has been mapped, so destroy this + * be

Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages

2025-07-17 Thread Jan Beulich
On 17.07.2025 14:58, Grygorii Strashko wrote: > On 23.06.25 21:28, dm...@proton.me wrote: >> --- a/xen/arch/arm/domain_build.c >> +++ b/xen/arch/arm/domain_build.c >> @@ -2080,17 +2080,17 @@ void __init create_dom0(void) >> >> dom0 = domain_create(domid, &dom0_cfg, flags); >> if ( IS

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

2025-07-17 Thread Grygorii Strashko
From: Grygorii Strashko Enable build time optimization for evtchn_move_pirqs()/send_guest_pirq() on platforms without PIRQ support by adding compile time check for !IS_ENABLED(CONFIG_HAS_PIRQ) at the beginning of functions. This will shrink them to (on Arm64 with -O1): 264c : 264

Re: [PATCH v3 5/6] arm/mpu: Implement early_fdt_map support in MPU systems

2025-07-17 Thread Orzel, Michal
On 17/07/2025 14:58, Hari Limaye wrote: > Hi Michal, > >> On 17 Jul 2025, at 13:54, Orzel, Michal wrote: >>> +/* >>> + * DTB starting at a different address has been mapped, so destroy this >>> + * before continuing. >> I don't understand this scenario. Can you describe it in more

Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages

2025-07-17 Thread Grygorii Strashko
On 23.06.25 21:28, dm...@proton.me wrote: From: Denis Mukhin Use %pd for domain identification in error/panic messages in create_dom0(). No functional change. Signed-off-by: Denis Mukhin --- Changes since v9: - new patch --- xen/arch/arm/domain_build.c | 8 xen/arch/x86/setup.

Re: [PATCH v3 5/6] arm/mpu: Implement early_fdt_map support in MPU systems

2025-07-17 Thread Hari Limaye
Hi Michal, > On 17 Jul 2025, at 13:54, Orzel, Michal wrote: >> +/* >> + * DTB starting at a different address has been mapped, so destroy this >> + * before continuing. > I don't understand this scenario. Can you describe it in more details? > I know that early_fdt_map will be called

Re: [PATCH v3 5/6] arm/mpu: Implement early_fdt_map support in MPU systems

2025-07-17 Thread Orzel, Michal
On 15/07/2025 09:45, Hari Limaye wrote: > From: Luca Fancellu > > Implement the function early_fdt_map(), which is responsible for mapping > the Device Tree Blob in the early stages of the boot process, for MPU > systems. > > We make use of the map_pages_to_xen() and destroy_xen_mappings() AP

  1   2   >