17 Commits
Author SHA1 Message Date
Edgar E. Iglesias 383aa8f617 xen/ioreq: drop the emulator reference when range set allocation fails
ioreq_server_init() takes a reference on the emulating domain before
allocating the server's range sets, but does not release it when that
allocation fails. The leaked reference prevents the emulating domain
from ever being fully destroyed.

Route this failure through the existing put_domain() cleanup.

Fixes: ccb42e0ca6 ("x86/hvm: take a reference on ioreq server emulating domain")
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Mykola Kvach <mykola_kvach@epam.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2026-10-01 09:59:28 +02:00
Edgar E. Iglesias 65a99a4063 arm64/insn: Avoid undefined behaviour in branch offset decode
Branch offset decoding sign-extends the immediate by shifting it left into
bit 31 and back. Perform the left shift in uint32_t and cast to int32_t
only for the final right shift to avoid UBSAN failures on negative offsets.

Fixes: 6dbf3f0e30 ("xen/arm: arm64: Add helpers to decode and encode branch instructions")
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2026-04-23 15:12:32 +02:00
Edgar E. Iglesias fefc4edfbc tools/golang: Regenerate bindings for trap_unmapped_accesses
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Acked-by: Nick Rosbrook <rosbrookn@gmail.com>
2025-06-17 10:59:04 -07:00
Edgar E. Iglesias ab02a120c0 tools/ocaml: Update bindings for CDF_TRAP_UNMAPPED_ACCESSES
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Acked-by: Christian Lindig <christian.lindig@cloud.com>
2025-06-17 10:59:04 -07:00
Edgar E. Iglesias d057628757 tools/arm: Add the trap_unmapped_accesses xl config option
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2025-06-17 10:59:04 -07:00
Edgar E. Iglesias 5f91a9b209 xen/arm: dom0less: Add trap-unmapped-accesses
Add the trap-unmapped-accesses per-domain fdt property.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2025-06-17 10:59:04 -07:00
Edgar E. Iglesias 980aff4e8f xen/arm: Add way to disable traps on accesses to unmapped addresses
Add a per-domain way to optionally disable traps for accesses
to unmapped addresses.

The domain flag is general but it's only implemented for Arm for now.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2025-06-17 10:59:04 -07:00
Edgar E. Iglesias 8fc1b356af xen/arm: smmuv3: Mark more init-only functions with __init
Move more functions that are only called at init to
the .init.text section.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Acked-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
2024-08-13 21:53:41 +01:00
Edgar E. Iglesias d946787a27 xen/arm64: lib: Use the generic xen/linkage.h macros
Use the generic xen/linkage.h macros to annotate code symbols.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00
Edgar E. Iglesias fe1b97d321 xen/arm64: cache: Use the generic xen/linkage.h macros
Use the generic xen/linkage.h macros to annotate code symbols.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00
Edgar E. Iglesias c9906bd79e xen/arm64: mmu/head: Add missing code symbol annotations
Use the generic xen/linkage.h macros to annotate code symbols
and add missing annotations.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00
Edgar E. Iglesias 8151fe503c xen/arm64: bpi: Add missing code symbol annotations
Use the generic xen/linkage.h macros to annotate code symbols
and add missing annotations.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00
Edgar E. Iglesias fdba3ff11f xen/arm64: debug: Add missing code symbol annotations
Use the generic xen/linkage.h macros to annotate code symbols
and add missing annotations.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00
Edgar E. Iglesias fba250ae60 xen/arm64: head: Add missing code symbol annotations
Use the generic xen/linkage.h macros to annotate code symbols
and add missing annotations.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00
Edgar E. Iglesias 78ce1dc625 xen/arm64: sve: Add missing code symbol annotations
Use the generic xen/linkage.h macros to annotate code symbols
and add missing annotations.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00
Edgar E. Iglesias 8d92a26a41 xen/arm64: smc: Add missing code symbol annotations
Use the generic xen/linkage.h macros to annotate code symbols
and add missing annotations.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00
Edgar E. Iglesias 1125f3529c xen/arm64: entry: Add missing code symbol annotations
Use the generic xen/linkage.h macros to annotate code symbols
and add missing annotations.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-05-16 22:06:01 +01:00