qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: amit.shah@redhat.com, peter.maydell@linaro.org,
	dgilbert@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 for-2.1 2/2] pc: hack for migration compatibility from QEMU 2.0
Date: Thu, 24 Jul 2014 18:29:13 +0200	[thread overview]
Message-ID: <53D13459.3000507@redhat.com> (raw)
In-Reply-To: <1406212329-24439-3-git-send-email-pbonzini@redhat.com>

On 07/24/14 16:32, Paolo Bonzini wrote:
> Changing the ACPI table size causes migration to break, and the memory
> hotplug work opened our eyes on how horribly we were breaking things in
> 2.0 already.
> 
> The ACPI table size is rounded to the next 4k, which one would think
> gives some headroom.  In practice this is not the case, because the user
> can control the ACPI table size (each CPU adds 97 bytes to the SSDT and
> 8 to the MADT) and so some "-smp" values will break the 4k boundary and
> fail to migrate.  Similarly, PCI bridges add ~1870 bytes to the SSDT.
> 
> To fix this, hard-code 64k as the maximum ACPI table size, which
> (despite being an order of magnitude smaller than 640k) should be enough
> for everyone.
> 
> To fix migration from QEMU 2.0, compute the payload size of QEMU 2.0
> and always use that one.  The previous patch shrunk the ACPI tables
> enough that the QEMU 2.0 size should always be enough.
> 
> Migration from QEMU 1.7 should work for guests that have a number of CPUs
> other than 12, 13, 14, 54, 55, 56, 97, 98, 139, 140.  It was already
> broken from QEMU 1.7 to QEMU 2.0 in the same way, though.
> 
> Even with this patch, QEMU 1.7 and 2.0 have two different ideas of
> "-M pc-i440fx-2.0" when there are PCI bridges.  Igor sent a patch to
> adopt the QEMU 1.7 definition.  I think distributions should apply
> it if they move directly from QEMU 1.7 to 2.1+ without ever packaging
> version 2.0.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> 	replace magic constants with #defines [Igor]
> 	remove stray line from comment [Laszlo]

I compared this too with its v1 counterpart, and it looks good. I have
one question (just curiosity): the following paragraph was dropped from
the commit message -- why?

-Non-AML tables can change depending on the configuration (especially
-MADT, SRAT, HPET) but they remain the same between QEMU 2.0 and 2.1,
-so we only compute our padding based on the sizes of the SSDT and DSDT.

I think this remains true in v2 as well:
- "aml_len" and "legacy_aml_len" still "only" cover the DSDT and the
SSDT, and
- the non-AML tables (eg. the MADT, now spelled out in the commit
message), although they may grow with the number of CPUs, continue to
remain the same between 2.0 and 2.1.

IOW, I think you could have kept this paragraph if you wanted to. Was it
an oversight to drop it, or did the paragraph contain something
incorrect (in v1) that I'm unaware of? Or is it just redundant?

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks,
Laszlo

  reply	other threads:[~2014-07-24 16:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 14:32 [Qemu-devel] [PATCH v2 for-2.1 0/2] pc: fix /etc/acpi/tables size in fw_cfg for -M pc-i440fx-2.0 Paolo Bonzini
2014-07-24 14:32 ` [Qemu-devel] [PATCH v2 for-2.1 1/2] acpi-dsdt: procedurally generate _PRT Paolo Bonzini
2014-07-24 16:13   ` Laszlo Ersek
2014-07-24 14:32 ` [Qemu-devel] [PATCH v2 for-2.1 2/2] pc: hack for migration compatibility from QEMU 2.0 Paolo Bonzini
2014-07-24 16:29   ` Laszlo Ersek [this message]
2014-07-24 16:30     ` Paolo Bonzini
2014-07-28 11:45   ` Michael S. Tsirkin
2014-07-28 12:40     ` Paolo Bonzini

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=53D13459.3000507@redhat.com \
    --to=lersek@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).