qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/3] pc: acpi-build: make linker & RSDP tables dynamic
@ 2015-02-09 13:59 Igor Mammedov
  2015-02-09 13:59 ` [Qemu-devel] [PATCH v4 1/3] acpi: update RSDP on guest access Igor Mammedov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Igor Mammedov @ 2015-02-09 13:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: mst, marcel.a

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(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2015-02-15 19:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 13:59 [Qemu-devel] [PATCH v4 0/3] pc: acpi-build: make linker & RSDP tables dynamic Igor Mammedov
2015-02-09 13:59 ` [Qemu-devel] [PATCH v4 1/3] acpi: update RSDP on guest access Igor Mammedov
2015-02-09 14:11   ` Marcel Apfelbaum
2015-02-09 13:59 ` [Qemu-devel] [PATCH v4 2/3] pc: acpi-build: update linker " Igor Mammedov
2015-02-09 14:11   ` Marcel Apfelbaum
2015-02-15 19:45   ` Michael S. Tsirkin
2015-02-09 13:59 ` [Qemu-devel] [PATCH v4 3/3] pc: acpi-build: migrate RSDP table Igor Mammedov
2015-02-09 14:19   ` Marcel Apfelbaum
2015-02-15 19:45   ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).