Skip to content

pc: acpi-build: make linker & RSDP tables dynamic

Igor Mammedov qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 5 repliesIn review
  2. v31 patch 1 replySuperseded
  3. v24 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches8 repliesSuperseded

Changes in v4 from the cover letter

* split out linker changes
* fix Michael's patch, by passing build_state to callback so it would actually do something
* split out RSDP migration in separate patch
* s/imutable/immutable/

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3acpi: update RSDP on guest accesshw/i386/acpi-build.c+9 -61 reply
2/3pc: acpi-build: update linker on guest accesshw/i386/acpi-build.c+7 -12 replies
3/3pc: acpi-build: migrate RSDP tablehw/i386/acpi-build.c hw/i386/pc_piix.c hw/i386/pc_q35.c +1 more+22 -92 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMarcel Apfelbaum
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 0/3] pc: acpi-build: make linker & RSDP tables dynamic

changes since v3:
* split out linker changes
* fix Michael's patch, by passing build_state to callback so it would actually do something
* split out RSDP migration in separate patch
* s/imutable/immutable/

Patches 1-2: fix reboot issue after bridge hotplug Patch 3: addresses RSDP reading race migration issue
for new machine types

Linker and RSDP tables are build only once, so if later during rebuild sizes of other ACPI tables change pointers will be patched incorrectly due to wrong offsets in RSDP and linker.

To fix it rebuild linker and RSDP tables along with the rest of ACPI tables so that they would have offsets that match just built tables.

Here is a simple reproducer:
1: hotplug bridge using command:
device_add pci-bridge,chassis_nr=1
2: reset system from monitor:
system_reset

As result pointers to ACPI tables are not correct and guest can't read/parse ACPI tables and on top of it linker corrupted them by patching at stale offsets.

Windows guests just refuses to boot and
Linux guests are more resilient and try to boot without ACPI, sometimes successfully.

Also make sure that new machine types won't see RSDP changed in the middle of reading duing migration, by migrating it along with the rest of the tables.

Igor Mammedov (2):
pc: acpi-build: update linker on guest access
pc: acpi-build: migrate RSDP table

Michael S. Tsirkin (1):
acpi: update RSDP on guest access

 hw/i386/acpi-build.c | 33 ++++++++++++++++++++++++---------
 hw/i386/pc_piix.c    |  3 +++
 hw/i386/pc_q35.c     |  3 +++
 include/hw/i386/pc.h |  1 +
 4 files changed, 31 insertions(+), 9 deletions(-)
Signature · 1 line
1.8.3.1