qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 3e16d1: Python-lang gdb script to extract x86


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 3e16d1: Python-lang gdb script to extract x86_64 guest vmc...
Date: Fri, 31 Jan 2014 03:30:10 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 3e16d14fd93ca6059134ba6b4f65c1c3e4cd3a18
      
https://github.com/qemu/qemu/commit/3e16d14fd93ca6059134ba6b4f65c1c3e4cd3a18
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    A scripts/dump-guest-memory.py

  Log Message:
  -----------
  Python-lang gdb script to extract x86_64 guest vmcore from qemu coredump

When qemu dies unexpectedly, for example in response to an explicit
abort() call, or (more importantly) when an external signal is delivered
to it that results in a coredump, sometimes it is useful to extract the
guest vmcore from the qemu process' memory image. The guest vmcore might
help understand an emulation problem in qemu, or help debug the guest.

This script reimplements (and cuts many features of) the
qmp_dump_guest_memory() command in gdb/Python,

  https://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html

working off the saved memory image of the qemu process. The docstring in
the patch (serving as gdb help text) describes the limitations relative to
the QMP command.

Dependencies of qmp_dump_guest_memory() have been reimplemented as needed.
I sought to follow the general structure, sticking to original function
names where possible. However, keeping it simple prevailed in some places.

The patch has been tested with a 4 VCPU, 768 MB, RHEL-6.4
(2.6.32-358.el6.x86_64) guest:

- The script printed

> guest RAM blocks:
> target_start     target_end       host_addr        message count
> ---------------- ---------------- ---------------- ------- -----
> 0000000000000000 00000000000a0000 00007f95d0000000 added       1
> 00000000000a0000 00000000000b0000 00007f960ac00000 added       2
> 00000000000c0000 00000000000ca000 00007f95d00c0000 added       3
> 00000000000ca000 00000000000cd000 00007f95d00ca000 joined      3
> 00000000000cd000 00000000000d0000 00007f95d00cd000 joined      3
> 00000000000d0000 00000000000f0000 00007f95d00d0000 joined      3
> 00000000000f0000 0000000000100000 00007f95d00f0000 joined      3
> 0000000000100000 0000000030000000 00007f95d0100000 joined      3
> 00000000fc000000 00000000fc800000 00007f960ac00000 added       4
> 00000000fffe0000 0000000100000000 00007f9618800000 added       5
> dumping range at 00007f95d0000000 for length 00000000000a0000
> dumping range at 00007f960ac00000 for length 0000000000010000
> dumping range at 00007f95d00c0000 for length 000000002ff40000
> dumping range at 00007f960ac00000 for length 0000000000800000
> dumping range at 00007f9618800000 for length 0000000000020000

- The vmcore was checked with "readelf", comparing the results against a
  vmcore written by qmp_dump_guest_memory():

> --- theirs      2013-09-12 17:38:59.797289404 +0200
> +++ mine        2013-09-12 17:39:03.820289404 +0200
> @@ -27,16 +27,16 @@
>    Type           Offset             VirtAddr           PhysAddr
>                   FileSiz            MemSiz              Flags  Align
>    NOTE           0x0000000000000190 0x0000000000000000 0x0000000000000000
> -                 0x0000000000000ca0 0x0000000000000ca0         0
> -  LOAD           0x0000000000000e30 0x0000000000000000 0x0000000000000000
> +                 0x000000000000001c 0x000000000000001c         0
> +  LOAD           0x00000000000001ac 0x0000000000000000 0x0000000000000000
>                   0x00000000000a0000 0x00000000000a0000         0
> -  LOAD           0x00000000000a0e30 0x0000000000000000 0x00000000000a0000
> +  LOAD           0x00000000000a01ac 0x0000000000000000 0x00000000000a0000
>                   0x0000000000010000 0x0000000000010000         0
> -  LOAD           0x00000000000b0e30 0x0000000000000000 0x00000000000c0000
> +  LOAD           0x00000000000b01ac 0x0000000000000000 0x00000000000c0000
>                   0x000000002ff40000 0x000000002ff40000         0
> -  LOAD           0x000000002fff0e30 0x0000000000000000 0x00000000fc000000
> +  LOAD           0x000000002fff01ac 0x0000000000000000 0x00000000fc000000
>                   0x0000000000800000 0x0000000000800000         0
> -  LOAD           0x00000000307f0e30 0x0000000000000000 0x00000000fffe0000
> +  LOAD           0x00000000307f01ac 0x0000000000000000 0x00000000fffe0000
>                   0x0000000000020000 0x0000000000020000         0
>
>  There is no dynamic section in this file.
> @@ -47,13 +47,6 @@
>
>  No version information found in this file.
>
> -Notes at offset 0x00000190 with length 0x00000ca0:
> +Notes at offset 0x00000190 with length 0x0000001c:
>    Owner                Data size       Description
> -  CORE         0x00000150      NT_PRSTATUS (prstatus structure)
> -  CORE         0x00000150      NT_PRSTATUS (prstatus structure)
> -  CORE         0x00000150      NT_PRSTATUS (prstatus structure)
> -  CORE         0x00000150      NT_PRSTATUS (prstatus structure)
> -  QEMU         0x000001b0      Unknown note type: (0x00000000)
> -  QEMU         0x000001b0      Unknown note type: (0x00000000)
> -  QEMU         0x000001b0      Unknown note type: (0x00000000)
> -  QEMU         0x000001b0      Unknown note type: (0x00000000)
> +  NONE         0x00000005      Unknown note type: (0x00000000)

- The vmcore was checked with "crash" too, again comparing the results
  against a vmcore written by qmp_dump_guest_memory():

> --- guest.vmcore.log2   2013-09-12 17:52:27.074289201 +0200
> +++ example.dump.log2   2013-09-12 17:52:15.904289203 +0200
> @@ -22,11 +22,11 @@
>  This GDB was configured as "x86_64-unknown-linux-gnu"...
>
>       KERNEL: /usr/lib/debug/lib/modules/2.6.32-358.el6.x86_64/vmlinux
> -    DUMPFILE: /home/lacos/tmp/guest.vmcore
> +    DUMPFILE: /home/lacos/tmp/example.dump
>          CPUS: 4
> -        DATE: Thu Sep 12 17:16:11 2013
> -      UPTIME: 00:01:09
> -LOAD AVERAGE: 0.07, 0.03, 0.00
> +        DATE: Thu Sep 12 17:17:41 2013
> +      UPTIME: 00:00:38
> +LOAD AVERAGE: 0.18, 0.05, 0.01
>         TASKS: 130
>      NODENAME: localhost.localdomain
>       RELEASE: 2.6.32-358.el6.x86_64
> @@ -38,12 +38,12 @@
>       COMMAND: "swapper"
>          TASK: ffffffff81a8d020  (1 of 4)  [THREAD_INFO: ffffffff81a00000]
>           CPU: 0
> -       STATE: TASK_RUNNING (PANIC)
> +       STATE: TASK_RUNNING (ACTIVE)
> +     WARNING: panic task not found
>
>  crash> bt
>  PID: 0      TASK: ffffffff81a8d020  CPU: 0   COMMAND: "swapper"
> - #0 [ffffffff81a01ed0] default_idle at ffffffff8101495d
> - #1 [ffffffff81a01ef0] cpu_idle at ffffffff81009fc6
> + #0 [ffffffff81a01ef0] cpu_idle at ffffffff81009fc6
>  crash> task ffffffff81a8d020
>  PID: 0      TASK: ffffffff81a8d020  CPU: 0   COMMAND: "swapper"
>  struct task_struct {
> @@ -75,7 +75,7 @@
>        prev = 0xffffffff81a8d080
>      },
>      on_rq = 0,
> -    exec_start = 8618466836,
> +    exec_start = 7469214014,
>      sum_exec_runtime = 0,
>      vruntime = 0,
>      prev_sum_exec_runtime = 0,
> @@ -149,7 +149,7 @@
>    },
>    tasks = {
>      next = 0xffff88002d621948,
> -    prev = 0xffff880029618f28
> +    prev = 0xffff880023b74488
>    },
>    pushable_tasks = {
>      prio = 140,
> @@ -165,7 +165,7 @@
>      }
>    },
>    mm = 0x0,
> -  active_mm = 0xffff88002929b780,
> +  active_mm = 0xffff8800297eb980,
>    exit_state = 0,
>    exit_code = 0,
>    exit_signal = 0,
> @@ -177,7 +177,7 @@
>    sched_reset_on_fork = 0,
>    pid = 0,
>    tgid = 0,
> -  stack_canary = 2483693585637059287,
> +  stack_canary = 7266362296181431986,
>    real_parent = 0xffffffff81a8d020,
>    parent = 0xffffffff81a8d020,
>    children = {
> @@ -224,14 +224,14 @@
>    set_child_tid = 0x0,
>    clear_child_tid = 0x0,
>    utime = 0,
> -  stime = 3,
> +  stime = 2,
>    utimescaled = 0,
> -  stimescaled = 3,
> +  stimescaled = 2,
>    gtime = 0,
>    prev_utime = 0,
>    prev_stime = 0,
>    nvcsw = 0,
> -  nivcsw = 1000,
> +  nivcsw = 1764,
>    start_time = {
>      tv_sec = 0,
>      tv_nsec = 0

- <name_dropping>I asked for Dave Anderson's help with verifying the
  extracted vmcore, and his comments make me think I should post
  this.</name_dropping>

Signed-off-by: Laszlo Ersek <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 15bce1b7c55c69f47e13c9eb2a4b80f41da26581
      
https://github.com/qemu/qemu/commit/15bce1b7c55c69f47e13c9eb2a4b80f41da26581
  Author: Gabriel L. Somlo <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/i386/acpi-dsdt-isa.dsl
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/q35-acpi-dsdt.dsl
    M hw/misc/applesmc.c
    M include/hw/isa/isa.h

  Log Message:
  -----------
  Add DSDT node for AppleSMC

AppleSMC (-device isa-applesmc) is required to boot OS X guests.
OS X expects a SMC node to be present in the ACPI DSDT. This patch
adds a SMC node to the DSDT, and dynamically patches the return value
of SMC._STA to either 0x0B if the chip is present, or otherwise to 0x00,
before booting the guest.

Signed-off-by: Gabriel Somlo <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 8977557ae418f9b9ff5c35ee39161a33f2368e6a
      
https://github.com/qemu/qemu/commit/8977557ae418f9b9ff5c35ee39161a33f2368e6a
  Author: Gabriel L. Somlo <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/i386/acpi-dsdt-isa.dsl

  Log Message:
  -----------
  ACPI: Fix AppleSMC _STA size

Minimize the storage used for AppleSMC's _STA (8bit), relying on ASL
to implicitly convert it to the officially specified 32bit value.

Signed-off-by: Gabriel Somlo <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 4dd72e04c2c4759782d0eb3e3aff6a36889c1e18
      
https://github.com/qemu/qemu/commit/4dd72e04c2c4759782d0eb3e3aff6a36889c1e18
  Author: Stefan Weil <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/net/vhost_net.c

  Log Message:
  -----------
  virtio: Fix return value for dummy function vhost_net_virtqueue_pending

cgcc complains that -ENOSYS is not a good value for 'bool'.

A dummy virtio will never have pending queue entries, so let us return
false.

Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: d259793808052dbef6d2d90cdb09150d03b8413b
      
https://github.com/qemu/qemu/commit/d259793808052dbef6d2d90cdb09150d03b8413b
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    A tests/acpi-test-data/pc/APIC
    A tests/acpi-test-data/pc/DSDT
    A tests/acpi-test-data/pc/FACP
    A tests/acpi-test-data/pc/FACS
    A tests/acpi-test-data/pc/HPET
    A tests/acpi-test-data/pc/SSDT
    A tests/acpi-test-data/q35/APIC
    A tests/acpi-test-data/q35/DSDT
    A tests/acpi-test-data/q35/FACP
    A tests/acpi-test-data/q35/FACS
    A tests/acpi-test-data/q35/HPET
    A tests/acpi-test-data/q35/MCFG
    A tests/acpi-test-data/q35/SSDT

  Log Message:
  -----------
  acpi unit-test: add test files

Added unit-test's expected aml files to be compared
with the actual ACPI tables.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c2304b52f1b20fa79d299177d1fe75df2d265bfa
      
https://github.com/qemu/qemu/commit/c2304b52f1b20fa79d299177d1fe75df2d265bfa
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: added acpi unit-test files

Ensure configure will set-up links for the files
if the build is created in other directory.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 9e8458c0232356a0c0eebb4fa4928fd02250c5f4
      
https://github.com/qemu/qemu/commit/9e8458c0232356a0c0eebb4fa4928fd02250c5f4
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M tests/acpi-test.c

  Log Message:
  -----------
  acpi unit-test: compare DSDT and SSDT tables against expected values

This test will run only if iasl is installed on the host machine.
The test plan:
 1. Dumps the ACPI tables as AML on the disk.
 2. Runs iasl to disassembly the tables into ASL files.
 3. Runs iasl to disassembly the offline AML files into ASL files.
 4. Compares the ASL files.

The test runs for both default machine and q35.
In case the test fails, it can be easily tweaked to
show the differences between the ASL files and
understand the issue.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 9dd6cabdd3bfa49d4f594956e8ee93f8996460c7
      
https://github.com/qemu/qemu/commit/9dd6cabdd3bfa49d4f594956e8ee93f8996460c7
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M scripts/create_config

  Log Message:
  -----------
  configure: add CONFIG_IASL to config-host.h

Acpi unit-tests will extract iasl executable
from CONFIG_IASL define.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: cc8fa0e80836c51ba644d910cd89540a5bc83fc2
      
https://github.com/qemu/qemu/commit/cc8fa0e80836c51ba644d910cd89540a5bc83fc2
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M tests/acpi-test.c

  Log Message:
  -----------
  acpi unit-test: extract iasl executable from configuration

The test checked if iasl is installed by running "iasl"
and checking the error output.
It is better to use the iasl executable as appears
in configuration.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: cebc92a2131be21cc4dc5f72f1e243061cd96b1f
      
https://github.com/qemu/qemu/commit/cebc92a2131be21cc4dc5f72f1e243061cd96b1f
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    A tests/acpi-test-data/rebuild-expected-aml.sh

  Log Message:
  -----------
  acpi unit-test: added script to rebuild the expected aml files

Acpi unit-test will fail every time the acpi tables change.
This script rebuild the expected aml files, so the test
will pass. It also validates the modifications.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 4500bc98a6aab1734d865afaeade3509eb65b560
      
https://github.com/qemu/qemu/commit/4500bc98a6aab1734d865afaeade3509eb65b560
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M tests/acpi-test.c

  Log Message:
  -----------
  acpi unit-test: hook to rebuild expected aml files

When running the test with TEST_ACPI_REBUILD_AML=y environment
variable, the test will rebuild and validate the expected aml
files.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 084137ddbbb30f5f85298711dc2d501a625d37ab
      
https://github.com/qemu/qemu/commit/084137ddbbb30f5f85298711dc2d501a625d37ab
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M tests/acpi-test.c

  Log Message:
  -----------
  tests: fix acpi to work on bigendian host

Double endianness convertion make this test failing on POWERPC machine
running in big-endian.

This fixes the test to success on big-endian host.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: a3a74ab90ea81cafaf4d03824d47a6d028ea996d
      
https://github.com/qemu/qemu/commit/a3a74ab90ea81cafaf4d03824d47a6d028ea996d
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M tests/acpi-test.c

  Log Message:
  -----------
  acpi unit-test: renamed ssdt_tables to tables

Just a refactoring, ssdt_tables name was confusing as
it included other tables as well.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 69d09245d19765fd461cc3d3a7d79686007c4474
      
https://github.com/qemu/qemu/commit/69d09245d19765fd461cc3d3a7d79686007c4474
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M tests/acpi-test.c

  Log Message:
  -----------
  acpi unit-test: resolved iasl crash

It seems that iasl has an issue when disassembles
some ACPI tables using the command line:
iasl -e DSDT -e SSDT -d HPET

Modified the iasl command line to "iasl -d HPET"
until the problem is solved. The command line
remained the same for DSDT and SSDT tables.

Reported-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 0651596cbed8c0806aa2d7e436201f28b2fe179a
      
https://github.com/qemu/qemu/commit/0651596cbed8c0806aa2d7e436201f28b2fe179a
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M tests/acpi-test.c

  Log Message:
  -----------
  acpi unit-test: do not fail on asl mismatch

The asl comparison will break every time the ACPI
tables are updated. This may break the git bisect.
Instead of failing print a warning on stderr
including the retained asl files, so they can be
compared offline.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 4d25299cb2b57a16fd3194e938eeb78d219400ba
      
https://github.com/qemu/qemu/commit/4d25299cb2b57a16fd3194e938eeb78d219400ba
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/Makefile.objs

  Log Message:
  -----------
  pc: make: fix dependencies: rebuild when included file is changed

some *.dsl files include another *.dsl files but there weren't
any dependicies and when included file changed target table wasn't
rebuild. Fix this by using the same auto dependency generation
as for C files.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: eb0acfdde604930688c47fe1ba99bec2bd84b7ad
      
https://github.com/qemu/qemu/commit/eb0acfdde604930688c47fe1ba99bec2bd84b7ad
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/pci/pci.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pci: add pci_for_each_bus_depth_first

Useful for ACPI hotplug.

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: db4728e6fec0364b866d3106125974eedc00e091
      
https://github.com/qemu/qemu/commit/db4728e6fec0364b866d3106125974eedc00e091
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/acpi/Makefile.objs
    A hw/acpi/pcihp.c
    A include/hw/acpi/pcihp.h

  Log Message:
  -----------
  pcihp: generalization of piix4 acpi

Add ACPI based PCI hotplug library with bridge hotplug
support.
Design
   - each bus gets assigned "bsel" property.
   - ACPI code writes this number
     to a new BNUM register, then uses existing
     UP/DOWN registers to probe slot status;
     to eject, write number to BNUM register,
     then slot into existing EJ.

The interface is actually backwards-compatible with
existing PIIX4 ACPI (though not migration compatible).

This is split out from PIIX4 codebase so we can
reuse it for Q35 as well.

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 9e047b982452c633882b486682966c1d97097015
      
https://github.com/qemu/qemu/commit/9e047b982452c633882b486682966c1d97097015
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/acpi/piix4.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  piix4: add acpi pci hotplug support

Add support for acpi pci hotplug using the
new infrastructure.
PIIX4 legacy interface is maintained as is for
machine types 1.7 and older.

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 99fd437dee468609de8218f0eb3b16621fb6a9c9
      
https://github.com/qemu/qemu/commit/99fd437dee468609de8218f0eb3b16621fb6a9c9
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/ssdt-pcihp.dsl

  Log Message:
  -----------
  acpi-build: enable hotplug for PCI bridges

This enables support for device hotplug behind
pci bridges. Bridge devices themselves need
to be pre-configured on qemu command line.

Design:
    - at machine init time, assign "bsel" property to bridges with
      hotplug support
    - dynamically (At ACPI table read) generate ACPI code to handle
      hotplug events for each bridge with "bsel" property

Note: ACPI doesn't support adding or removing bridges by hotplug.
We detect and prevent removal of bridges by hotplug,
unless they were added by hotplug previously
(and so, are not described by ACPI).

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 81cea5e7f2aa61c6c5d33d28bceb81276603d3c9
      
https://github.com/qemu/qemu/commit/81cea5e7f2aa61c6c5d33d28bceb81276603d3c9
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/acpi/Makefile.objs
    A hw/acpi/cpu_hotplug.c
    M hw/acpi/piix4.c
    A include/hw/acpi/cpu_hotplug.h
    A include/hw/acpi/cpu_hotplug_defs.h

  Log Message:
  -----------
  acpi: factor out common cpu hotplug code for PIIX4/Q35

.. so it could be used for adding CPU hotplug to Q35 machine

Add an additional header with that will be shared between
C and ASL code: include/hw/acpi/cpu_hotplug_defs.h

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: d6610bc2adc19a632cb14fc094378cbf5cd60868
      
https://github.com/qemu/qemu/commit/d6610bc2adc19a632cb14fc094378cbf5cd60868
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M docs/specs/acpi_cpu_hotplug.txt
    M hw/acpi/ich9.c
    M include/hw/acpi/cpu_hotplug_defs.h
    M include/hw/acpi/ich9.h

  Log Message:
  -----------
  acpi: ich9: add CPU hotplug handling to Q35 machine

.. use IO port 0cd8-0xcf7 range for CPU present bitmap

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 4782434f3cc016fbab16228e92e90265cf6db908
      
https://github.com/qemu/qemu/commit/4782434f3cc016fbab16228e92e90265cf6db908
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-dsdt-cpu-hotplug.dsl
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/q35-acpi-dsdt.dsl

  Log Message:
  -----------
  pc: set PRST base in DSDT depending on chipset

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 1aa149b479a479323121251f1e8e676765cb354d
      
https://github.com/qemu/qemu/commit/1aa149b479a479323121251f1e8e676765cb354d
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-dsdt-pci-crs.dsl
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/q35-acpi-dsdt.dsl

  Log Message:
  -----------
  pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources

.. so that they might not be used by PCI devices.

Note:
Resort to concatenating templates with preprocessor help,
because 1.0b spec isn't supporting ConcatenateResTemplate,
as result Windows XP fails to execute PCI0._CRS method if
ConcatenateResTemplate() is used.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 562e56a9f8e627b2a4ef60037507361ce3cb4e6d
      
https://github.com/qemu/qemu/commit/562e56a9f8e627b2a4ef60037507361ce3cb4e6d
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-dsdt-pci-crs.dsl
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/q35-acpi-dsdt.dsl

  Log Message:
  -----------
  pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resources

... for range defined at hw/acpi/ich9.c:ICH9_PROC_BASE

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 61a3f63560ccd2b5e8c9134e9213a1cff36f26bf
      
https://github.com/qemu/qemu/commit/61a3f63560ccd2b5e8c9134e9213a1cff36f26bf
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-dsdt-cpu-hotplug.dsl

  Log Message:
  -----------
  pc: ACPI: expose PRST IO range via _CRS

.. so OSPM could notice resource conflict if there is any.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: e4cf8ed08a1b8b996f9939de0d8eda4ed8a3d25e
      
https://github.com/qemu/qemu/commit/e4cf8ed08a1b8b996f9939de0d8eda4ed8a3d25e
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/acpi/piix4.c
    M hw/i386/Makefile.objs
    M hw/i386/acpi-dsdt-cpu-hotplug.dsl
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/q35-acpi-dsdt.dsl
    M include/hw/acpi/cpu_hotplug_defs.h

  Log Message:
  -----------
  pc: ACPI: unify source of CPU hotplug IO base/len

use C headers defines as source of IO base/len for respective
values in ASL code.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 2867534f3d1daa970eba2afdb9b401388bd75b56
      
https://github.com/qemu/qemu/commit/2867534f3d1daa970eba2afdb9b401388bd75b56
  Author: Igor Mammedov <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-dsdt.hex.generated
    M hw/i386/q35-acpi-dsdt.hex.generated
    M hw/i386/ssdt-pcihp.hex.generated
    M hw/i386/ssdt-proc.hex.generated

  Log Message:
  -----------
  pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: b8124cecb55b3bc4e7dee0ff34b294942044d74a
      
https://github.com/qemu/qemu/commit/b8124cecb55b3bc4e7dee0ff34b294942044d74a
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M tests/acpi-test-data/pc/DSDT
    M tests/acpi-test-data/pc/SSDT
    M tests/acpi-test-data/q35/DSDT
    M tests/acpi-test-data/q35/SSDT

  Log Message:
  -----------
  acpi-test: update expected AML since recent changes

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 306077640a652e090779498aadbeb0c605feaacd
      
https://github.com/qemu/qemu/commit/306077640a652e090779498aadbeb0c605feaacd
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  hw/pci: fix error flow in pci multifunction init

Scenario:
  - There is a non multifunction pci device A on 00:0X.0.
  - Hot-plug another multifunction pci device B at 00:0X.1.
  - The operation will fail of course.
  - Try to hot-plug the B device 2-3 more times, qemu will crash.

Reason: The error flow leaves the B's address space into global address spaces
list, but the device object is freed. Fixed that.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: f30ee8a9682be4abfcb05c6389894f8cfc35c3f0
      
https://github.com/qemu/qemu/commit/f30ee8a9682be4abfcb05c6389894f8cfc35c3f0
  Author: Eduardo Habkost <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/pc.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  pc: Save size of RAM below 4GB

The ram_below_4g value will be useful in other places, such as the ACPI
table code, and other code that currently requires passing
below_4g_mem_size around in function arguments.

Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 4c8a949b2416158a311abefc09a20153aa107e93
      
https://github.com/qemu/qemu/commit/4c8a949b2416158a311abefc09a20153aa107e93
  Author: Eduardo Habkost <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi: Fix PCI hole handling on build_srat()

The original SeaBIOS code used the RamSize variable, that was used by
SeaBIOS for the size of RAM below 4GB, not for all RAM. When copied to
QEMU, the code was changed to use the full RAM size, and this broke the
build_srat() code that handles the PCI hole.

Change build_srat() to use ram_size_below_4g instead of ram_size, to
restore the original behavior from SeaBIOS.

Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 9a305c8fc7bb567e9f754ddfe5fb102aaeeb770a
      
https://github.com/qemu/qemu/commit/9a305c8fc7bb567e9f754ddfe5fb102aaeeb770a
  Author: Gerd Hoffmann <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/pc_q35.c

  Log Message:
  -----------
  q35: gigabyte alignment for ram

Map 2G (q35) of memory below 4G, so the RAM pieces
are nicely aligned to gigabyte borders.

Keep old memory layout for (a) old machine types and (b) in case all
memory fits below 4G and thus we don't have to split RAM into pieces
in the first place.  The later makes sure this change doesn't take
away memory from 32bit guests.

Signed-off-by: Gerd Hoffmann <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 4e17997d49d6e3a426fd465dfbdf5a4dc04639f4
      
https://github.com/qemu/qemu/commit/4e17997d49d6e3a426fd465dfbdf5a4dc04639f4
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M hw/i386/pc_q35.c

  Log Message:
  -----------
  q35: document gigabyte_align

Document the logic behind the below/above 4G split.

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: a75143eda2ddf581b51e96c000974bcdfe2cbd10
      
https://github.com/qemu/qemu/commit/a75143eda2ddf581b51e96c000974bcdfe2cbd10
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-01-26 (Sun, 26 Jan 2014)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: add self as virtio co-maintainer

This will help make sure I get Cc'd on patches.

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 8a745f2a9296ad2cf6bda33534ed298f2625a4ad
      
https://github.com/qemu/qemu/commit/8a745f2a9296ad2cf6bda33534ed298f2625a4ad
  Author: Michael Mueller <address@hidden>
  Date:   2014-01-27 (Mon, 27 Jan 2014)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  tracing: start trace processing thread in final child process

When running with trace backend e.g. "simple" the writer thread needs to be
implemented in the same process context as the trace points that will be
processed. Under libvirtd control, qemu gets first started in daemonized
mode to privide its capabilities. Creating the writer thread in the initial
process context then leads to a dead lock because the thread gets termined
together with the initial parent. (-daemonize)

Signed-off-by: Michael Mueller <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
[minor whitespace fixes]
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: b618c28831eda2531acc5c1feb9dbb3047d19391
      
https://github.com/qemu/qemu/commit/b618c28831eda2531acc5c1feb9dbb3047d19391
  Author: Lluís Vilanova <address@hidden>
  Date:   2014-01-27 (Mon, 27 Jan 2014)

  Changed paths:
    M scripts/tracetool/backend/simple.py
    M trace/simple.c

  Log Message:
  -----------
  trace: [simple] Do not include "trace/simple.h" in generated tracer headers

The header is not necessary, given that the simple backend does not define any
inlined tracing routines.

Signed-off-by: Lluís Vilanova <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 05735a2a9cf37f5dc11ece998906431dda707258
      
https://github.com/qemu/qemu/commit/05735a2a9cf37f5dc11ece998906431dda707258
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-01-27 (Mon, 27 Jan 2014)

  Changed paths:
    M trace/simple.c

  Log Message:
  -----------
  trace: add glib 2.32+ static GMutex support

The GStaticMutex API was deprecated in glib 2.32.  We cannot switch over
to GMutex unconditionally since we would drop support for older glib
versions.  But the deprecated API warnings during build are annoying so
use static GMutex when possible.

Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 736ec1677f1ae7e64f2f3436ca3775c48f79678c
      
https://github.com/qemu/qemu/commit/736ec1677f1ae7e64f2f3436ca3775c48f79678c
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-01-27 (Mon, 27 Jan 2014)

  Changed paths:
    M scripts/tracetool/backend/simple.py

  Log Message:
  -----------
  trace: fix simple trace "disable" keyword

The trace-events "disable" keyword turns an event into a nop at
compile-time.  This is important for high-frequency events that can
impact performance.

The "disable" keyword is currently broken in the simple trace backend.
This patch fixes the problem as follows:

Trace events are identified by their TraceEventID number.  When events
are disabled there are two options for assigning TraceEventID numbers:
1. Skip disabled events and don't assign them a number.
2. Assign numbers for all events regardless of the disabled keyword.

The simple trace backend and its binary file format uses approach #1.

The tracetool infrastructure has been using approach #2 for a while.

The result is that the numbers used in simple trace files do not
correspond with TraceEventIDs.  In trace/simple.c we assumed that they
are identical and therefore emitted bogus numbers.

This patch fixes the bug by using TraceEventID for trace_event_id()
while sticking to approach #1 for simple trace file numbers.  This
preserves simple trace file format compatibility.

Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 0159a64397fc8e6c85de73613d83a3612c840664
      
https://github.com/qemu/qemu/commit/0159a64397fc8e6c85de73613d83a3612c840664
  Author: Peter Maydell <address@hidden>
  Date:   2014-01-30 (Thu, 30 Jan 2014)

  Changed paths:
    M MAINTAINERS
    M configure
    M docs/specs/acpi_cpu_hotplug.txt
    M hw/acpi/Makefile.objs
    A hw/acpi/cpu_hotplug.c
    M hw/acpi/ich9.c
    A hw/acpi/pcihp.c
    M hw/acpi/piix4.c
    M hw/i386/Makefile.objs
    M hw/i386/acpi-build.c
    M hw/i386/acpi-dsdt-cpu-hotplug.dsl
    M hw/i386/acpi-dsdt-isa.dsl
    M hw/i386/acpi-dsdt-pci-crs.dsl
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/acpi-dsdt.hex.generated
    M hw/i386/pc.c
    M hw/i386/pc_q35.c
    M hw/i386/q35-acpi-dsdt.dsl
    M hw/i386/q35-acpi-dsdt.hex.generated
    M hw/i386/ssdt-pcihp.dsl
    M hw/i386/ssdt-pcihp.hex.generated
    M hw/i386/ssdt-proc.hex.generated
    M hw/misc/applesmc.c
    M hw/net/vhost_net.c
    M hw/pci/pci.c
    A include/hw/acpi/cpu_hotplug.h
    A include/hw/acpi/cpu_hotplug_defs.h
    M include/hw/acpi/ich9.h
    A include/hw/acpi/pcihp.h
    M include/hw/i386/pc.h
    M include/hw/isa/isa.h
    M include/hw/pci/pci.h
    M scripts/create_config
    A scripts/dump-guest-memory.py
    A tests/acpi-test-data/pc/APIC
    A tests/acpi-test-data/pc/DSDT
    A tests/acpi-test-data/pc/FACP
    A tests/acpi-test-data/pc/FACS
    A tests/acpi-test-data/pc/HPET
    A tests/acpi-test-data/pc/SSDT
    A tests/acpi-test-data/q35/APIC
    A tests/acpi-test-data/q35/DSDT
    A tests/acpi-test-data/q35/FACP
    A tests/acpi-test-data/q35/FACS
    A tests/acpi-test-data/q35/HPET
    A tests/acpi-test-data/q35/MCFG
    A tests/acpi-test-data/q35/SSDT
    A tests/acpi-test-data/rebuild-expected-aml.sh
    M tests/acpi-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 'mst/tags/for_anthony' into staging

acpi,pci,pc,virtio fixes and enhancements

This includes new unit-tests for acpi by Marcel,
hotplug for pci bridges by myself (piix only so far)
and cpu hotplug for q35.
And a bunch of fixes all over the place as usual.

I included the patch to fix memory alignment for q35
as well - even though it limits 32 bit guests to 3G (they
previously could address more memory with PAE).
To remove the limit, this will have to be fixed in seabios.

I also added self as virtio co-maintainer so I don't need
to troll the list for patches to review.

Signed-off-by: Michael S. Tsirkin <address@hidden>

# gpg: Signature made Sun 26 Jan 2014 11:12:09 GMT using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg:                 aka "Michael S. Tsirkin <address@hidden>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* mst/tags/for_anthony: (35 commits)
  MAINTAINERS: add self as virtio co-maintainer
  q35: document gigabyte_align
  q35: gigabyte alignment for ram
  acpi: Fix PCI hole handling on build_srat()
  pc: Save size of RAM below 4GB
  hw/pci: fix error flow in pci multifunction init
  acpi-test: update expected AML since recent changes
  pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated
  pc: ACPI: unify source of CPU hotplug IO base/len
  pc: ACPI: expose PRST IO range via _CRS
  pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resources
  pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources
  pc: set PRST base in DSDT depending on chipset
  acpi: ich9: add CPU hotplug handling to Q35 machine
  acpi: factor out common cpu hotplug code for PIIX4/Q35
  acpi-build: enable hotplug for PCI bridges
  piix4: add acpi pci hotplug support
  pcihp: generalization of piix4 acpi
  pci: add pci_for_each_bus_depth_first
  pc: make: fix dependencies: rebuild when included file is changed
  ...

Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 89e4a51ca9546a7bbe1998c4e3d4a3ac3a0c19be
      
https://github.com/qemu/qemu/commit/89e4a51ca9546a7bbe1998c4e3d4a3ac3a0c19be
  Author: Peter Maydell <address@hidden>
  Date:   2014-01-31 (Fri, 31 Jan 2014)

  Changed paths:
    M scripts/tracetool/backend/simple.py
    M trace/simple.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'stefanha/tags/tracing-pull-request' into staging

Tracing pull request

# gpg: Signature made Mon 27 Jan 2014 14:51:09 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg:                 aka "Stefan Hajnoczi <address@hidden>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* stefanha/tags/tracing-pull-request:
  trace: fix simple trace "disable" keyword
  trace: add glib 2.32+ static GMutex support
  trace: [simple] Do not include "trace/simple.h" in generated tracer headers
  tracing: start trace processing thread in final child process

Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/97374ce53888...89e4a51ca954

reply via email to

[Prev in Thread] Current Thread [Next in Thread]