Re: [PATCH v1 6/9] asm-generic: move some parts of Arm's domain_build.h to asm-generic header

2025-01-27 Thread Jan Beulich
On 08.01.2025 12:13, Oleksii Kurochko wrote: > Nothing changed. Only some functions declaration are moved to asm-generic > header as they are expected to be used by common code of domain builing or > dom0less. > > Signed-off-by: Oleksii Kurochko > --- > xen/arch/arm/include/asm/domain_build.h |

Re: [PATCH for-4.20] x86/PV: further harden guest memory accesses against speculative abuse

2025-01-27 Thread Jan Beulich
On 27.01.2025 12:31, Roger Pau Monné wrote: > On Mon, Jan 27, 2025 at 11:15:22AM +0100, Jan Beulich wrote: >> --- a/xen/arch/x86/include/asm/asm-defns.h >> +++ b/xen/arch/x86/include/asm/asm-defns.h >> @@ -1,3 +1,5 @@ >> +#include >> + >> #ifndef HAVE_AS_CLAC_STAC >> .macro clac >> .byte 0x

Re: [PATCH v1 1/3] xen/riscv: implement software page table walking

2025-01-27 Thread Oleksii Kurochko
On 1/27/25 11:06 AM, Jan Beulich wrote: On 20.01.2025 17:54, Oleksii Kurochko wrote: RISC-V doesn't have hardware feature to ask MMU to translate virtual address to physical address ( like Arm has, for example ), so software page table walking in implemented. Signed-off-by: Oleksii Kurochko --

Re: [PATCH v1 2/3] xen/riscv: update defintion of vmap_to_mfn()

2025-01-27 Thread Oleksii Kurochko
On 1/27/25 11:09 AM, Jan Beulich wrote: On 20.01.2025 17:54, Oleksii Kurochko wrote: vmap_to_mfn() uses virt_to_maddr(), which is designed to work with VA from either the direct map region or Xen's linkage region (XEN_VIRT_START). An assertion will occur if it is used with other regions, in par

Re: [PATCH v1 1/3] xen/riscv: implement software page table walking

2025-01-27 Thread Jan Beulich
On 27.01.2025 13:29, Oleksii Kurochko wrote: > On 1/27/25 11:06 AM, Jan Beulich wrote: >> On 20.01.2025 17:54, Oleksii Kurochko wrote: >>> RISC-V doesn't have hardware feature to ask MMU to translate >>> virtual address to physical address ( like Arm has, for example ), >>> so software page table w

Re: [for-4.20][PATCH 0/2] xen/arm CONFIG_PHYS_ADDR_T_32=y fixes

2025-01-27 Thread Oleksii Kurochko
On 1/27/25 11:45 AM, Michal Orzel wrote: This series contains build fixes when CONFIG_PHYS_ADDR_T_32=y. @Oleksii: This is a release blocker. Agree, we can't proceed with release if we have build issues. So with proper review: R-Acked-by: Oleksii Kurochko Thanks. ~ Oleksii Michal Orzel

Re: [PATCH v6] vpci: Add resizable bar support

2025-01-27 Thread Roger Pau Monné
On Mon, Jan 27, 2025 at 03:20:40PM +0100, Jan Beulich wrote: > On 23.01.2025 04:50, Jiqian Chen wrote: > > v5->v6 changes: > > * Changed "1UL" to "1ULL" in PCI_REBAR_CTRL_SIZE idefinition for 32 bit > > architecture. > > * In rebar_ctrl_write used "bar - pdev->vpci->header.bars" to get index > >

Re: [PATCH v3] xen/riscv: identify specific ISA supported by cpu

2025-01-27 Thread Jan Beulich
On 23.01.2025 15:46, Oleksii Kurochko wrote: > --- /dev/null > +++ b/xen/arch/riscv/cpufeature.c > @@ -0,0 +1,482 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * Taken for Linux kernel v6.12-rc3. Nit: s/for/from/ ? Perhaps also add "Originally ...", as it'll otherwise also go stale a

Re: [PATCH v6] vpci: Add resizable bar support

2025-01-27 Thread Jan Beulich
On 27.01.2025 15:41, Roger Pau Monné wrote: > On Mon, Jan 27, 2025 at 03:20:40PM +0100, Jan Beulich wrote: >> On 23.01.2025 04:50, Jiqian Chen wrote: >>> v5->v6 changes: >>> * Changed "1UL" to "1ULL" in PCI_REBAR_CTRL_SIZE idefinition for 32 bit >>> architecture. >>> * In rebar_ctrl_write used "ba

Re: [PATCH v3 01/12] x86/xstate: Create map/unmap primitives for xsave areas

2025-01-27 Thread Jan Beulich
On 10.01.2025 14:28, Alejandro Vallejo wrote: > Add infrastructure to simplify ASI handling. With ASI in the picture > we'll have several different means of accessing the XSAVE area of a > given vCPU, depending on whether a domain is covered by ASI or not and > whether the vCPU is question is sched

[for-4.20][PATCH 2/2] xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Michal Orzel
On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: arch/arm/platforms/vexpress.c: In function 'vexpress_smp_init': arch/arm/platforms/vexpress.c:102:12: error: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'long long unsigned int' [-Werr

Re: [PATCH v1 2/9] asm-generic: move parts of Arm's asm/kernel.h to asm-generic

2025-01-27 Thread Jan Beulich
On 08.01.2025 12:13, Oleksii Kurochko wrote: > Move the following parts to asm-generic with the following changes: > - struct kernel_info: > - Create arch_kernel_info for arch specific kernel information. > At the moment, it contains domain_type for Arm. > - Rename vpl011 to vuart to have m

Re: [PATCH v1 3/3] xen/riscv: update mfn calculation in pt_mapping_level()

2025-01-27 Thread Jan Beulich
On 20.01.2025 17:54, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/pt.c > +++ b/xen/arch/riscv/pt.c > @@ -346,9 +346,33 @@ static int pt_mapping_level(unsigned long vfn, mfn_t > mfn, unsigned long nr, > return level; > > /* > - * Don't take into account the MFN when removing m

Re: [PATCH v3 11/12] x86/fpu: Pass explicit xsave areas to fpu_(f)xrstor()

2025-01-27 Thread Jan Beulich
On 10.01.2025 14:28, Alejandro Vallejo wrote: > No functional change. > > Signed-off-by: Alejandro Vallejo Acked-by: Jan Beulich > --- > v2->v3: > * const-ified v in fpu_xrstor() > * Removed v in fpu_fxrstor() On this basis the parameter could also be removed from fpu_fxsave(), by passing

Re: [PATCH v3 09/12] x86/mpx: Map/unmap xsave area in in read_bndcfgu()

2025-01-27 Thread Jan Beulich
On 10.01.2025 14:28, Alejandro Vallejo wrote: > --- a/xen/arch/x86/xstate.c > +++ b/xen/arch/x86/xstate.c > @@ -1024,9 +1024,10 @@ int handle_xsetbv(u32 index, u64 new_bv) > > uint64_t read_bndcfgu(void) > { > +uint64_t bndcfgu = 0; > unsigned long cr0 = read_cr0(); > -struct xsave

Re: [PATCH v1 1/9] xen/common: dom0less: make some parts of Arm's CONFIG_DOM0LESS common

2025-01-27 Thread Jan Beulich
On 08.01.2025 12:13, Oleksii Kurochko wrote: > Unify the API for creating DomUs and checking for Dom0less mode across > architectures, including Arm and RISC-V, with potential applicability > for PPC. That is you mean to re-use it for RISC-V? > --- a/xen/common/Kconfig > +++ b/xen/common/Kconfig

Re: [PATCH v6] vpci: Add resizable bar support

2025-01-27 Thread Jan Beulich
On 23.01.2025 04:50, Jiqian Chen wrote: > v5->v6 changes: > * Changed "1UL" to "1ULL" in PCI_REBAR_CTRL_SIZE idefinition for 32 bit > architecture. > * In rebar_ctrl_write used "bar - pdev->vpci->header.bars" to get index > instead of reading > from register. > * Added the index of BAR to error

Re: [PATCH v1 4/9] asm-generic: move Arm's static-memory.h to asm-generic

2025-01-27 Thread Jan Beulich
On 08.01.2025 12:13, Oleksii Kurochko wrote: > Except moving Arm's static-memory.h to asm-generic #ifdef header guard > is updated: s/__ASM_STATIC_MEMORY_H_/__ASM_GENERIC_STATIC_MEMORY_H__. > > Update arm/include/asm/Makefile to use asm-generic version of > static-memory.h for Arm. > > Signed-off

Re: [PATCH v3 10/12] x86/fpu: Pass explicit xsave areas to fpu_(f)xsave()

2025-01-27 Thread Jan Beulich
On 10.01.2025 14:28, Alejandro Vallejo wrote: > No functional change. > > Signed-off-by: Alejandro Vallejo > --- > v2->v3: > * const-ified v in fpu_fxsave() (missing in v2) Sadly this has rendered ... > --- a/xen/arch/x86/i387.c > +++ b/xen/arch/x86/i387.c > @@ -129,7 +129,7 @@ static inline

Re: [PATCH v3 08/12] x86/emulator: Refactor FXSAVE_AREA to use wrappers

2025-01-27 Thread Jan Beulich
On 10.01.2025 14:28, Alejandro Vallejo wrote: > Adds an UNMAP primitive to make use of vcpu_unmap_xsave_area() when > linked into xen. unmap is a no-op during tests. > > Signed-off-by: Alejandro Vallejo Acked-by: Jan Beulich despite ... > --- a/xen/arch/x86/x86_emulate/blk.c > +++ b/xen/arch/x

Re: [PATCH v4 22/30] context_tracking: Exit CT_STATE_IDLE upon irq/nmi entry

2025-01-27 Thread Valentin Schneider
On 22/01/25 01:22, Frederic Weisbecker wrote: > Le Tue, Jan 14, 2025 at 06:51:35PM +0100, Valentin Schneider a écrit : >> ct_nmi_{enter, exit}() only touches the RCU watching counter and doesn't >> modify the actual CT state part context_tracking.state. This means that >> upon receiving an IRQ when

Re: [PATCH 1/2] gnttab: introduce version agnostic macros

2025-01-27 Thread Jan Beulich
On 10.01.2025 14:37, Daniel P. Smith wrote: > @@ -310,16 +311,30 @@ nr_maptrack_frames(struct grant_table *t) > #define SHGNT_PER_PAGE_V1 (PAGE_SIZE / sizeof(grant_entry_v1_t)) > #define shared_entry_v1(t, e) \ > ((t)->shared_v1[(e)/SHGNT_PER_PAGE_V1][(e)%SHGNT_PER_PAGE_V1]) > + > +/* Operat

Re: [PATCH v3 09/12] x86/mpx: Map/unmap xsave area in in read_bndcfgu()

2025-01-27 Thread Alejandro Vallejo
Hi, Thanks for reviewing this and the other patches. On Mon Jan 27, 2025 at 10:57 AM GMT, Jan Beulich wrote: > On 10.01.2025 14:28, Alejandro Vallejo wrote: > > --- a/xen/arch/x86/xstate.c > > +++ b/xen/arch/x86/xstate.c > > @@ -1024,9 +1024,10 @@ int handle_xsetbv(u32 index, u64 new_bv) > > >

Re: [PATCH for-4.20] x86/PV: further harden guest memory accesses against speculative abuse

2025-01-27 Thread Roger Pau Monné
On Mon, Jan 27, 2025 at 01:06:51PM +0100, Jan Beulich wrote: > On 27.01.2025 12:31, Roger Pau Monné wrote: > > On Mon, Jan 27, 2025 at 11:15:22AM +0100, Jan Beulich wrote: > >> --- a/xen/arch/x86/include/asm/asm-defns.h > >> +++ b/xen/arch/x86/include/asm/asm-defns.h > >> @@ -1,3 +1,5 @@ > >> +#inc

Re: [for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Julien Grall
On Mon, 27 Jan 2025 at 07:46, Michal Orzel wrote: > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > common/device-tree/bootfdt.c: In function 'build_assertions': > ./include/xen/macros.h:47:31: error: static assertion failed: > "!(alignof(struct membanks) != 8)" >4

Re: [PATCH for-4.20] x86/PV: further harden guest memory accesses against speculative abuse

2025-01-27 Thread Roger Pau Monné
On Mon, Jan 27, 2025 at 11:15:22AM +0100, Jan Beulich wrote: > The original implementation has two issues: For one it doesn't preserve > non-canonical-ness of inputs in the range 0x8000 through > 0x80007fff. Bogus guest pointers in that range would not cause a > (#GP) fault upon

Re: [PATCH for-4.20] x86/intel: Fix PERF_GLOBAL fixup when virtualised

2025-01-27 Thread Andrew Cooper
On 21/01/2025 4:57 pm, Oleksii Kurochko wrote: > > On 1/21/25 3:25 PM, Andrew Cooper wrote: >> Logic using performance counters needs to look at >> MSR_MISC_ENABLE.PERF_AVAILABLE before touching any other resources. >> >> When virtualised under ESX, Xen dies with a #GP fault trying to read >> MSR_C

Re: [PATCH v1 3/3] xen/riscv: update mfn calculation in pt_mapping_level()

2025-01-27 Thread Oleksii Kurochko
On 1/27/25 11:24 AM, Jan Beulich wrote: On 20.01.2025 17:54, Oleksii Kurochko wrote: --- a/xen/arch/riscv/pt.c +++ b/xen/arch/riscv/pt.c @@ -346,9 +346,33 @@ static int pt_mapping_level(unsigned long vfn, mfn_t mfn, unsigned long nr, return level; /* - * Don't take into

Re: [PATCH 2/2] gnttab: make grant table v2 support configurable

2025-01-27 Thread Jan Beulich
On 10.01.2025 14:37, Daniel P. Smith wrote: > If the v2 interface support is not required, disabling this option will remove > substantial amounts of unused code in a critical subsystem. > > Disables the v2-only GNTTABOP_get_status_frames grant table op. Why's this explicitly mentioned, but not e

Re: [for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Michal Orzel
On 27/01/2025 12:19, Julien Grall wrote: > > > > > > On Mon, 27 Jan 2025 at 07:46, Michal Orzel > wrote: > > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > common/device-tree/bootfdt.c: In function 'build_assertions':

Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-27 Thread Joel Granados
On Wed, Jan 22, 2025 at 01:41:35PM +0100, Ard Biesheuvel wrote: > On Wed, 22 Jan 2025 at 13:25, Joel Granados wrote: > > > > On Tue, Jan 21, 2025 at 02:40:16PM +0100, Alexander Gordeev wrote: > > > On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Granados wrote: > > > > > > Hi Joel, > > > > > > > Ad

Re: [for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Luca Fancellu
Hi Michal, > On 27 Jan 2025, at 10:45, Michal Orzel wrote: > > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > common/device-tree/bootfdt.c: In function 'build_assertions': > ./include/xen/macros.h:47:31: error: static assertion failed: > "!(alignof(struct membanks)

Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-27 Thread Jani Nikula
On Mon, 27 Jan 2025, Joel Granados wrote: > On Wed, Jan 22, 2025 at 01:41:35PM +0100, Ard Biesheuvel wrote: >> On Wed, 22 Jan 2025 at 13:25, Joel Granados wrote: >> > >> > On Tue, Jan 21, 2025 at 02:40:16PM +0100, Alexander Gordeev wrote: >> > > On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Gran

Re: [PATCH v6] vpci: Add resizable bar support

2025-01-27 Thread Roger Pau Monné
On Mon, Jan 27, 2025 at 03:52:31PM +0100, Jan Beulich wrote: > On 27.01.2025 15:41, Roger Pau Monné wrote: > > On Mon, Jan 27, 2025 at 03:20:40PM +0100, Jan Beulich wrote: > >> On 23.01.2025 04:50, Jiqian Chen wrote: > >>> v5->v6 changes: > >>> * Changed "1UL" to "1ULL" in PCI_REBAR_CTRL_SIZE idefi

Re: [PATCH v2 2/5] iommu/vtd: remove non-CX16 logic from interrupt remapping

2025-01-27 Thread Roger Pau Monné
On Mon, Jan 27, 2025 at 10:52:47AM +0100, Jan Beulich wrote: > On 24.01.2025 13:01, Roger Pau Monne wrote: > > From: Teddy Astie > > > > As CX16 support is mandatory for IOMMU usage, the checks for CX16 in the > > interrupt remapping code are stale. Remove them together with the > > associated c

Re: [PATCH v4 29/30] x86/mm, mm/vmalloc: Defer flush_tlb_kernel_range() targeting NOHZ_FULL CPUs

2025-01-27 Thread Uladzislau Rezki
On Fri, Jan 24, 2025 at 04:22:19PM +0100, Valentin Schneider wrote: > On 21/01/25 18:00, Uladzislau Rezki wrote: > >> > > >> > As noted before, we defer flushing for vmalloc. We have a lazy-threshold > >> > which can be exposed(if you need it) over sysfs for tuning. So, we can > >> > add it. > >>

Re: [PATCH for-4.20 v2 0/5] x86/iommu: make CX16 mandatory for IOMMU

2025-01-27 Thread Oleksii Kurochko
On 1/24/25 3:27 PM, Roger Pau Monné wrote: On Fri, Jan 24, 2025 at 02:24:34PM +, Andrew Cooper wrote: On 24/01/2025 12:01 pm, Roger Pau Monne wrote: Hello, The following series is the original CX16 series sent by Teddy, with the CX16 checks split into a separate patch, plus one extra pat

Re: [PATCH v2 1/5] x86/iommu: check for CMPXCHG16B when enabling IOMMU

2025-01-27 Thread Roger Pau Monné
On Mon, Jan 27, 2025 at 10:51:29AM +0100, Jan Beulich wrote: > On 24.01.2025 13:01, Roger Pau Monne wrote: > > From: Teddy Astie > > > > All hardware with VT-d/AMD-Vi has CMPXCHG16B support. Check this at > > initialisation time, and remove the effectively-dead logic for the > > non-cx16 case. >

Re: [PATCH v1 1/3] xen/riscv: implement software page table walking

2025-01-27 Thread Jan Beulich
On 20.01.2025 17:54, Oleksii Kurochko wrote: > RISC-V doesn't have hardware feature to ask MMU to translate > virtual address to physical address ( like Arm has, for example ), > so software page table walking in implemented. > > Signed-off-by: Oleksii Kurochko > --- > xen/arch/riscv/include/asm

Re: [PATCH v1 2/3] xen/riscv: update defintion of vmap_to_mfn()

2025-01-27 Thread Jan Beulich
On 20.01.2025 17:54, Oleksii Kurochko wrote: > vmap_to_mfn() uses virt_to_maddr(), which is designed to work with VA from > either the direct map region or Xen's linkage region (XEN_VIRT_START). > An assertion will occur if it is used with other regions, in particular for > the VMAP region. > > Si

Re: [PATCH v2 1/5] x86/iommu: check for CMPXCHG16B when enabling IOMMU

2025-01-27 Thread Jan Beulich
On 24.01.2025 13:01, Roger Pau Monne wrote: > From: Teddy Astie > > All hardware with VT-d/AMD-Vi has CMPXCHG16B support. Check this at > initialisation time, and remove the effectively-dead logic for the > non-cx16 case. Nit: There's nothing being removed here, so I expect the 2nd half of the s

[PATCH for-4.20] x86/PV: further harden guest memory accesses against speculative abuse

2025-01-27 Thread Jan Beulich
The original implementation has two issues: For one it doesn't preserve non-canonical-ness of inputs in the range 0x8000 through 0x80007fff. Bogus guest pointers in that range would not cause a (#GP) fault upon access, when they should. And then there is an AMD-specific aspect,

Re: Serious AMD-Vi issue

2025-01-27 Thread Roger Pau Monné
On Fri, Jan 24, 2025 at 01:26:23PM -0800, Elliott Mitchell wrote: > On Fri, Jan 24, 2025 at 03:31:30PM +0100, Roger Pau Monné wrote: > > On Thu, Jan 25, 2024 at 12:24:53PM -0800, Elliott Mitchell wrote: > > > Apparently this was first noticed with 4.14, but more recently I've been > > > able to rep

Re: [RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-27 Thread Bernhard Beschow
Am 25. Januar 2025 18:13:43 UTC schrieb "Philippe Mathieu-Daudé" : >Because the legacy Xen backend devices can optionally be plugged on the >TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. >Remove the implicit TYPE_XENSYSDEV instance_size. > >Untested, but I'm surprised t

[PATCH] hw/*/xen*: Prefer QOM cast for XenLegacyDevice

2025-01-27 Thread Bernhard Beschow
Makes the code less sensitive regarding changes in the class hierarchy which will be performed in the next patch. Signed-off-by: Bernhard Beschow --- hw/usb/xen-usb.c| 6 +++--- hw/xen/xen-legacy-backend.c | 2 +- hw/xen/xen_pvdev.c | 2 +- 3 files changed, 5 insertions(+),

Re: [PATCH v2 2/5] iommu/vtd: remove non-CX16 logic from interrupt remapping

2025-01-27 Thread Jan Beulich
On 24.01.2025 13:01, Roger Pau Monne wrote: > From: Teddy Astie > > As CX16 support is mandatory for IOMMU usage, the checks for CX16 in the > interrupt remapping code are stale. Remove them together with the > associated code introduced in case CX16 was not available. Perhaps insert "now" befo

Re: [PATCH 7/9] hw/net: Have eTSEC device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-27 Thread Bernhard Beschow
Am 25. Januar 2025 18:13:41 UTC schrieb "Philippe Mathieu-Daudé" : >Because the network eTSEC device can be optionally plugged on the >TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. > >Signed-off-by: Philippe Mathieu-Daudé Tested-by: Bernhard Beschow Acked-by: Bernhar

Re: [PATCH 2/9] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro

2025-01-27 Thread Bernhard Beschow
Am 25. Januar 2025 18:13:36 UTC schrieb "Philippe Mathieu-Daudé" : >When multiple QOM types are registered in the same file, >it is simpler to use the the DEFINE_TYPES() macro. In >particular because type array declared with such macro >are easier to review. > >Signed-off-by: Philippe Mathieu-D

Re: [PATCH v3 07/12] x86/xstate: Map/unmap xsave area in {compress,expand}_xsave_states()

2025-01-27 Thread Jan Beulich
On 10.01.2025 14:28, Alejandro Vallejo wrote: > No functional change. > > Signed-off-by: Alejandro Vallejo Reviewed-by: Jan Beulich

[for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Michal Orzel
On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: common/device-tree/bootfdt.c: In function 'build_assertions': ./include/xen/macros.h:47:31: error: static assertion failed: "!(alignof(struct membanks) != 8)" 47 | #define BUILD_BUG_ON(cond) ({ _Static_assert(!(cond), "!(

[for-4.20][PATCH 0/2] xen/arm CONFIG_PHYS_ADDR_T_32=y fixes

2025-01-27 Thread Michal Orzel
This series contains build fixes when CONFIG_PHYS_ADDR_T_32=y. @Oleksii: This is a release blocker. Michal Orzel (2): device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y xen/arch/arm/include/asm/mm.h| 2 +- xen/common/

Re: [PATCH for-4.20] x86/PV: further harden guest memory accesses against speculative abuse

2025-01-27 Thread Oleksii Kurochko
On 1/27/25 11:15 AM, Jan Beulich wrote: The original implementation has two issues: For one it doesn't preserve non-canonical-ness of inputs in the range 0x8000 through 0x80007fff. Bogus guest pointers in that range would not cause a (#GP) fault upon access, when they should.

Re: [PATCH v3 11/12] x86/fpu: Pass explicit xsave areas to fpu_(f)xrstor()

2025-01-27 Thread Alejandro Vallejo
Hi, On Mon Jan 27, 2025 at 11:05 AM GMT, Jan Beulich wrote: > On 10.01.2025 14:28, Alejandro Vallejo wrote: > > No functional change. > > > > Signed-off-by: Alejandro Vallejo > > Acked-by: Jan Beulich > > > --- > > v2->v3: > > * const-ified v in fpu_xrstor() > > * Removed v in fpu_fxrstor()

Re: [PATCH v3 08/12] x86/emulator: Refactor FXSAVE_AREA to use wrappers

2025-01-27 Thread Alejandro Vallejo
On Mon Jan 27, 2025 at 10:52 AM GMT, Jan Beulich wrote: > On 10.01.2025 14:28, Alejandro Vallejo wrote: > > Adds an UNMAP primitive to make use of vcpu_unmap_xsave_area() when > > linked into xen. unmap is a no-op during tests. > > > > Signed-off-by: Alejandro Vallejo > > Acked-by: Jan Beulich

Re: [for-4.20][PATCH 2/2] xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Michal Orzel
On 27/01/2025 18:03, Alejandro Vallejo wrote: > > > Hi, > > On Mon Jan 27, 2025 at 10:45 AM GMT, Michal Orzel wrote: >> On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: >> arch/arm/platforms/vexpress.c: In function 'vexpress_smp_init': >> arch/arm/platforms/vexpress.c

Re: [for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Michal Orzel
On 27/01/2025 17:27, Julien Grall wrote: > > > > > > On Mon, 27 Jan 2025 at 09:52, Michal Orzel > wrote: > > > > On 27/01/2025 12:19, Julien Grall wrote: > >        > > > > > > > > > > On Mon, 27 Jan 2025 at 07:46, Michal Or

Re: [PATCH v1 1/3] xen/riscv: implement software page table walking

2025-01-27 Thread Oleksii Kurochko
On 1/27/25 1:57 PM, Jan Beulich wrote: On 27.01.2025 13:29, Oleksii Kurochko wrote: On 1/27/25 11:06 AM, Jan Beulich wrote: On 20.01.2025 17:54, Oleksii Kurochko wrote: RISC-V doesn't have hardware feature to ask MMU to translate virtual address to physical address ( like Arm has, for example

Re: [PATCH v1 1/3] xen/riscv: implement software page table walking

2025-01-27 Thread Oleksii Kurochko
On 1/27/25 6:22 PM, Oleksii Kurochko wrote: On 1/27/25 1:57 PM, Jan Beulich wrote: On 27.01.2025 13:29, Oleksii Kurochko wrote: On 1/27/25 11:06 AM, Jan Beulich wrote: On 20.01.2025 17:54, Oleksii Kurochko wrote: RISC-V doesn't have hardware feature to ask MMU to translate virtual address

Re: [PATCH 8/9] hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-27 Thread Stefan Berger
On 1/25/25 1:13 PM, Philippe Mathieu-Daudé wrote: Because the TPM TIS sysbus device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Berger --- hw/tpm/tpm_tis_sysbus.c | 3

Re: [PATCH v4 29/30] x86/mm, mm/vmalloc: Defer flush_tlb_kernel_range() targeting NOHZ_FULL CPUs

2025-01-27 Thread Will Deacon
On Fri, Jan 17, 2025 at 04:52:19PM +0100, Jann Horn wrote: > On Fri, Jan 17, 2025 at 4:25 PM Valentin Schneider > wrote: > > On 14/01/25 19:16, Jann Horn wrote: > > > On Tue, Jan 14, 2025 at 6:51 PM Valentin Schneider > > > wrote: > > >> vunmap()'s issued from housekeeping CPUs are a relatively

Re: [for-4.20][PATCH 2/2] xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Luca Fancellu
Hi Michal, > On 27 Jan 2025, at 10:45, Michal Orzel wrote: > > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > arch/arm/platforms/vexpress.c: In function 'vexpress_smp_init': > arch/arm/platforms/vexpress.c:102:12: error: format '%lx' expects argument of > type 'long

RE: [PATCH for-4.20] x86/intel: Fix PERF_GLOBAL fixup when virtualised

2025-01-27 Thread Katz, Jonathan
Tested on xcp-ng vm on esx 8 that previously failed to boot when performance counters were not enabled. - patched host - rebooted host - host still came up normally - shut host down - turned off performance counters on vm - booted host - host still came up normally and no issues running vms Than

Re: [PATCH v3 01/12] x86/xstate: Create map/unmap primitives for xsave areas

2025-01-27 Thread Alejandro Vallejo
Hi, On Mon Jan 27, 2025 at 10:44 AM GMT, Jan Beulich wrote: > On 10.01.2025 14:28, Alejandro Vallejo wrote: > > Add infrastructure to simplify ASI handling. With ASI in the picture > > we'll have several different means of accessing the XSAVE area of a > > given vCPU, depending on whether a domain

Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-27 Thread Matthew Wilcox
On Mon, Jan 27, 2025 at 04:55:58PM +0200, Jani Nikula wrote: > You could have static const within functions too. You get the rodata > protection and function local scope, best of both worlds? timer_active is on the stack, so it can't be static const. Does this really need to be cc'd to such a wid

Re: [PATCH v3 10/12] x86/fpu: Pass explicit xsave areas to fpu_(f)xsave()

2025-01-27 Thread Alejandro Vallejo
On Mon Jan 27, 2025 at 11:01 AM GMT, Jan Beulich wrote: > On 10.01.2025 14:28, Alejandro Vallejo wrote: > > No functional change. > > > > Signed-off-by: Alejandro Vallejo > > --- > > v2->v3: > > * const-ified v in fpu_fxsave() (missing in v2) > > Sadly this has rendered ... > > > --- a/xen/arch

Re: [PATCH v3 08/12] x86/emulator: Refactor FXSAVE_AREA to use wrappers

2025-01-27 Thread Jan Beulich
On 27.01.2025 16:42, Alejandro Vallejo wrote: > On Mon Jan 27, 2025 at 10:52 AM GMT, Jan Beulich wrote: >> On 10.01.2025 14:28, Alejandro Vallejo wrote: >>> Adds an UNMAP primitive to make use of vcpu_unmap_xsave_area() when >>> linked into xen. unmap is a no-op during tests. >>> >>> Signed-off-by:

Re: [PATCH v3 11/12] x86/fpu: Pass explicit xsave areas to fpu_(f)xrstor()

2025-01-27 Thread Jan Beulich
On 27.01.2025 16:48, Alejandro Vallejo wrote: > On Mon Jan 27, 2025 at 11:05 AM GMT, Jan Beulich wrote: >> On 10.01.2025 14:28, Alejandro Vallejo wrote: >>> No functional change. >>> >>> Signed-off-by: Alejandro Vallejo >> >> Acked-by: Jan Beulich >> >>> --- >>> v2->v3: >>> * const-ified v in f

Re: [for-4.20][PATCH 2/2] xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Alejandro Vallejo
Hi, On Mon Jan 27, 2025 at 10:45 AM GMT, Michal Orzel wrote: > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > arch/arm/platforms/vexpress.c: In function 'vexpress_smp_init': > arch/arm/platforms/vexpress.c:102:12: error: format '%lx' expects argument of > type 'long u

Re: [for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Julien Grall
On Mon, 27 Jan 2025 at 09:52, Michal Orzel wrote: > > > On 27/01/2025 12:19, Julien Grall wrote: > > > > > > > > > > > > On Mon, 27 Jan 2025 at 07:46, Michal Orzel > wrote: > > > > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is > observed: > >

Re: xen | Failed pipeline for staging | 8306d773

2025-01-27 Thread Jan Beulich
On 27.01.2025 18:02, GitLab wrote: > > > Pipeline #1642654016 has failed! > > Project: xen ( https://gitlab.com/xen-project/hardware/xen ) > Branch: staging ( > https://gitlab.com/xen-project/hardware/xen/-/commits/staging ) > > Commit: 8306d773 ( > https://gitlab.com/xen-project/hardware/xen

Re: [for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Julien Grall
Hi Michal, On Mon, 27 Jan 2025 at 14:15, Michal Orzel wrote: > > I think it needs to be rephrased to make clear the alignment of struct > membanks should be the same as struct membank. > Shouldn't this check therefore be changed to: > BUILD_BUG_ON(alignof(struct membanks) != alignof(struct memb

Re: [PATCH v3 05/24] xen/console: introduce consoled_is_enabled()

2025-01-27 Thread Jason Andryuk
On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: From: Denis Mukhin There are few places which check pv_shim console under CONFIG_PV_SHIM in xen console driver. Instead of #ifdef-ing, use new consoled_is_enabled() to customize the logic. Header file now can be included w/o CONFIG_X86. Si

Re: [PATCH v3 07/24] xen/console: introduce framework for UART emulators

2025-01-27 Thread Jason Andryuk
On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: From: Denis Mukhin Introduce a driver framework to abstract UART emulators in the hypervisor. That allows for architecture-independent handling of virtual UARTs from Xen console driver and simplifies enabling new architecture-dependent UART

Re: [PATCH v3 08/24] xen/console: rename switch_serial_input() to console_switch_input()

2025-01-27 Thread Jason Andryuk
On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: From: Denis Mukhin Updated the name to highlight the physical console input selection logic: existing code does not switch only serial console, it also switches debugging console (debug I/O port and console hypercall). Signed-off-by: Denis

Re: [PATCH v3 03/24] arm/vuart: add hwdom prefix to UART emulator

2025-01-27 Thread Jason Andryuk
On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: From: Denis Mukhin Using "vuart" in UART emulator designed for hardware domain debugging is confusing in generic Arm code (e.g. vpl011 is also "vuart"). Fix that by adding hwdom prefix to all symbols in arm/vuart.c. Also, remove domain_has_

Re: [for-4.20][PATCH 2/2] xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-27 Thread Stefano Stabellini
On Mon, 27 Jan 2025, Luca Fancellu wrote: > Hi Michal, > > > On 27 Jan 2025, at 10:45, Michal Orzel wrote: > > > > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > > arch/arm/platforms/vexpress.c: In function 'vexpress_smp_init': > > arch/arm/platforms/vexpress.c:102:1

Re: [PATCH v3 06/24] xen/domain: introduce hardware emulation flags

2025-01-27 Thread Jason Andryuk
On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: From: Denis Mukhin Define an architecture-independent location for describing hardware emulation flags for configuring in-hypervisor emulators. I'm not sure about this. It's a lot of churn. The common internal handling makes sense, but

Re: [PATCH v3 04/24] xen/console: introduce console_{get,put}_domain()

2025-01-27 Thread Jason Andryuk
On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: From: Denis Mukhin console_input_domain() takes an RCU lock to protect domain structure. That implies call to rcu_unlock_domain() after use. Introduce a pair of console_get_domain() / console_put_domain() to highlight the correct use of the