All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: imammedo@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/5] pc: future-proof migration-compatibility of ACPI tables
Date: Mon, 28 Jul 2014 17:59:07 +0200	[thread overview]
Message-ID: <20140728155907.GA30104@redhat.com> (raw)
In-Reply-To: <1406561658-6761-4-git-send-email-pbonzini@redhat.com>

On Mon, Jul 28, 2014 at 05:34:16PM +0200, Paolo Bonzini wrote:
> This patch avoids that similar changes break QEMU again in the future.
> QEMU will now hard-code 64k as the maximum ACPI table size, which
> (despite being an order of magnitude smaller than 640k) should be enough
> for everyone.

Famous last words :) So what worries me here, is that we
are potentially breaking legal configurations for the
benefit of the minority that cares about cross-version
migration.

So I'm inclined to apply everything except this patch, and
instead, use the patches that I sent to make the
ram block very large, something like 1 Megabyte.

This localizes the pain to cross-version migration.


> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> Tested-by: Igor Mammedov <imammedo@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/i386/acpi-build.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index a3d5822..25cf297 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -62,6 +62,8 @@
>  #define ACPI_BUILD_LEGACY_CPU_AML_SIZE    97
>  #define ACPI_BUILD_ALIGN_SIZE             0x1000
>  
> +#define ACPI_BUILD_TABLE_SIZE             0x10000
> +
>  typedef struct AcpiCpuInfo {
>      DECLARE_BITMAP(found_cpus, ACPI_CPU_HOTPLUG_ID_LIMIT);
>  } AcpiCpuInfo;
> @@ -1569,7 +1571,13 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
>          }
>          g_array_set_size(tables->table_data, legacy_table_size);
>      } else {
> -        acpi_align_size(tables->table_data, ACPI_BUILD_ALIGN_SIZE);
> +        if (tables->table_data->len > ACPI_BUILD_TABLE_SIZE) {
> +            /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots.  */
> +            error_report("ACPI tables are larger than 64k.  Please remove");
> +            error_report("CPUs, NUMA nodes, memory slots or PCI bridges.");
> +            exit(1);
> +        }
> +        g_array_set_size(tables->table_data, ACPI_BUILD_TABLE_SIZE);
>      }
>  
>      acpi_align_size(tables->linker, ACPI_BUILD_ALIGN_SIZE);
> -- 
> 1.8.3.1
> 

  reply	other threads:[~2014-07-28 15:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 15:34 [Qemu-devel] [PATCH v4 0/5] ACPI fixes for QEMU 2.1 Paolo Bonzini
2014-07-28 15:34 ` [Qemu-devel] [PATCH 1/5] acpi-dsdt: procedurally generate _PRT Paolo Bonzini
2014-07-28 15:34 ` [Qemu-devel] [PATCH 2/5] pc: hack for migration compatibility from QEMU 2.0 Paolo Bonzini
2014-07-28 15:34 ` [Qemu-devel] [PATCH 3/5] pc: future-proof migration-compatibility of ACPI tables Paolo Bonzini
2014-07-28 15:59   ` Michael S. Tsirkin [this message]
2014-07-28 16:08     ` Paolo Bonzini
2014-07-28 21:20       ` Michael S. Tsirkin
2014-07-28 15:34 ` [Qemu-devel] [PATCH 4/5] bios-tables-test: fix ASL normalization false positive Paolo Bonzini
2014-07-29  9:28   ` Laszlo Ersek
2014-07-28 15:34 ` [Qemu-devel] [PATCH 5/5] pc: acpi: generate AML only for PCI0 devices if PCI bridge hotplug is disabled Paolo Bonzini
2014-07-28 21:27 ` [Qemu-devel] [PATCH v4 0/5] ACPI fixes for QEMU 2.1 Michael S. Tsirkin
2014-07-29  5:39   ` Paolo Bonzini
2014-07-29 10:25   ` Laszlo Ersek
2014-07-29 10:31     ` Michael S. Tsirkin
2014-07-29 10:39       ` Paolo Bonzini
2014-07-29 10:57         ` Laszlo Ersek
2014-07-29  6:16 ` Markus Armbruster
2014-07-29  6:23   ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2014-07-28 14:02 [Qemu-devel] [PATCH v3 " Paolo Bonzini
2014-07-28 14:02 ` [Qemu-devel] [PATCH 3/5] pc: future-proof migration-compatibility of ACPI tables 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=20140728155907.GA30104@redhat.com \
    --to=mst@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=pbonzini@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 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.