Re: [PATCH] xen/efi: Fix crash with initial empty EFI options

2025-07-07 Thread Frediano Ziglio
On Mon, Jul 7, 2025 at 5:04 PM Jan Beulich wrote: > > On 07.07.2025 17:51, Frediano Ziglio wrote: > > On Mon, Jul 7, 2025 at 4:42 PM Jan Beulich wrote: > >> > >> On 07.07.2025 17:11, Frediano Ziglio wrote: > >>> EFI code path split options from EFI LoadOptions fields in 2 > >>> pieces, first EFI

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

2025-07-07 Thread Juergen Gross
This is a small add-on series after the live-update series sent a week ago. I realized that having the shared info page in the normal RAM area is a bad idea when considering kexec, as the new kernel might want it at a different location. So this series is moving the shared info page away from the

Re: [PATCH v3 02/22] include/xen/slr-table.h: Secure Launch Resource Table definitions

2025-07-07 Thread Jan Beulich
On 07.07.2025 19:31, Sergii Dmytruk wrote: > On Mon, Jul 07, 2025 at 10:29:46AM +0200, Jan Beulich wrote: ... then isn't used right here, instead requiring a cast somewhere (presumably, as code using this isn't visible in this patch). >>> >>> As was mentioned earlier: because size o

RE: [PATCH v5 18/18] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver

2025-07-07 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Tuesday, June 17, 2025 6:38 PM > To: Penny, Zheng > Cc: Huang, Ray ; Anthony PERARD > ; Andrew Cooper ; > Orzel, Michal ; Julien Grall ; Roger Pau > Monné ; Stefano Stabellini ; > xen- > de...@lists.xenproject.org > Subject: Re:

Re: [PATCH 2/2] xen/x86: introduce AMD_MCE_NONFATAL

2025-07-07 Thread Demi Marie Obenour
On 7/7/25 20:07, Stefano Stabellini wrote: > Today, checking for non-fatal MCE errors on ARM is very invasive: it s/ARM/AMD/ -- Sincerely, Demi Marie Obenour (she/her/hers) OpenPGP_0xB288B55FFF9C22C1.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signatu

Re: [PATCH v3 02/22] include/xen/slr-table.h: Secure Launch Resource Table definitions

2025-07-07 Thread Jan Beulich
On 06.07.2025 18:55, Sergii Dmytruk wrote: > On Wed, Jul 02, 2025 at 04:36:27PM +0200, Jan Beulich wrote: >> On 30.05.2025 15:17, Sergii Dmytruk wrote: >>> The file provides constants, structures and several helper functions for >>> parsing SLRT. >>> >>> The data described by the structures is pass

Re: [PATCH v3 07/22] x86/mtrr: expose functions for pausing caching

2025-07-07 Thread Jan Beulich
On 06.07.2025 19:34, Sergii Dmytruk wrote: > On Wed, Jul 02, 2025 at 04:57:12PM +0200, Jan Beulich wrote: >>> @@ -440,9 +436,10 @@ static DEFINE_SPINLOCK(set_atomicity_lock); >>> * has been called. >>> */ >>> >>> -static bool prepare_set(void) >>> +struct mtrr_pausing_state mtrr_pause_caching(v

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

2025-07-07 Thread Orzel, Michal
On 02/07/2025 16:13, Hari Limaye wrote: > From: Penny Zheng > > Introduce map_pages_to_xen() that is implemented using a new helper, > xen_mpumap_update(), which is responsible for updating Xen MPU memory > mapping table(xen_mpumap), including creating a new entry, updating > or destroying an

Re: [XEN PATCH 2/5] iommu: address violation of MISRA C Rule 5.5

2025-07-07 Thread Jan Beulich
On 04.07.2025 22:39, Dmytro Prokopchuk1 wrote: > Address a violation of MISRA C:2012 Rule 5.5: > "Identifiers shall be distinct from macro names". > > Reports for service MC3A2.R5.5: > xen/include/xen/iommu.h: non-compliant struct 'page_list_head' > xen/include/xen/mm.h: non-compliant macro 'page_

[PATCH v6 6/7] xen/riscv: implement setup_irq()

2025-07-07 Thread Oleksii Kurochko
Introduce support for IRQ setup on RISC-V by implementing setup_irq() and __setup_irq(), adapted and extended from an initial implementation by [1]. __setup_irq() does the following: - Sets up an IRQ action. - Validates that shared IRQs have non-NULL `dev_id` and are only used when existin

[PATCH v6 0/7] riscv: introduce basic UART support and interrupts for hypervisor mode

2025-07-07 Thread Oleksii Kurochko
The patch series introduces basic UART support (in interrupt mode) and support of interrupts for hypervisor mode. To implement this the following has been added: - APLIC and IMISC initialization. - Introduce of intc_hw_operations abstraction. - Introduce some APLIC and IMSIC operations. - Introdu

[PATCH v6 4/7] xen/riscv: implementation of aplic and imsic operations

2025-07-07 Thread Oleksii Kurochko
Introduce interrupt controller descriptor for host APLIC to describe the low-lovel hardare. It includes implementation of the following functions: - aplic_irq_startup() - aplic_irq_enable() - aplic_irq_disable() - aplic_set_irq_affinity() As APLIC is used in MSI mode it requires to enable/disa

[PATCH v6 3/7] xen/riscv: introduce intc_init() and helpers

2025-07-07 Thread Oleksii Kurochko
Introduce intc_init() to initialize the interrupt controller using the registered hardware ops. Also add intc_route_irq_to_xen() to route IRQs to Xen, with support for setting IRQ type and priority via new internal helpers intc_set_irq_type() and intc_set_irq_priority(). Call intc_init() to do bas

[PATCH v6 1/7] xen/riscv: imsic_init() implementation

2025-07-07 Thread Oleksii Kurochko
imsic_init() is introduced to parse device tree node, which has the following bindings [2], and based on the parsed information update IMSIC configuration which is stored in imsic_cfg. The following helpers are introduces for imsic_init() usage: - imsic_parse_node() parses IMSIC node from DTS

[PATCH v6 5/7] xen/riscv: add external interrupt handling for hypervisor mode

2025-07-07 Thread Oleksii Kurochko
Implement functions necessarry to have working external interrupts in hypervisor mode. The following changes are done: - Add a common function intc_handle_external_irq() to call APLIC specific function to handle an interrupt. - Update do_trap() function to handle IRQ_S_EXT case; add the che

[PATCH v6 2/7] xen/riscv: aplic_init() implementation

2025-07-07 Thread Oleksii Kurochko
aplic_init() function does the following few things: - checks that IMSIC in device tree node ( by checking msi-parent property in APLIC node ) is present as current one implmenetaion of AIA is supported only MSI method. - initialize IMSIC based on IMSIC device tree node - Read value of AP

[PATCH v6 7/7] xen/riscv: add basic UART support

2025-07-07 Thread Oleksii Kurochko
Update Kconfig to select GENERIC_UART_INIT for basic UART init ( find a dt node and call device specific device_init() ). Drop `default n if RISCV` statement for config HAS_NS16550 as now ns16550 is ready to be compiled and used by RISC-V. Also, make the config user selectable for everyone except

Re: [PATCH v2 11/17] xen/riscv: implement p2m_set_entry() and __p2m_set_entry()

2025-07-07 Thread Jan Beulich
On 07.07.2025 13:46, Oleksii Kurochko wrote: > On 7/7/25 9:20 AM, Jan Beulich wrote: >> On 04.07.2025 17:01, Oleksii Kurochko wrote: >>> On 7/1/25 3:49 PM, Jan Beulich wrote: On 10.06.2025 15:05, Oleksii Kurochko wrote: > This patch introduces p2m_set_entry() and its core helper > __p

Re: [PATCH 3/3] hvmloader: add new SMBIOS tables (7,8,9,26,27,28)

2025-07-07 Thread Jan Beulich
On 05.07.2025 01:48, Petr Beneš wrote: > On Wed, Jul 2, 2025 at 9:15 AM Jan Beulich wrote: >> >> On 02.07.2025 01:45, Petr Beneš wrote: >>> From: Petr Beneš >> >> This isn't in line with the first S-o-b, nor with the fact that in the cover >> letter you say this was previously submitted (and henc

Re: [PATCH v2 4/5] xen/arm: Implement standard PV time interface as per ARM DEN 0057A

2025-07-07 Thread Jan Beulich
On 05.07.2025 16:27, Koichiro Den wrote: > --- a/xen/include/xen/macros.h > +++ b/xen/include/xen/macros.h > @@ -5,6 +5,7 @@ > #define ROUNDDOWN(x, a) ((x) & ~((a) - 1)) > > #define IS_ALIGNED(val, align) (!((val) & ((align) - 1))) > +#define IS_POWER_OF_TWO(val) ((val) && !((val) & ((val) -

Re: [PATCH v3 08/22] x86/slaunch: restore boot MTRRs after Intel TXT DRTM

2025-07-07 Thread Jan Beulich
On 06.07.2025 23:55, Sergii Dmytruk wrote: > On Wed, Jul 02, 2025 at 05:11:26PM +0200, Jan Beulich wrote: >> On 30.05.2025 15:17, Sergii Dmytruk wrote: >>> @@ -442,6 +444,9 @@ static uint64_t __init mtrr_top_of_ram(void) >>> ASSERT(paddr_bits); >>> addr_mask = ((1ULL << paddr_bits) - 1) &

Re: [PATCH v6] automation/eclair: update configuration of D4.10

2025-07-07 Thread Anthony PERARD
On Mon, Jun 23, 2025 at 06:19:27PM -0700, Stefano Stabellini wrote: > diff --git a/xen/include/xen/compile.h.in b/xen/include/xen/compile.h.in > index 3151d1e7d1..9206341ba6 100644 > --- a/xen/include/xen/compile.h.in > +++ b/xen/include/xen/compile.h.in > @@ -1,3 +1,6 @@ > +#ifndef XEN_COMPILE_H >

Re: [PATCH 2/2] xen/arm: Skip loops in init_pdx() when no PDX compression is used

2025-07-07 Thread Orzel, Michal
On 07/07/2025 13:56, Hari Limaye wrote: > Hi Michal, > >> On Fri, Jul 04, 2025 at 09:54:28AM +, Michal Orzel wrote: >> When CONFIG_PDX_COMPRESSION=n, pdx_init_mask(), pdx_region_mask() and >> pfn_pdx_hole_setup() are just stubs doing nothing. It does not make >> sense to keep the two loops

Re: [PATCH v7 2/7] tools/xl: Add altp2m_count parameter

2025-07-07 Thread Jan Beulich
On 01.07.2025 21:54, Petr Beneš wrote: > --- a/tools/libs/light/libxl_create.c > +++ b/tools/libs/light/libxl_create.c > @@ -421,6 +421,15 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, > return -ERROR_INVAL; > } > > +if (b_info->altp2m_count == LIBXL_ALTP2M_COUNT_DEF

[PATCH] x86/PVH: extend checking in hwdom_fixup_p2m()

2025-07-07 Thread Jan Beulich
We're generally striving to minimize behavioral differences between PV and PVH Dom0. Using (just?) is_memory_hole() in the PVH case looks quite a bit weaker to me, compared to the page ownership check done in the PV case. Extend checking accordingly. Signed-off-by: Jan Beulich --- The addition ma

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

2025-07-07 Thread Alejandro Vallejo
On Thu Jul 3, 2025 at 8:04 AM CEST, Jan Beulich wrote: > On 02.07.2025 17:34, Alejandro Vallejo wrote: >> On Wed Jul 2, 2025 at 5:15 PM CEST, Jan Beulich wrote: >>> On 02.07.2025 17:09, Alejandro Vallejo wrote: On Wed Jul 2, 2025 at 3:15 PM CEST, Jan Beulich wrote: > On 01.07.2025 12:56, A

Re: [PATCH v7 2/7] tools/xl: Add altp2m_count parameter

2025-07-07 Thread Petr Beneš
On Mon, Jul 7, 2025 at 3:35 PM Anthony PERARD wrote: > > It seems that altp2m_count is going to be used for the creation of all > guest, right? That is in addition to HVM, it will be also used for PV > guest and on Arm, and any other architectures that could be added. > > Anthony PERARD I'm sugge

Re: [PATCH v7 2/7] tools/xl: Add altp2m_count parameter

2025-07-07 Thread Anthony PERARD
On Tue, Jul 01, 2025 at 07:54:24PM +, Petr Beneš wrote: > diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c > index 8a85fba1cf..acf7fd9837 100644 > --- a/tools/libs/light/libxl_create.c > +++ b/tools/libs/light/libxl_create.c > @@ -421,6 +421,15 @@ int libxl__domain

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

2025-07-07 Thread Anthony PERARD
On Tue, Jul 01, 2025 at 03:11:39PM +0300, Mykola Kvach wrote: > On Fri, Jun 27, 2025 at 3:37 PM Anthony PERARD wrote: > > On Thu, Jun 26, 2025 at 11:12:46AM +0300, Mykola Kvach wrote: > > > Both scenarios are rare and typically require very small watchdog > > > timeouts combined with significant d

Re: [PATCH v2 11/17] xen/riscv: implement p2m_set_entry() and __p2m_set_entry()

2025-07-07 Thread Jan Beulich
On 04.07.2025 17:01, Oleksii Kurochko wrote: > On 7/1/25 3:49 PM, Jan Beulich wrote: >> On 10.06.2025 15:05, Oleksii Kurochko wrote: >>> This patch introduces p2m_set_entry() and its core helper __p2m_set_entry() >>> for >>> RISC-V, based loosely on the Arm implementation, with several >>> RISC-V

Re: [XEN PATCH 3/5] x86/irq: address violation of MISRA C Rule 5.5

2025-07-07 Thread Jan Beulich
On 04.07.2025 22:39, Dmytro Prokopchuk1 wrote: > Address a violation of MISRA C:2012 Rule 5.5: > "Identifiers shall be distinct from macro names". > > Reports for service MC3A2.R5.5: > xen/include/xen/irq.h: non-compliant function `pirq_cleanup_check(struct > pirq*, struct domain*)' > xen/include

[PATCH v1 3/3] iommu/ipmmu-vmsa: Implement basic PCIE-IPMMU OSID support

2025-07-07 Thread Mykyta Poturai
From: Oleksandr Tyshchenko Program PCIE BDF-OSID assignment according to the S4_PCIe_IPMMU-OSID when adding PCI device to the IOMMU in ipmmu_add_device callback. This is needed for being able to assign PCI devices to different domains at the same time. Programmed OSID is emmited as sideband data

[PATCH v1 0/3] IPMMU handling for PCIe Passthrough on ARM

2025-07-07 Thread Mykyta Poturai
This series introduces IPMMU handling for PCIe passthrough on ARM. It includes changes to pci-designware, pci-host-rcar and ipmmu-vmsa drivers to enable configuring BDF->OSID->uTLB translation chain needed to pass different PCIe devices to different domains. Tested on RCar S4 Spider board. Mykyta

[PATCH v1 2/3] pci/rcar: implement OSID configuration for Renesas RCar Gen4 PCIe host

2025-07-07 Thread Mykyta Poturai
For IPMMU to be able to associate a specific PCI device with it's TLB the BDF to OSID mapping needs to be set up in the host bridge. The configured OSID is then emmited as a sideband data on the AXI bus during PCI DMA transactions. OSID configuration registers are located in the "app" region of the

[PATCH v1 1/3] arm/pci: allow designware-based hosts to have private data

2025-07-07 Thread Mykyta Poturai
Introduce an additional private data field in `dw_pcie_priv` to allow vendors to store custom data without interfering with bridge->priv. Also add get/set pair to make accesing that private data less cumbersome. Signed-off-by: Mykyta Poturai --- xen/arch/arm/pci/pci-designware.c | 12 +++

Re: [PATCH 2/2] xen/arm: Skip loops in init_pdx() when no PDX compression is used

2025-07-07 Thread Hari Limaye
Hi Michal, > On Fri, Jul 04, 2025 at 09:54:28AM +, Michal Orzel wrote: > When CONFIG_PDX_COMPRESSION=n, pdx_init_mask(), pdx_region_mask() and > pfn_pdx_hole_setup() are just stubs doing nothing. It does not make > sense to keep the two loops iterating over all the memory banks. > > Signed-of

Re: [PATCH 2/2] xen/arm: Skip loops in init_pdx() when no PDX compression is used

2025-07-07 Thread Hari Limaye
Apologies for noise, my previous message was missing the intended tags: On Fri, Jul 04, 2025 at 09:54:28AM +, Michal Orzel wrote: > When CONFIG_PDX_COMPRESSION=n, pdx_init_mask(), pdx_region_mask() and > pfn_pdx_hole_setup() are just stubs doing nothing. It does not make > sense to keep the tw

Re: [PATCH v2 5/5] xen/arm: Support ARM standard PV time for domains created via toolstack

2025-07-07 Thread Jan Beulich
On 05.07.2025 16:27, Koichiro Den wrote: > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -180,7 +180,21 @@ int xenmem_add_to_physmap_one( > case XENMAPSPACE_dev_mmio: > rc = map_dev_mmio_page(d, gfn, _mfn(idx)); > return rc; > +case XENMAPSPACE_pv_time: > +#ifdef

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

2025-07-07 Thread Orzel, Michal
On 02/07/2025 16:13, Hari Limaye wrote: > From: Luca Fancellu > > Implement a function to find the index of a MPU region in the xen_mpumap > MPU region array. This function will be used in future commits to > implement creating and destroying MPU regions. > > Signed-off-by: Luca Fancellu > S

Re: [PATCH v3 01/22] x86/include/asm/intel-txt.h: constants and accessors for TXT registers and heap

2025-07-07 Thread Jan Beulich
On 06.07.2025 17:57, Sergii Dmytruk wrote: > On Wed, Jul 02, 2025 at 04:29:18PM +0200, Jan Beulich wrote: >> Btw, a brief rev log would be nice here. I saw you have something in the >> cover letter, but having to look in two places isn't very helpful. > > I don't really know how to effectively mai

Re: [PATCH 1/2] xen/arm64: Panic if direct map is too small

2025-07-07 Thread Hari Limaye
On Fri, Jul 04, 2025 at 09:54:27AM +, Michal Orzel wrote: > Harden the code by panicing if direct map is too small for current memory NIT: s/panicing/panicking > layout taking into account possible PDX compression. Otherwise the assert > is observed: > Assertion '(mfn_to_pdx(maddr_to_mfn(ma))

Re: [PATCH v2 11/17] xen/riscv: implement p2m_set_entry() and __p2m_set_entry()

2025-07-07 Thread Oleksii Kurochko
On 7/7/25 9:20 AM, Jan Beulich wrote: On 04.07.2025 17:01, Oleksii Kurochko wrote: On 7/1/25 3:49 PM, Jan Beulich wrote: On 10.06.2025 15:05, Oleksii Kurochko wrote: This patch introduces p2m_set_entry() and its core helper __p2m_set_entry() for RISC-V, based loosely on the Arm implementation

Re: [PATCH 3/3] hvmloader: add new SMBIOS tables (7,8,9,26,27,28)

2025-07-07 Thread Petr Beneš
On Mon, Jul 7, 2025 at 8:56 AM Jan Beulich wrote: > > Well, in the common case the original author would never change, and it would > be their S-o-b that remains first forever. Anything else would need > explaining. So, I should swap the two S-o-b lines, gotcha. P.

Re: [PATCH] x86/PVH: extend checking in hwdom_fixup_p2m()

2025-07-07 Thread Jan Beulich
On 07.07.2025 16:44, Jan Beulich wrote: > We're generally striving to minimize behavioral differences between PV > and PVH Dom0. Using (just?) is_memory_hole() in the PVH case looks quite > a bit weaker to me, compared to the page ownership check done in the PV > case. Extend checking accordingly.

Re: [PATCH v2 11/17] xen/riscv: implement p2m_set_entry() and __p2m_set_entry()

2025-07-07 Thread Oleksii Kurochko
On 7/7/25 2:53 PM, Jan Beulich wrote: On 07.07.2025 13:46, Oleksii Kurochko wrote: On 7/7/25 9:20 AM, Jan Beulich wrote: On 04.07.2025 17:01, Oleksii Kurochko wrote: On 7/1/25 3:49 PM, Jan Beulich wrote: On 10.06.2025 15:05, Oleksii Kurochko wrote: This patch introduces p2m_set_entry() and

Re: [PATCH v5 14/18] xen/cpufreq: introduce GET_CPUFREQ_CPPC sub-cmd

2025-07-07 Thread Jason Andryuk
On 2025-07-06 23:31, Penny, Zheng wrote: [Public] -Original Message- From: Jan Beulich Sent: Friday, July 4, 2025 5:46 PM To: Penny, Zheng Cc: Huang, Ray ; Anthony PERARD ; Juergen Gross ; Andrew Cooper ; Orzel, Michal ; Julien Grall ; Roger Pau Monné ; Stefano Stabellini ; xen-dev

Re: [PATCH] xen/efi: Fix crash with initial empty EFI options

2025-07-07 Thread Frediano Ziglio
On Mon, Jul 7, 2025 at 4:42 PM Jan Beulich wrote: > > On 07.07.2025 17:11, Frediano Ziglio wrote: > > EFI code path split options from EFI LoadOptions fields in 2 > > pieces, first EFI options, second Xen options. > > "get_argv" function is called first to get the number of arguments > > in the Lo

Re: [PATCH v3 02/22] include/xen/slr-table.h: Secure Launch Resource Table definitions

2025-07-07 Thread Sergii Dmytruk
On Mon, Jul 07, 2025 at 10:29:46AM +0200, Jan Beulich wrote: > >> Btw, please don't forget to Cc maintainers of code you're changing / > >> adding. > > > > What do you mean? I'm running add_maintainers.pl on the patches. > > The Cc: list had none of the REST maintainers. (Whether there's a bug in

[PATCH] x86/idle: Implement support for Meteor Lake

2025-07-07 Thread Alex XZ Cypher Zero
Adds support for Meteor Lake C-states. As the spec is identical to Alder Lake as per the Intel specs, I've reused the Alder Lake codepath. Signed-off-by: Alex XZ Cypher Zero --- xen/arch/x86/cpu/mwait-idle.c | 4 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/cpu/mwait-idle.c b

[PATCH 2/2] xen/x86: introduce AMD_MCE_NONFATAL

2025-07-07 Thread Stefano Stabellini
Today, checking for non-fatal MCE errors on ARM is very invasive: it involves a periodic timer interrupting the physical CPU execution at regular intervals. Moreover, when the timer fires, the handler sends an IPI to all physical CPUs. Both these actions are disruptive in terms of latency and dete

[PATCH 1/2] xen/x86: don't send IPI to sync TSC when it is reliable

2025-07-07 Thread Stefano Stabellini
On real time configuration with the null scheduler, we shouldn't interrupt the guest execution unless strictly necessary: the guest could be a real time guest (e.g. FreeRTOS) and interrupting its execution could lead to a missed deadline. The principal source of interruptions is IPIs. Remove the u

Re: [XEN PATCH 4/5] device-tree: address violation of MISRA C Rule 5.5

2025-07-07 Thread Stefano Stabellini
On Fri, 4 Jul 2025, Dmytro Prokopchuk1 wrote: > Address a violation of MISRA C:2012 Rule 5.5: > "Identifiers shall be distinct from macro names". > > Reports for service MC3A2.R5.5: > xen/include/xen/fdt-domain-build.h: non-compliant parameter 'copy_to_guest' > xen/include/xen/guest_access.h: non-

Re: [PATCH v3 03/22] x86/boot: add MLE header and Secure Launch entry point

2025-07-07 Thread Sergii Dmytruk
On Thu, Jul 03, 2025 at 12:25:27PM +0200, Jan Beulich wrote: > On 30.05.2025 15:17, Sergii Dmytruk wrote: > > From: Kacper Stojek > > > > Signed-off-by: Kacper Stojek > > Signed-off-by: Krystian Hebel > > Signed-off-by: Sergii Dmytruk > > Such a change can hardly come without any description. A

Re: [PATCH] xen/arm: Fix booting hwdom/1:1 domU with CONFIG_GRANT_TABLE=n

2025-07-07 Thread Stefano Stabellini
On Mon, 30 Jun 2025, Luca Fancellu wrote: > Hi Michal, > > > On 25 Jun 2025, at 11:12, Michal Orzel wrote: > > > > At the moment, we unconditionally allocate space for grant table region > > membank and add it in the membanks array to find_unallocated_memory() to > > find unused memory. In case

Re: [PATCH 4/4] xsm/dummy: Allow hwdom SYSCTL_readconsole/physinfo

2025-07-07 Thread Stefano Stabellini
On Fri, 20 Jun 2025, Jan Beulich wrote: > On 19.06.2025 02:36, Stefano Stabellini wrote: > > On Tue, 17 Jun 2025, Jan Beulich wrote: > >> On 17.06.2025 02:10, Stefano Stabellini wrote: > >>> On Mon, 16 Jun 2025, Jan Beulich wrote: > On 14.06.2025 00:51, Stefano Stabellini wrote: > > On Wed

Re: [PATCH 2/2] xen/x86: address violations of Rule 11.3

2025-07-07 Thread Stefano Stabellini
On Tue, 24 Jun 2025, Jan Beulich wrote: > On 24.06.2025 02:20, victorm.l...@amd.com wrote: > > From: Nicola Vetrini > > > > Use {get,put}_unaligned_t to ensure that reads and writes are > > safe to perform even on potentially misaligned pointers. > > Also applicable to the Arm patch: Please can

Re: [PATCH v2] SUPPORT.md: Document guest PSCI support

2025-07-07 Thread Stefano Stabellini
On Tue, 1 Jul 2025, Mykola Kvach wrote: > From: Mykola Kvach > > Add a new entry under "Virtual Hardware, Hypervisor" for guest PSCI > support on ARM. This documents support for all mandatory functions of > PSCI 1.1, and separately lists the supported optional functions. > > Signed-off-by: Mykol

Re: [PATCH v1 1/5] vpci: const-ify some pdev instances

2025-07-07 Thread Stewart Hildebrand
On 6/11/25 15:28, Stewart Hildebrand wrote: > On 6/5/25 05:47, Roger Pau Monné wrote: >> On Sat, May 31, 2025 at 08:53:59AM -0400, Stewart Hildebrand wrote: >>> Since 622bdd962822 ("vpci/header: handle p2m range sets per BAR"), a >>> non-const pdev is no longer needed for error handling in >>> vpci

Re: [XEN PATCH 2/5] iommu: address violation of MISRA C Rule 5.5

2025-07-07 Thread Stefano Stabellini
On Mon, 7 Jul 2025, Jan Beulich wrote: > On 04.07.2025 22:39, Dmytro Prokopchuk1 wrote: > > Address a violation of MISRA C:2012 Rule 5.5: > > "Identifiers shall be distinct from macro names". > > > > Reports for service MC3A2.R5.5: > > xen/include/xen/iommu.h: non-compliant struct 'page_list_head'

Re: [XEN PATCH 3/5] x86/irq: address violation of MISRA C Rule 5.5

2025-07-07 Thread Stefano Stabellini
On Mon, 7 Jul 2025, Jan Beulich wrote: > On 04.07.2025 22:39, Dmytro Prokopchuk1 wrote: > > Address a violation of MISRA C:2012 Rule 5.5: > > "Identifiers shall be distinct from macro names". > > > > Reports for service MC3A2.R5.5: > > xen/include/xen/irq.h: non-compliant function `pirq_cleanup_ch

Re: [XEN PATCH 1/5] gnttab: address violation of MISRA C Rule 5.5

2025-07-07 Thread Stefano Stabellini
On Fri, 4 Jul 2025, Dmytro Prokopchuk1 wrote: > Address a violation of MISRA C:2012 Rule 5.5: > "Identifiers shall be distinct from macro names". > > Reports for service MC3A2.R5.5: > xen/common/grant_table.c: non-compliant macro 'update_gnttab_par' > xen/common/grant_table.c: non-compliant macro

Re: [XEN PATCH 5/5] xen/bitops: address violation of MISRA C Rule 5.5

2025-07-07 Thread Stefano Stabellini
On Fri, 4 Jul 2025, Dmytro Prokopchuk1 wrote: > Address a violation of MISRA C:2012 Rule 5.5: > "Identifiers shall be distinct from macro names". > > Reports for service MC3A2.R5.5: > xen/include/xen/bitops.h: non-compliant function '__test_and_set_bit(int, > volatile void*)' > xen/include/xen/bi

Re: [RFC PATCH] xen/flask: estimate max sidtable size

2025-07-07 Thread Stefano Stabellini
On Fri, 4 Jul 2025, Jan Beulich wrote: > On 04.07.2025 12:10, Sergiy Kibrik wrote: > > 01.07.25 13:42, Jan Beulich: > >> On 30.06.2025 10:55, Sergiy Kibrik wrote: > >>> @@ -54,4 +54,7 @@ $(obj)/policy.bin: FORCE > >>> FLASK_BUILD_DIR=$(FLASK_BUILD_DIR) > >>> POLICY_FILENAME=$(POL

Re: [PATCH] docs/misra/rules.rst: allow string literals with memcmp

2025-07-07 Thread Stefano Stabellini
On Thu, 26 Jun 2025, Nicola Vetrini wrote: > On 2025-06-24 08:11, Jan Beulich wrote: > > On 24.06.2025 01:45, Stefano Stabellini wrote: > > > Rule 21.16 is about the types of arguments allowed for memcpy. > > > > Seeing the subject - is it memcmp(), memcpy(), or both? (Writing from > > home, where

[XEN PATCH v2] automation/eclair: Make report browsing URL configurable.

2025-07-07 Thread Nicola Vetrini
Currently, the URL where the ECLAIR MISRA C scan reports are saved is hardcoded; making it configurable allows multiple runners and storage servers to be used without resorting to publishing all artifacts to the same report server. Additionally, reports will be accessed publicly by using a proxy,

Re: [PATCH] xen/efi: Fix crash with initial empty EFI options

2025-07-07 Thread Jan Beulich
On 07.07.2025 17:11, Frediano Ziglio wrote: > EFI code path split options from EFI LoadOptions fields in 2 > pieces, first EFI options, second Xen options. > "get_argv" function is called first to get the number of arguments > in the LoadOptions, second, after allocating enough space, to > fill som

[PATCH v2] vpci: const-ify some pdev instances

2025-07-07 Thread Stewart Hildebrand
Since 622bdd962822 ("vpci/header: handle p2m range sets per BAR"), a non-const pdev is no longer needed for error handling in vpci_process_pending(). Const-ify pdev in vpci_process_pending(), defer_map(), and struct vpci_vcpu. Get rid of const-removal workaround in modify_bars(). Take the opportu

Re: [PATCH v6] automation/eclair: update configuration of D4.10

2025-07-07 Thread Anthony PERARD
On Mon, Jul 07, 2025 at 12:48:06PM +, Anthony PERARD wrote: > On Mon, Jun 23, 2025 at 06:19:27PM -0700, Stefano Stabellini wrote: > > diff --git a/xen/include/xen/compile.h.in b/xen/include/xen/compile.h.in > > index 3151d1e7d1..9206341ba6 100644 > > --- a/xen/include/xen/compile.h.in > > +++ b

Re: [PATCH v2 11/17] xen/riscv: implement p2m_set_entry() and __p2m_set_entry()

2025-07-07 Thread Oleksii Kurochko
On 7/7/25 5:15 PM, Jan Beulich wrote: On 07.07.2025 17:00, Oleksii Kurochko wrote: On 7/7/25 2:53 PM, Jan Beulich wrote: On 07.07.2025 13:46, Oleksii Kurochko wrote: On 7/7/25 9:20 AM, Jan Beulich wrote: On 04.07.2025 17:01, Oleksii Kurochko wrote: On 7/1/25 3:49 PM, Jan Beulich wrote: On

[PATCH] xen/efi: Fix crash with initial empty EFI options

2025-07-07 Thread Frediano Ziglio
EFI code path split options from EFI LoadOptions fields in 2 pieces, first EFI options, second Xen options. "get_argv" function is called first to get the number of arguments in the LoadOptions, second, after allocating enough space, to fill some "argc"/"argv" variable. However the first parsing co

Re: [PATCH v2 11/17] xen/riscv: implement p2m_set_entry() and __p2m_set_entry()

2025-07-07 Thread Jan Beulich
On 07.07.2025 17:00, Oleksii Kurochko wrote: > On 7/7/25 2:53 PM, Jan Beulich wrote: >> On 07.07.2025 13:46, Oleksii Kurochko wrote: >>> On 7/7/25 9:20 AM, Jan Beulich wrote: On 04.07.2025 17:01, Oleksii Kurochko wrote: > On 7/1/25 3:49 PM, Jan Beulich wrote: >> On 10.06.2025 15:05, Ol

Re: [PATCH] xen/efi: Fix crash with initial empty EFI options

2025-07-07 Thread Jan Beulich
On 07.07.2025 17:51, Frediano Ziglio wrote: > On Mon, Jul 7, 2025 at 4:42 PM Jan Beulich wrote: >> >> On 07.07.2025 17:11, Frediano Ziglio wrote: >>> EFI code path split options from EFI LoadOptions fields in 2 >>> pieces, first EFI options, second Xen options. >>> "get_argv" function is called fi

Re: [PATCH] xen/arm32: Tidy up setup_mm()

2025-07-07 Thread Stefano Stabellini
On Fri, 4 Jul 2025, Michal Orzel wrote: > The current look and feel of setup_mm() leaves a lot to be desired. The > scope of variables is not the best, many variables are not really needed > while some others are set but not used. The first iteration of membanks > is split from the loop for no reas

Re: [PATCH 1/2] xen/arm64: Panic if direct map is too small

2025-07-07 Thread Stefano Stabellini
On Fri, 4 Jul 2025, Michal Orzel wrote: > Harden the code by panicing if direct map is too small for current memory > layout taking into account possible PDX compression. Otherwise the assert > is observed: > Assertion '(mfn_to_pdx(maddr_to_mfn(ma)) - directmap_base_pdx) < > (DIRECTMAP_SIZE >> PAG

Re: [PATCH 2/2] xen/arm: Skip loops in init_pdx() when no PDX compression is used

2025-07-07 Thread Stefano Stabellini
On Fri, 4 Jul 2025, Michal Orzel wrote: > When CONFIG_PDX_COMPRESSION=n, pdx_init_mask(), pdx_region_mask() and > pfn_pdx_hole_setup() are just stubs doing nothing. It does not make > sense to keep the two loops iterating over all the memory banks. > > Signed-off-by: Michal Orzel Reviewed-by: St

Re: [PATCH] xen/arm32: Tidy up setup_mm()

2025-07-07 Thread Hari Limaye
Hi Michal, > On Fri, Jul 04, 2025 at 11:08:31AM +, Michal Orzel wrote: > The current look and feel of setup_mm() leaves a lot to be desired. The > scope of variables is not the best, many variables are not really needed > while some others are set but not used. The first iteration of membanks

RE: [PATCH] xen/arm: Enhance IPMMU-VMSA driver robustness and debug output

2025-07-07 Thread Jahan Murudi
Hi Julien, > On 30/06/2025 13:44, Julien Grall wrote: >> On 25/06/2025 16:53, Julien Grall wrote: > >> Hi Jahan, > >> +dsb(sy); > Any clue why Linux (mainline) does not do that? > I understand for the PCI passthrough, Xen will be using stage-2, so in theory > the stage-1 could be u

Re: [PATCH] xen/arm: Enhance IPMMU-VMSA driver robustness and debug output

2025-07-07 Thread Julien Grall
Hi Jahan, On 07/07/2025 12:24, Jahan Murudi wrote: On 30/06/2025 13:44, Julien Grall wrote: On 25/06/2025 16:53, Julien Grall wrote: Hi Jahan, +dsb(sy); Any clue why Linux (mainline) does not do that? I understand for the PCI passthrough, Xen will be using stage-2, so in theory

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

2025-07-07 Thread Juergen Gross
There is no need to use a populated memory page for mapping the shared info page at that location. Just use an allocated virtual address for the shared info page. For PVH allocate an unused pfn. Signed-off-by: Juergen Gross --- arch/x86/mm.c | 7 --- arch/x86/setup.c | 15 -

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

2025-07-07 Thread Juergen Gross
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-by: Juergen Gross --- arch/x86/mm.c | 16 +++- 1 file changed, 15 inse

[PATCH 0/2] Xen real-time x86

2025-07-07 Thread Stefano Stabellini
Hi all, This short patch series improves Xen real-time execution on AMD x86 processors. The key to real-time performance is deterministic guest execution times and deterministic guest interrupt latency. In such configurations, the null scheduler is typically used, and there should be no IPIs or o

Re: [RFC PATCH] xen/flask: estimate max sidtable size

2025-07-07 Thread Daniel P. Smith
On 7/4/25 06:48, Jan Beulich wrote: On 04.07.2025 12:10, Sergiy Kibrik wrote: 01.07.25 13:42, Jan Beulich: On 30.06.2025 10:55, Sergiy Kibrik wrote: @@ -54,4 +54,7 @@ $(obj)/policy.bin: FORCE FLASK_BUILD_DIR=$(FLASK_BUILD_DIR) POLICY_FILENAME=$(POLICY_SRC) cmp -s $(POLI