All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] hw/acpi/aml-build: Fix free ranges calculation in crs_replace_with_free_ranges()
@ 2026-11-06 23:59 Anton Kuchin
  2026-11-06 23:59 ` [PATCH 1/2] hw/acpi/aml-build: Ignore used ranges outside the requested window Anton Kuchin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Anton Kuchin @ 2026-11-06 23:59 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S. Tsirkin, Igor Mammedov, Ani Sinha, Anton Kuchin,
	NB-CoreTeam

The assumption that all used ranges lie within the provided window
bounds resulted in generation of free ranges beyond the limits and
incorrect address assignment in guest. As used regions are collected
without any knowledge about which limits will be applied later, some
non-standard topologies with multiple expanders and devices break free
ranges calculation. Skipping such used regions fixes the problem.

While at this fix potential uint64 wrap around if range->limit is
equal to UINT64_MAX that can add extra free range at the beginning
of the address space. Not sure this can really happen with some
combination of virtual topology and firmware version, but this
check doesn't look expensive and it's better to handle it now than
spend hours debugging this strange case later.

Signed-off-by: Anton Kuchin <antonkuchin@nebius.com>
---
Anton Kuchin (2):
      hw/acpi/aml-build: Ignore used ranges outside the requested window
      hw/acpi/aml-build: Avoid overflow when advancing the free_base cursor

 hw/acpi/aml-build.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
---
base-commit: ddb42c53b4d91d12511f49ee4428d9594eb5eb49
change-id: 20261106-users-antonkuchin-to-send-fix-crs-replace-with-free-ranges-761219313073

Best regards,
--  
Anton Kuchin <antonkuchin@nebius.com>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-17 12:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06 23:59 [PATCH 0/2] hw/acpi/aml-build: Fix free ranges calculation in crs_replace_with_free_ranges() Anton Kuchin
2026-11-06 23:59 ` [PATCH 1/2] hw/acpi/aml-build: Ignore used ranges outside the requested window Anton Kuchin
2026-11-17 12:19   ` Michael S. Tsirkin
2026-11-17 12:28   ` Michael S. Tsirkin
2026-11-06 23:59 ` [PATCH 2/2] hw/acpi/aml-build: Avoid overflow when advancing the free_base cursor Anton Kuchin
2026-11-17 12:20   ` Michael S. Tsirkin
2026-11-17 12:21 ` [PATCH 0/2] hw/acpi/aml-build: Fix free ranges calculation in crs_replace_with_free_ranges() Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.