qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, marcel.a@redhat.com
Subject: [Qemu-devel] [PATCH v4 0/3] pc: acpi-build: make linker & RSDP tables dynamic
Date: Mon,  9 Feb 2015 13:59:52 +0000	[thread overview]
Message-ID: <1423490395-22054-1-git-send-email-imammedo@redhat.com> (raw)

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

             reply	other threads:[~2015-02-09 14:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 13:59 Igor Mammedov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423490395-22054-1-git-send-email-imammedo@redhat.com \
    --to=imammedo@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).