[PATCH 00/15] system/physmem: Remove cpu_physical_memory _is_io() and _rw()

2025-09-29 Thread Philippe Mathieu-Daudé
The cpu_physical_memory API is legacy (see commit b7ecba0f6f6): ``cpu_physical_memory_*`` ~ These are convenience functions which are identical to ``address_space_*`` but operate specifically on the system address space, always pass a ``MEMTXATTRS_UNSPECIFIED`` s

[PATCH 13/15] system/physmem: Inline cpu_physical_memory_rw() and remove it

2025-09-29 Thread Philippe Mathieu-Daudé
After inlining the legacy cpu_physical_memory_rw() in the 2 functions using it (cpu_physical_memory_read and cpu_physical_memory_write), we removed all its use: remove it. Signed-off-by: Philippe Mathieu-Daudé --- docs/devel/loads-stores.rst| 4 +--- scripts/coccinelle/exec_rw_const

[PATCH 12/15] system/physmem: Un-inline cpu_physical_memory_read/write()

2025-09-29 Thread Philippe Mathieu-Daudé
Un-inline cpu_physical_memory_read() and cpu_physical_memory_write(). Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 12 ++-- system/physmem.c | 10 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/exec/cpu-common.h b/inc

[PATCH 02/15] system/memory: Factor address_space_memory_is_io() out

2025-09-29 Thread Philippe Mathieu-Daudé
Factor address_space_memory_is_io() out of cpu_physical_memory_is_io() passing the address space and range length as argument. Signed-off-by: Philippe Mathieu-Daudé --- include/system/memory.h | 10 ++ system/physmem.c| 21 - 2 files changed, 22 insertions(+),

[PATCH v4 2/2] arm/gic_v3: address violations of MISRA C Rule 2.1

2025-09-29 Thread Dmytro Prokopchuk1
MISRA C Rule 2.1 states: "A project shall not contain unreachable code". In certain build configuration the following 'gicv3_its_setup_collection()' function is defined as inline and contains the macro 'BUG()'. This resulted in violation due to the function became non-returning. To ensure complian

Re: [PATCH] x86/hap: Inline "flush_vcpu" in "flush_tlb"

2025-09-29 Thread Teddy Astie
Le 29/09/2025 à 16:09, Roger Pau Monné a écrit : > On Mon, Sep 29, 2025 at 12:36:30PM +, Teddy Astie wrote: >> flush_vcpu static function here is only used in one place which is just below >> where it is defined. Inline the function to reduce the noise and clarify >> what we are doing. > > Did

Re: [PATCH for-4.21] vpci/msix: improve handling of bogus MSI-X capabilities

2025-09-29 Thread Oleksii Kurochko
On 9/29/25 10:41 AM, Roger Pau Monne wrote: I've had the luck to come across a PCI card that exposes a MSI-X capability where the BIR of the vector and PBA tables points at a BAR that has 0 size. This doesn't play nice with the code in vpci_make_msix_hole(), as it would still use the address of

[PATCH v2 09/17] target/s390x/mmu: Replace [cpu_physical_memory -> address_space]_rw()

2025-09-29 Thread Philippe Mathieu-Daudé
When cpu_address_space_init() isn't called during vCPU creation, its single address space is the global &address_space_memory. As s390x boards don't call cpu_address_space_init(), cpu_get_address_space(CPU(cpu), 0) returns &address_space_memory. We can then replace cpu_physical_memory_rw() by the

Re: [PATCH v2 08/17] hw/s390x/sclp: Replace [cpu_physical_memory -> address_space]_r/w()

2025-09-29 Thread Thomas Huth
On 30/09/2025 06.13, Philippe Mathieu-Daudé wrote: cpu_physical_memory_read() and cpu_physical_memory_write() are legacy (see commit b7ecba0f6f6), replace by address_space_read() and address_space_write(). Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Thomas Huth

[PATCH v2 4/4] tools: Allow building xen-hptool without CONFIG_MIGRATE

2025-09-29 Thread Mykyta Poturai
With CPU hotplug sysctls implemented on Arm it becomes useful to have a tool for calling them. Introduce a new congifure option "hptool" to allow building hptool separately from other migration tools, and enable it by default. Signed-off-by: Mykyta Poturai v1->v2: * switch to configure from lega

[PATCH v2 2/4] arm/gic: Use static irqaction

2025-09-29 Thread Mykyta Poturai
When stopping a core cpu_gic_callback is called in non-alloc context, which causes xfree in release_irq to fail an assert. To fix this, switch to a statically allocated irqaction that does not need to be freed in release_irq. Signed-off-by: Mykyta Poturai v1->v2: * use percpu actions --- xen/a

[PATCH v2 3/4] arm/sysctl: Implement cpu hotplug ops

2025-09-29 Thread Mykyta Poturai
Implement XEN_SYSCTL_CPU_HOTPLUG_{ONLINE,OFFLINE} calls to allow for enabling/disabling CPU cores in runtime. Signed-off-by: Mykyta Poturai v1->v2: * remove SMT ops * remove cpu == 0 checks * add XSM hooks * only implement for 64bit Arm --- xen/arch/arm/sysctl.c | 45 +++

[PATCH v2 0/4] Implement CPU hotplug on Arm

2025-09-29 Thread Mykyta Poturai
This series implements support for CPU hotplug/unplug on Arm. To achieve this, several things need to be done: 1. XEN_SYSCTL_CPU_HOTPLUG_* calls implemented. 2. timer and GIC maintenance interrupts switched to static irqactions to remove the need for freeing them during release_irq. 3. Enabled the

Re: [XEN PATCH v2 0/8] Allow to build libxl and other tools with json-c instead of yajl

2025-09-29 Thread Oleksii Kurochko
On 9/29/25 2:07 PM, Anthony PERARD wrote: From: Anthony PERARD Patch series available in this git branch: https://xenbits.xenproject.org/git-http/people/aperard/xen-unstable.git br.libxl-libjsonc-v2 changes in v2: - introduce $(XEN_JSON_LIBS) to have either -lyajl or -ljson-c or both (for a