Re: [PATCH v8] xen/console: introduce domain_console struct

2025-07-18 Thread dmkhn
On Fri, Jul 18, 2025 at 01:04:56PM +0200, Alejandro Vallejo wrote: > Hi, > > I like the new encapsulation, but I have a few questions. > > On Wed Jul 16, 2025 at 4:04 AM CEST, dmukhin wrote: > > From: Denis Mukhin > > > > Introduce domain_console for grouping data structures used for integrating

Re: [PATCH v2 15/17] tools/init-dom0less: Factor out xenstore setup

2025-07-18 Thread Jason Andryuk
On 2025-07-17 06:33, Juergen Gross wrote: On 16.07.25 23:15, Jason Andryuk wrote: Factor out the xenstore setup code into configure_xenstore().  This is in preparation for handling already-introduced domains. Signed-off-by: Jason Andryuk ---   tools/helpers/init-dom0less.c | 51 +++

Re: [PATCH v5 3/3] drivers: Make ioapic_sbdf and hpet_sbdf contain pci_sbdf_t

2025-07-18 Thread dmkhn
On Thu, Jul 17, 2025 at 08:31:27AM +0100, Andrii Sultanov wrote: > Following a similar change to amd_iommu struct, make two more structs > take pci_sbdf_t directly instead of seg and bdf separately. This lets us > drop several conversions from the latter to the former and simplifies > several compa

Re: [PATCH v5 1/3] drivers: Change amd_iommu struct to contain pci_sbdf_t, simplify code

2025-07-18 Thread dmkhn
On Thu, Jul 17, 2025 at 08:31:25AM +0100, Andrii Sultanov wrote: > Following on from 250d87dc3ff9 ("x86/msi: Change __msi_set_enable() to > take pci_sbdf_t"), make struct amd_iommu contain pci_sbdf_t directly > instead of specifying seg+bdf separately and regenerating sbdf_t from them, > which simp

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

2025-07-18 Thread Elliott Mitchell
On Wed, Jul 16, 2025 at 11:31:06AM -0700, Elliott Mitchell wrote: > On Wed, Jul 16, 2025 at 07:47:48AM +, Anthoine Bourgeois wrote: > > On Tue, Jul 15, 2025 at 12:19:34PM -0700, Elliott Mitchell wrote: > > >On Tue, Jul 15, 2025 at 08:21:40AM +, Anthoine Bourgeois wrote: > > >> > > >> Thank

[PATCH] x86/pv: Rework TRY_LOAD_SEG() to use asm goto()

2025-07-18 Thread Andrew Cooper
This moves the exception path to being out-of-line within the function, rather than in the .fixup section, which improves backtraces. Because the macro is used multiple times, the fault label needs declaring as local. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: R

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

2025-07-18 Thread Demi Marie Obenour
On 7/18/25 07:08, Nicola Vetrini wrote: > On 2025-07-18 11:28, Dmytro Prokopchuk1 wrote: >> On 7/18/25 12:17, Dmytro Prokopchuk wrote: >>> >>> >>> On 7/18/25 08:31, Jan Beulich wrote: On 17.07.2025 22:47, Dmytro Prokopchuk1 wrote: > > > On 4/23/25 20:54, victorm.l...@amd.com wrote:

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

2025-07-18 Thread Jakub Kicinski
On Fri, 18 Jul 2025 09:19:17 +0200 Jürgen Groß wrote: > 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 expe

Re: [PATCH] x86: Don't allow HVM alongside PV_SHIM_EXCLUSIVE

2025-07-18 Thread Alejandro Vallejo
On Fri Jul 18, 2025 at 5:41 PM CEST, Andrew Cooper wrote: > On 18/07/2025 4:12 pm, Alejandro Vallejo wrote: >> Otherwise compile-time errors ensue. It's a nonsensical configuration, >> but it's supriously triggered in randconfig jobs. >> >> Fixes: 8b5b49ceb3d9("x86: don't include domctl and alike i

[PATCH 1/4] x86/mwait-idle: Update vendor/family/model logic

2025-07-18 Thread Andrew Cooper
Switch to the new fields and constants. In mwait_idle_probe(), exit early for non-Intel CPUs. intel_idle_ids[] is a large (and ever increasing) table and it's not reasonable to scan it for other vendors, nor is it ideal to be emitting an ambigous error(ish) message. No practical change. Signed-

[PATCH 4/4] x86/intel-family: Resync with Linux

2025-07-18 Thread Andrew Cooper
This snapshot is Linux commit db4001f9cc32 ("x86/cpu/vfm: Delete all the *_FAM6_ CPU #defines"), now that Xen has switched off the old constant names. Leave a comment identifying the exact revision Xen is using. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger P

[PATCH 3/4] x86/spec-ctrl: Update vendor/family/model logic

2025-07-18 Thread Andrew Cooper
Switch to the new fields and constants. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné I've intentionally not converted the tables with raw numbers yet. That's not a mechanical change, and requires more care. --- xen/arch/x86/spec_ctrl.c | 162 +++

[PATCH 2/4] x86/cpu-policy: Update vendor/family/model logic

2025-07-18 Thread Andrew Cooper
Switch to the new fields and constants. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné This updates one related part in intel.c for ease of ordering subseuqent work. --- xen/arch/x86/cpu-policy.c | 19 --- xen/arch/x86/cpu/intel.c

[PATCH 0/4] x86: Convert remaining INTEL_FAM6_* users

2025-07-18 Thread Andrew Cooper
This is a mechanical change to use the VFM constants rather than the family-specific ones. https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1934721940 Andrew Cooper (4): x86/mwait-idle: Update vendor/family/model logic x86/cpu-policy: Update vendor/family/model logic x86/spec

Re: [PATCH] x86: Don't allow HVM alongside PV_SHIM_EXCLUSIVE

2025-07-18 Thread Andrew Cooper
On 18/07/2025 4:12 pm, Alejandro Vallejo wrote: > Otherwise compile-time errors ensue. It's a nonsensical configuration, > but it's supriously triggered in randconfig jobs. > > Fixes: 8b5b49ceb3d9("x86: don't include domctl and alike in shim-excl...") > Signed-off-by: Alejandro Vallejo > --- > xe

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

2025-07-18 Thread Anthony PERARD
On Wed, Jul 16, 2025 at 08:15:31PM +, 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 le

[PATCH] x86: Don't allow HVM alongside PV_SHIM_EXCLUSIVE

2025-07-18 Thread Alejandro Vallejo
Otherwise compile-time errors ensue. It's a nonsensical configuration, but it's supriously triggered in randconfig jobs. Fixes: 8b5b49ceb3d9("x86: don't include domctl and alike in shim-excl...") Signed-off-by: Alejandro Vallejo --- xen/arch/x86/hvm/Kconfig | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH v2 16/17] xen/riscv: implement mfn_valid() and page reference, ownership handling helpers

2025-07-18 Thread Oleksii Kurochko
On 7/2/25 12:09 PM, Jan Beulich wrote: On 10.06.2025 15:05, Oleksii Kurochko wrote: Implement the mfn_valid() macro to verify whether a given MFN is valid by checking that it falls within the range [start_page, max_page). These bounds are initialized based on the start and end addresses of RAM.

Re: [PATCH v2 16/17] xen/riscv: implement mfn_valid() and page reference, ownership handling helpers

2025-07-18 Thread Oleksii Kurochko
On 7/2/25 12:28 PM, Jan Beulich wrote: On 02.07.2025 12:09, Jan Beulich wrote: On 10.06.2025 15:05, Oleksii Kurochko wrote: @@ -613,3 +612,91 @@ void __iomem *ioremap(paddr_t pa, size_t len) { return ioremap_attr(pa, len, PAGE_HYPERVISOR_NOCACHE); } + +int page_is_ram_type(unsigned l

[PATCH v2 0/3] x86: Convert x86_cpu_id to VFM

2025-07-18 Thread Andrew Cooper
This is the next part of the VFM converstion, focusing on struct x86_cpu_id. Some parts are already committed. See patches for details vs v1. https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1934588566 Andrew Cooper (3): x86/match-cpu: Improvements to x86_match_cpu() x86/matc

[PATCH v2 1/3] x86/match-cpu: Improvements to x86_match_cpu()

2025-07-18 Thread Andrew Cooper
Xen's use of struct x86_cpu_id is a bit different to Linux's, so we can simplify the loop termination condition. Leave a comment explaining Xen's assumptions. Switch to Xen style, as we've properly devated from Linux, and switch to the new vendor/family/model names. No practical change. Signed-

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

2025-07-18 Thread Andrew Cooper
With the ability to match on steppings, introduce a new X86_MATCH_VFMS() helper to match a specific stepping, and use it to rework deadline_match[]. Currently, the table is scanned on all systems, even those without the TSC_DEADLINE feature. Introduce another early exit for that case, which remov

[PATCH v2 2/3] x86/match-cpu: Support matching on steppings

2025-07-18 Thread Andrew Cooper
Architecturally, stepping is a 4-bit field, so a uint16_t suffices for a bitmap of steppings. In order to keep the size of struct x86_cpu_id the same, shrink the vendor and family fields; there's no need for them to be uint16_t in Xen, and this matches the size of the fields in cpuinfo_x86. No fu

Re: [XEN][PATCH 2/2] xen/arm: irq: drop unreachable pirq callbacks

2025-07-18 Thread Jan Beulich
On 18.07.2025 13:47, Grygorii Strashko wrote: > > > On 18.07.25 13:22, Jan Beulich wrote: >> On 18.07.2025 12:11, Grygorii Strashko wrote: >>> From: Grygorii Strashko >>> >>> Hence all common PIRQ code is under CONFIG_HAS_PIRQ idefs corresponding Arm >>> arch callbacks become unreachable, so dro

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

2025-07-18 Thread Jan Beulich
On 18.07.2025 12:23, Andrew Cooper wrote: > On 18/07/2025 11:19 am, Jan Beulich wrote: >> On 18.07.2025 12:07, Andrew Cooper wrote: >>> With the ability to match on steppings, introduce a new X86_MATCH_VFMS() >>> helper to match a specific stepping, and use it to rework deadline_match[]. >>> >>> No

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

2025-07-18 Thread Andrew Cooper
On 18/07/2025 3:06 pm, Jan Beulich wrote: > On 18.07.2025 12:55, Andrew Cooper wrote: >> On 18/07/2025 11:23 am, Andrew Cooper wrote: >>> On 18/07/2025 11:19 am, Jan Beulich wrote: On 18.07.2025 12:07, Andrew Cooper wrote: > With the ability to match on steppings, introduce a new X86_MATCH

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

2025-07-18 Thread Jan Beulich
On 18.07.2025 12:55, Andrew Cooper wrote: > On 18/07/2025 11:23 am, Andrew Cooper wrote: >> On 18/07/2025 11:19 am, Jan Beulich wrote: >>> On 18.07.2025 12:07, Andrew Cooper wrote: With the ability to match on steppings, introduce a new X86_MATCH_VFMS() helper to match a specific stepping

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

2025-07-18 Thread Andrew Cooper
On 18/07/2025 2:28 pm, Jan Beulich wrote: >> uint16_t model; > Whereas the model is strictly limited to 8 bits. There is space in here, if we need it, but you can't shrink it without breaking the check for the NULL entry (going back to the first obfuscation). >>> Breaki

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 v13 1/2] arm/pci: add pci_passhtrough_enabled check to pci_device_reset

2025-07-18 Thread Jan Beulich
On 18.07.2025 13:52, Mykyta Poturai wrote: > On 16.07.25 11:36, Jan Beulich wrote: >> On 16.07.2025 09:43, Mykyta Poturai wrote: >>> Without pci-passthrough=on Xen does not know anything about present PCI >>> devices due to PHYSDEVOP_pci_device_add not executing. >> >> While the latter half of the

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

2025-07-18 Thread Jan Beulich
On 18.07.2025 12:29, Andrew Cooper wrote: > On 18/07/2025 6:53 am, Jan Beulich wrote: >> 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

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

2025-07-18 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Fri, Jul 18, 2025 at 07:59:50AM +0200, Markus Armbruster wrote: >> 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.

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

2025-07-18 Thread Lorenzo Stoakes
On Fri, Jul 18, 2025 at 12:54:38PM +0200, David Hildenbrand wrote: > On 18.07.25 12:41, Lorenzo Stoakes wrote: > > On Thu, Jul 17, 2025 at 10:31:28PM +0200, David Hildenbrand wrote: > > > On 17.07.25 20:29, Lorenzo Stoakes wrote: > > > > On Thu, Jul 17, 2025 at 01:52:08PM +0200, David Hildenbrand w

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

2025-07-18 Thread Lorenzo Stoakes
On Fri, Jul 18, 2025 at 01:04:30PM +0200, David Hildenbrand wrote: > > > > Yeah sorry I was in 'what locks do we need' mode and hadn't shifted back > > here, > > but I guess the intent is that the caller _must_ hold this lock. > > > > I know it's nitty and annoying (sorry!) but as asserting seems

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

2025-07-18 Thread Lorenzo Stoakes
On Fri, Jul 18, 2025 at 01:06:30PM +0200, David Hildenbrand wrote: > On 18.07.25 12:47, Lorenzo Stoakes wrote: > > On Thu, Jul 17, 2025 at 10:14:33PM +0200, David Hildenbrand wrote: > > > On 17.07.25 22:03, Lorenzo Stoakes wrote: > > > > On Thu, Jul 17, 2025 at 01:52:11PM +0200, David Hildenbrand w

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

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

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

2025-07-18 Thread Lorenzo Stoakes
On Thu, Jul 17, 2025 at 10:12:37PM +0200, David Hildenbrand wrote: > > > > > > -/* > > > - * 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 > > > + *

[RFC PATCH v4 2/2] ci: enable fuzzing for arm64

2025-07-18 Thread Volodymyr Babchuk
Add new alpine-based build that enables LibAFL-based fuzzer. Use this new build to run two fuzzing sessions: hypercall fuzzing and gicv2 fuzzing. Currently, this is all the fuzzing modes supported by xen fuzzer. Every fuzzing session will run approximately 10 minutes. Fuzzing session will provide

[RFC PATCH v4 1/2] xen: add libafl-qemu fuzzer support

2025-07-18 Thread Volodymyr Babchuk
LibAFL, which is a part of AFL++ project is a instrument that allows us to perform fuzzing on beremetal code (Xen hypervisor in this case) using QEMU as an emulator. It employs QEMU's ability to create snapshots to run many tests relatively quickly: system state is saved right before executing a ne

[RFC PATCH v4 0/2] xen: add libalf fuzzing support

2025-07-18 Thread Volodymyr Babchuk
It is possible to use LibAFL with LibAFL-QEMU to fuzz different baremetal programs, including Xen hypervisor. This small series tries to add minimal (but extenable) support for fuzzing. changes in v4: - No global changes, only minor changes in patches, see local changelog. changes in v3: - A

Re: [PATCH v2] xen/efi: Remove PrintMessage function

2025-07-18 Thread Andrew Cooper
On 18/07/2025 1:11 pm, Frediano Ziglio wrote: > The function is similar to PrintStr with an implicit newline > added to the string. > In Xen this is not a common pattern and this is used in EFI > ARM code only making it not much coherent with X86 code > so use PrintStr directly to make the code mor

Re: [PATCH] xen/efi: Reuse PrintMessage function

2025-07-18 Thread Andrew Cooper
On 18/07/2025 1:00 pm, Frediano Ziglio wrote: > On Fri, Jul 18, 2025 at 12:12 PM Andrew Cooper > wrote: >> On 18/07/2025 10:41 am, Frediano Ziglio wrote: >>> PrintMessage function print a message string followed by a >>> new line. >>> Move the function from ARM specific code to common code. >>> Re

[PATCH v2] xen/efi: Remove PrintMessage function

2025-07-18 Thread Frediano Ziglio
The function is similar to PrintStr with an implicit newline added to the string. In Xen this is not a common pattern and this is used in EFI ARM code only making it not much coherent with X86 code so use PrintStr directly to make the code more coherent. Signed-off-by: Frediano Ziglio --- Changes

Re: [PATCH] xen/efi: Reuse PrintMessage function

2025-07-18 Thread Frediano Ziglio
On Fri, Jul 18, 2025 at 12:12 PM Andrew Cooper wrote: > > On 18/07/2025 10:41 am, Frediano Ziglio wrote: > > PrintMessage function print a message string followed by a > > new line. > > Move the function from ARM specific code to common code. > > Reuse it in EFI code. > > No functional changes. >

Re: [PATCH v13 1/2] arm/pci: add pci_passhtrough_enabled check to pci_device_reset

2025-07-18 Thread Mykyta Poturai
On 16.07.25 11:36, Jan Beulich wrote: > On 16.07.2025 09:43, Mykyta Poturai wrote: >> Without pci-passthrough=on Xen does not know anything about present PCI >> devices due to PHYSDEVOP_pci_device_add not executing. > > While the latter half of the sentence is true, Xen may know of PCI devices > b

Re: [XEN][PATCH 2/2] xen/arm: irq: drop unreachable pirq callbacks

2025-07-18 Thread Grygorii Strashko
On 18.07.25 13:22, Jan Beulich wrote: On 18.07.2025 12:11, Grygorii Strashko wrote: From: Grygorii Strashko Hence all common PIRQ code is under CONFIG_HAS_PIRQ idefs corresponding Arm arch callbacks become unreachable, so drop them. Signed-off-by: Grygorii Strashko --- xen/arch/arm/irq.

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

2025-07-18 Thread Grygorii Strashko
On 17.07.25 16:03, Jan Beulich wrote: 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

Re: [PATCH v2 14/17] xen/riscv: implement p2m_next_level()

2025-07-18 Thread Oleksii Kurochko
On 7/17/25 12:37 PM, Jan Beulich wrote: On 17.07.2025 11:42, Oleksii Kurochko wrote: On 7/16/25 6:12 PM, Jan Beulich wrote: On 16.07.2025 17:53, Oleksii Kurochko wrote: On 7/16/25 1:43 PM, Jan Beulich wrote: On 16.07.2025 13:32, Oleksii Kurochko wrote: On 7/2/25 10:35 AM, Jan Beulich wrote:

Re: [PATCH] xen/efi: Reuse PrintMessage function

2025-07-18 Thread Andrew Cooper
On 18/07/2025 10:41 am, Frediano Ziglio wrote: > PrintMessage function print a message string followed by a > new line. > Move the function from ARM specific code to common code. > Reuse it in EFI code. > No functional changes. > > Signed-off-by: Frediano Ziglio Please no. Hiding \n (or \r\n) in

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

2025-07-18 Thread Alejandro Vallejo
On Thu Jul 17, 2025 at 9:58 PM CEST, dmkhn wrote: > 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 wrot

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

2025-07-18 Thread Nicola Vetrini
On 2025-07-18 11:28, Dmytro Prokopchuk1 wrote: On 7/18/25 12:17, Dmytro Prokopchuk wrote: On 7/18/25 08:31, Jan Beulich wrote: 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

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

2025-07-18 Thread David Hildenbrand
On 18.07.25 12:47, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 10:14:33PM +0200, David Hildenbrand wrote: 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 beca

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

2025-07-18 Thread David Hildenbrand
Yeah sorry I was in 'what locks do we need' mode and hadn't shifted back here, but I guess the intent is that the caller _must_ hold this lock. I know it's nitty and annoying (sorry!) but as asserting seems to not be a possibility here, could we spell these out as a series of points like: /*

Re: [PATCH v8] xen/console: introduce domain_console struct

2025-07-18 Thread Alejandro Vallejo
Hi, I like the new encapsulation, but I have a few questions. On Wed Jul 16, 2025 at 4:04 AM CEST, dmukhin wrote: > 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-relat

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

2025-07-18 Thread Andrew Cooper
On 18/07/2025 11:23 am, Andrew Cooper wrote: > On 18/07/2025 11:19 am, Jan Beulich wrote: >> On 18.07.2025 12:07, Andrew Cooper wrote: >>> With the ability to match on steppings, introduce a new X86_MATCH_VFMS() >>> helper to match a specific stepping, and use it to rework deadline_match[]. >>> >>>

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

2025-07-18 Thread David Hildenbrand
On 18.07.25 12:41, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 10:31:28PM +0200, David Hildenbrand wrote: 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?) different

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

2025-07-18 Thread Arend van Spriel
On 7/15/2025 3:44 PM, 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/ I think it has been said on other patches but it is not common to link

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

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

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

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

Re: [XEN][PATCH 2/2] xen/arm: irq: drop unreachable pirq callbacks

2025-07-18 Thread Jan Beulich
On 18.07.2025 12:11, Grygorii Strashko wrote: > From: Grygorii Strashko > > Hence all common PIRQ code is under CONFIG_HAS_PIRQ idefs corresponding Arm > arch callbacks become unreachable, so drop them. > > Signed-off-by: Grygorii Strashko > --- > xen/arch/arm/irq.c | 29 --

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

2025-07-18 Thread Andrew Cooper
On 18/07/2025 6:53 am, Jan Beulich wrote: > 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_cp

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

2025-07-18 Thread Andrew Cooper
On 18/07/2025 11:19 am, Jan Beulich wrote: > On 18.07.2025 12:07, Andrew Cooper wrote: >> With the ability to match on steppings, introduce a new X86_MATCH_VFMS() >> helper to match a specific stepping, and use it to rework deadline_match[]. >> >> Notably this removes the overloading of driver_data

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

2025-07-18 Thread Jan Beulich
On 18.07.2025 12:07, Andrew Cooper wrote: > With the ability to match on steppings, introduce a new X86_MATCH_VFMS() > helper to match a specific stepping, and use it to rework deadline_match[]. > > Notably this removes the overloading of driver_data possibly being a function > pointer, and remove

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

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

[XEN][PATCH] xen/arm: remove unused dump_p2m_lookup()

2025-07-18 Thread Grygorii Strashko
From: Grygorii Strashko The dump_p2m_lookup() is not used, so remove it. Signed-off-by: Grygorii Strashko --- xen/arch/arm/include/asm/page.h | 2 -- xen/arch/arm/mmu/p2m.c | 13 - 2 files changed, 15 deletions(-) diff --git a/xen/arch/arm/include/asm/page.h b/xen/arch/a

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

2025-07-18 Thread Grygorii Strashko
From: Grygorii Strashko On platforms without PIRQ support evtchn_move_pirqs()/send_guest_pirq() functions are unreachable (Misra rule 2.1). Move these function under CONFIG_HAS_PIRQ ifdefs to fix Misra rule 2.1 violation and resolve call of evtchn_move_pirqs() from common /sched/core.c vcpu_move

[XEN][PATCH 2/2] xen/arm: irq: drop unreachable pirq callbacks

2025-07-18 Thread Grygorii Strashko
From: Grygorii Strashko Hence all common PIRQ code is under CONFIG_HAS_PIRQ idefs corresponding Arm arch callbacks become unreachable, so drop them. Signed-off-by: Grygorii Strashko --- xen/arch/arm/irq.c | 29 - 1 file changed, 29 deletions(-) diff --git a/xen/arc

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

2025-07-18 Thread Jan Beulich
On 18.07.2025 11:17, Dmytro Prokopchuk1 wrote: > On 7/18/25 08:31, Jan Beulich wrote: >> On 17.07.2025 22:47, Dmytro Prokopchuk1 wrote: >>> I tried to play with Rule 21.1 deviations. >>> >>> After applying the following configurations: >>> >>> -config=MC3A2.R21.1,macros+={safe, "^offsetof$ || ^(is|

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

2025-07-18 Thread Andrew Cooper
With the ability to match on steppings, introduce a new X86_MATCH_VFMS() helper to match a specific stepping, and use it to rework deadline_match[]. Notably this removes the overloading of driver_data possibly being a function pointer, and removes the latent bug where the target functions are miss

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

2025-07-18 Thread Oleksii Kurochko
On 7/17/25 12:25 PM, Jan Beulich wrote: On 17.07.2025 10:56, Oleksii Kurochko wrote: On 7/16/25 6:18 PM, Jan Beulich wrote: On 16.07.2025 18:07, Oleksii Kurochko wrote: On 7/16/25 1:31 PM, Jan Beulich wrote: On 15.07.2025 16:47, Oleksii Kurochko wrote: On 7/1/25 5:08 PM, Jan Beulich wrote:

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

2025-07-18 Thread Alejandro Vallejo
On Fri Jul 18, 2025 at 8:42 AM CEST, Jan Beulich wrote: > 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/

[PATCH] xen/efi: Reuse PrintMessage function

2025-07-18 Thread Frediano Ziglio
PrintMessage function print a message string followed by a new line. Move the function from ARM specific code to common code. Reuse it in EFI code. No functional changes. Signed-off-by: Frediano Ziglio --- xen/arch/arm/efi/efi-boot.h | 7 --- xen/arch/x86/efi/efi-boot.h | 2 +- xen/common/

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

2025-07-18 Thread Dmytro Prokopchuk1
On 7/18/25 12:17, Dmytro Prokopchuk wrote: > > > On 7/18/25 08:31, Jan Beulich wrote: >> 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 >

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

2025-07-18 Thread Dmytro Prokopchuk1
On 7/18/25 08:31, Jan Beulich wrote: > 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

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

2025-07-18 Thread Anderson Choi
ARINC653 specificaion requires partition scheduling to be deterministic and periodic over time. However, the use of current timestamp (now) as the baseline to calculate next_major_frame and next_switch_time introduces a delay in the start of major frame at every period, which breaks determinism an

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

2025-07-18 Thread Daniel P . Berrangé
On Fri, Jul 18, 2025 at 07:59:50AM +0200, Markus Armbruster wrote: > 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

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

2025-07-18 Thread David Hildenbrand
On 18.07.25 09:59, Demi Marie Obenour wrote: On 7/18/25 03:44, David Hildenbrand wrote: On 18.07.25 00:06, Demi Marie Obenour wrote: 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 pro

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

2025-07-18 Thread Anthoine Bourgeois
On Thu, Jul 17, 2025 at 07:29:51AM -0700, 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

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

2025-07-18 Thread Demi Marie Obenour
On 7/18/25 03:44, David Hildenbrand wrote: > On 18.07.25 00:06, Demi Marie Obenour wrote: >> 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 corrup

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

2025-07-18 Thread David Hildenbrand
On 18.07.25 00:06, Demi Marie Obenour wrote: 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

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