qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] ac98fa: update-linux-headers: Rename SW_MAX t


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] ac98fa: update-linux-headers: Rename SW_MAX to SW_MAX_
Date: Mon, 12 Oct 2015 05:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ac98fa849e834f48e5a64cf4b22218ba4047e142
      
https://github.com/qemu/qemu/commit/ac98fa849e834f48e5a64cf4b22218ba4047e142
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M include/standard-headers/linux/input.h
    M scripts/update-linux-headers.sh

  Log Message:
  -----------
  update-linux-headers: Rename SW_MAX to SW_MAX_

The next commit will compile hw/input/virtio-input.c and
hw/input/virtio-input-hid.c even when CONFIG_LINUX is off.  These
files include both "include/standard-headers/linux/input.h" and
<windows.h> then.  Doesn't work, because both define SW_MAX.  We don't
actually use it.  Patch input.h to define SW_MAX_ instead.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Gerd Hoffmann <address@hidden>


  Commit: c6047e9621f77a65993bcda8f58b676996e24bb5
      
https://github.com/qemu/qemu/commit/c6047e9621f77a65993bcda8f58b676996e24bb5
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M hw/input/Makefile.objs
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio-pci.h

  Log Message:
  -----------
  virtio-input: Fix device introspection on non-Linux hosts

When CONFIG_LINUX is off, devices "virtio-keyboard-device",
"virtio-mouse-device", "virtio-tablet-device" and
"virtio-input-host-device" aren't compiled in, yet
"virtio-keyboard-pci", "virtio-mouse-pci", "virtio-tablet-pci" and
"virtio-input-host-pci" still are.  Attempts to introspect them crash,
e.g.

    $ qemu-system-x86_64 -device virtio-tablet-pci,help
    **
    ERROR:/work/armbru/qemu/qom/object.c:333:object_initialize_with_type: 
assertion failed: (type != NULL)

Broken in commit 710e2d9 and commit 006a5ed.

Fix by compiling the "virtio-FOO-pci" exactly when compiling the
"virtio-FOO-device": compile "virtio-keyboard-device",
"virtio-mouse-device", "virtio-tablet-device" regardless of
CONFIG_LINUX, and compile "virtio-input-host-pci" only for
CONFIG_LINUX.

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Gerd Hoffmann <address@hidden>
Message-Id: <address@hidden>


  Commit: 2e2b8eb70fdb7dfbec39f3a19b20f9a73f2f813e
      
https://github.com/qemu/qemu/commit/2e2b8eb70fdb7dfbec39f3a19b20f9a73f2f813e
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: allow destroying a non-empty MemoryRegion

This is legal; the MemoryRegion will simply unreference all the
existing subregions and possibly bring them down with it as well.
However, it requires a bit of care to avoid an infinite loop.
Finalizing a memory region cannot trigger an address space update,
but memory_region_del_subregion errs on the side of caution and
might trigger a spurious update: avoid that by resetting mr->enabled
first.

Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 81e0ab48dda611e9571dc2e166840205a4208567
      
https://github.com/qemu/qemu/commit/81e0ab48dda611e9571dc2e166840205a4208567
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M hw/arm/pxa2xx.c
    M hw/display/cg3.c
    M hw/display/tcx.c
    M hw/misc/arm_integrator_debug.c
    M hw/misc/macio/cuda.c
    M hw/misc/macio/macio.c
    M hw/pcmcia/pxa2xx.c

  Log Message:
  -----------
  hw: do not pass NULL to memory_region_init from instance_init

This causes the region to outlive the object, because it attaches the
region to /machine.  This is not nice for the "realize" method, but
much worse for "instance_init" because it can cause dangling pointers
after a simple object_new/object_unref pair.

Reported-by: Markus Armbruster <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Tested-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>


  Commit: c7104402353bf32ac1d3a276e3619a20e910506b
      
https://github.com/qemu/qemu/commit/c7104402353bf32ac1d3a276e3619a20e910506b
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M hw/misc/macio/macio.c

  Log Message:
  -----------
  macio: move DBDMA_init from instance_init to realize

DBDMA_init is not idempotent, and calling it from instance_init
breaks a simple object_new/object_unref pair.  Work around this,
pending qdev-ification of DBDMA, by moving the call to realize.

Reported-by: Markus Armbruster <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: e253c287153c6f3ce4177686ac12c196f9bd8292
      
https://github.com/qemu/qemu/commit/e253c287153c6f3ce4177686ac12c196f9bd8292
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M tests/Makefile

  Log Message:
  -----------
  tests: Fix how qom-test is run

We want to run qom-test for every architecture, without having to
manually add it to every architecture's list of tests.  Commit 3687d53
accomplished this by adding it to every architecture's list
automatically.

However, some architectures inherit their tests from others, like this:

    check-qtest-x86_64-y = $(check-qtest-i386-y)
    check-qtest-microblazeel-y = $(check-qtest-microblaze-y)
    check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)

For such architectures, we ended up running the (slow!) test twice.
Commit 2b8419c attempted to avoid this by adding the test only when
it's not already present.  Works only as long as we consider adding
the test to the architectures on the left hand side *after* the ones
on the right hand side: x86_64 after i386, microblazeel after
microblaze, xtensaeb after xtensa.

Turns out we consider them in $(SYSEMU_TARGET_LIST) order.  Defined as

    SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
       $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))

On my machine, this results in the oder xtensa, x86_64, microblazeel,
microblaze, i386.  Consequently, qom-test runs twice for microblazeel
and x86_64.

Replace this complex and flawed machinery with a much simpler one: add
generic tests (currently just qom-test) to check-qtest-generic-y
instead of check-qtest-$(target)-y for every target, then run
$(check-qtest-generic-y) for every target.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Message-Id: <address@hidden>


  Commit: 82b15c7bdbda6207d1fee2ec824432e64af3ecb4
      
https://github.com/qemu/qemu/commit/82b15c7bdbda6207d1fee2ec824432e64af3ecb4
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M tests/libqtest.c

  Log Message:
  -----------
  libqtest: Clean up unused QTestState member sigact_old

Unused since commit d766825.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>


  Commit: 5fb48d9673b76fc53507a0e717a12968e57d846e
      
https://github.com/qemu/qemu/commit/5fb48d9673b76fc53507a0e717a12968e57d846e
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M tests/drive_del-test.c
    M tests/ide-test.c
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  libqtest: New hmp() & friends

New convenience function hmp() to facilitate use of
human-monitor-command in tests.  Use it to simplify its existing uses.

To blend into existing libqtest code, also add qtest_hmpv() and
qtest_hmp().  That, and the egregiously verbose GTK-Doc comment format
make this patch look bigger than it is.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>


  Commit: 2d1abb850fd15fd6eb75a92290be5f93b2772ec5
      
https://github.com/qemu/qemu/commit/2d1abb850fd15fd6eb75a92290be5f93b2772ec5
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M tests/Makefile
    A tests/device-introspect-test.c

  Log Message:
  -----------
  device-introspect-test: New, covering device introspection

The test doesn't check that the output makes any sense, only that QEMU
survives.  Useful since we've had an astounding number of crash bugs
around there.

In fact, we have a bunch of them right now: a few devices crash or
hang, and some leave dangling pointers behind.  The test skips testing
the broken parts.  The next commits will fix them up, and drop the
skipping.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: edb1523d90415cb79f60f83b4028ef3820d15612
      
https://github.com/qemu/qemu/commit/edb1523d90415cb79f60f83b4028ef3820d15612
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M qmp.c
    M tests/device-introspect-test.c

  Log Message:
  -----------
  qmp: Fix device-list-properties not to crash for abstract device

Broken in commit f4eb32b "qmp: show QOM properties in
device-list-properties", v2.1.

Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Message-Id: <address@hidden>


  Commit: 4c315c27661502a0813b129e41c0bf640c34a8d6
      
https://github.com/qemu/qemu/commit/4c315c27661502a0813b129e41c0bf640c34a8d6
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M hw/arm/allwinner-a10.c
    M hw/arm/digic.c
    M hw/arm/fsl-imx25.c
    M hw/arm/fsl-imx31.c
    M hw/arm/xlnx-zynqmp.c
    M hw/pci-host/versatile.c
    M include/hw/qdev-core.h
    M qmp.c
    M target-alpha/cpu.c
    M target-arm/cpu.c
    M target-cris/cpu.c
    M target-i386/cpu.c
    M target-lm32/cpu.c
    M target-m68k/cpu.c
    M target-microblaze/cpu.c
    M target-mips/cpu.c
    M target-moxie/cpu.c
    M target-openrisc/cpu.c
    M target-ppc/kvm.c
    M target-s390x/cpu.c
    M target-sh4/cpu.c
    M target-sparc/cpu.c
    M target-tilegx/cpu.c
    M target-tricore/cpu.c
    M target-unicore32/cpu.c
    M target-xtensa/cpu.c
    M tests/device-introspect-test.c

  Log Message:
  -----------
  qdev: Protect device-list-properties against broken devices

Several devices don't survive object_unref(object_new(T)): they crash
or hang during cleanup, or they leave dangling pointers behind.

This breaks at least device-list-properties, because
qmp_device_list_properties() needs to create a device to find its
properties.  Broken in commit f4eb32b "qmp: show QOM properties in
device-list-properties", v2.1.  Example reproducer:

    $ qemu-system-aarch64 -nodefaults -display none -machine none -S -qmp stdio
    {"QMP": {"version": {"qemu": {"micro": 50, "minor": 4, "major": 2}, 
"package": ""}, "capabilities": []}}
    { "execute": "qmp_capabilities" }
    {"return": {}}
    { "execute": "device-list-properties", "arguments": { "typename": 
"pxa2xx-pcmcia" } }
    qemu-system-aarch64: /home/armbru/work/qemu/memory.c:1307: 
memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void 
*)0))' failed.
    Aborted (core dumped)
    [Exit 134 (SIGABRT)]

Unfortunately, I can't fix the problems in these devices right now.
Instead, add DeviceClass member cannot_destroy_with_object_finalize_yet
to mark them:

* Hang during cleanup (didn't debug, so I can't say why):
  "realview_pci", "versatile_pci".

* Dangling pointer in cpus: most CPUs, plus "allwinner-a10", "digic",
  "fsl,imx25", "fsl,imx31", "xlnx,zynqmp", because they create such
  CPUs

* Assert kvm_enabled(): "host-x86_64-cpu", host-i386-cpu",
  "host-powerpc64-cpu", "host-embedded-powerpc-cpu",
  "host-powerpc-cpu" (the powerpc ones can't currently reach the
  assertion, because the CPUs are only registered when KVM is enabled,
  but the assertion is arguably in the wrong place all the same)

Make qmp_device_list_properties() fail cleanly when the device is so
marked.  This improves device-list-properties from "crashes, hangs or
leaves dangling pointers behind" to "fails".  Not a complete fix, just
a better-than-nothing work-around.  In the above reproducer,
device-list-properties now fails with "Can't list properties of device
'pxa2xx-pcmcia'".

This also protects -device FOO,help, which uses the same machinery
since commit ef52358 "qdev-monitor: include QOM properties in -device
FOO, help output", v2.2.  Example reproducer:

    $ qemu-system-aarch64 -machine none -device pxa2xx-pcmcia,help

Before:

    qemu-system-aarch64: .../memory.c:1307: memory_region_finalize: Assertion 
`((&mr->subregions)->tqh_first == ((void *)0))' failed.

After:

    Can't list properties of device 'pxa2xx-pcmcia'

Cc: "Andreas Färber" <address@hidden>
Cc: "Edgar E. Iglesias" <address@hidden>
Cc: Alexander Graf <address@hidden>
Cc: Anthony Green <address@hidden>
Cc: Aurelien Jarno <address@hidden>
Cc: Bastian Koppelmann <address@hidden>
Cc: Blue Swirl <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Guan Xuetao <address@hidden>
Cc: Jia Liu <address@hidden>
Cc: Leon Alrae <address@hidden>
Cc: Mark Cave-Ayland <address@hidden>
Cc: Max Filippov <address@hidden>
Cc: Michael Walle <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: address@hidden
Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>


  Commit: 33fe96833015cf15f4c0aa5bf8d34f60526e0732
      
https://github.com/qemu/qemu/commit/33fe96833015cf15f4c0aa5bf8d34f60526e0732
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-09 (Fri, 09 Oct 2015)

  Changed paths:
    M qdev-monitor.c

  Log Message:
  -----------
  Revert "qdev: Use qdev_get_device_class() for -device <type>,help"

This reverts commit 31bed5509dfcbdfc293154ce81086a4dbd7a80b6.

The reverted commit changed qdev_device_help() to reject abstract
devices and devices that have cannot_instantiate_with_device_add_yet
set, to fix crash bugs like -device x86_64-cpu,help.

Rejecting abstract devices makes sense: they're purely internal, and
the implementation of the help feature can't cope with them.

Rejecting non-pluggable devices makes less sense: even though you
can't use them with -device, the help may still be useful elsewhere,
for instance with -global.  This is a regression: -device FOO,help
used to help even for FOO that aren't pluggable.

The previous two commits fixed the crash bug at a lower layer, so
reverting this one is now safe.  Fixes the -device FOO,help
regression, except for the broken devices marked
cannot_even_create_with_object_new_yet.  For those, the error message
is improved.

Example of a device where the regression is fixed:

    $ qemu-system-x86_64 -device PIIX4_PM,help
    PIIX4_PM.command_serr_enable=bool (on/off)
    PIIX4_PM.multifunction=bool (on/off)
    PIIX4_PM.rombar=uint32
    PIIX4_PM.romfile=str
    PIIX4_PM.addr=int32 (Slot and optional function number, example: 06.0 or 06)
    PIIX4_PM.memory-hotplug-support=bool
    PIIX4_PM.acpi-pci-hotplug-with-bridge-support=bool
    PIIX4_PM.s4_val=uint8
    PIIX4_PM.disable_s4=uint8
    PIIX4_PM.disable_s3=uint8
    PIIX4_PM.smb_io_base=uint32

Example of a device where it isn't fixed:

    $ qemu-system-x86_64 -device host-x86_64-cpu,help
    Can't list properties of device 'host-x86_64-cpu'

Both failed with "Parameter 'driver' expects pluggable device type"
before.

Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>


  Commit: 768492239014cb5e6161f1be80a9c8043c4530c2
      
https://github.com/qemu/qemu/commit/768492239014cb5e6161f1be80a9c8043c4530c2
  Author: Peter Maydell <address@hidden>
  Date:   2015-10-12 (Mon, 12 Oct 2015)

  Changed paths:
    M hw/arm/allwinner-a10.c
    M hw/arm/digic.c
    M hw/arm/fsl-imx25.c
    M hw/arm/fsl-imx31.c
    M hw/arm/pxa2xx.c
    M hw/arm/xlnx-zynqmp.c
    M hw/display/cg3.c
    M hw/display/tcx.c
    M hw/input/Makefile.objs
    M hw/misc/arm_integrator_debug.c
    M hw/misc/macio/cuda.c
    M hw/misc/macio/macio.c
    M hw/pci-host/versatile.c
    M hw/pcmcia/pxa2xx.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio-pci.h
    M include/hw/qdev-core.h
    M include/standard-headers/linux/input.h
    M memory.c
    M qdev-monitor.c
    M qmp.c
    M scripts/update-linux-headers.sh
    M target-alpha/cpu.c
    M target-arm/cpu.c
    M target-cris/cpu.c
    M target-i386/cpu.c
    M target-lm32/cpu.c
    M target-m68k/cpu.c
    M target-microblaze/cpu.c
    M target-mips/cpu.c
    M target-moxie/cpu.c
    M target-openrisc/cpu.c
    M target-ppc/kvm.c
    M target-s390x/cpu.c
    M target-sh4/cpu.c
    M target-sparc/cpu.c
    M target-tilegx/cpu.c
    M target-tricore/cpu.c
    M target-unicore32/cpu.c
    M target-xtensa/cpu.c
    M tests/Makefile
    A tests/device-introspect-test.c
    M tests/drive_del-test.c
    M tests/ide-test.c
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-10-09' 
into staging

Fix device introspection regressions

# gpg: Signature made Fri 09 Oct 2015 14:43:41 BST using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"

* remotes/armbru/tags/pull-monitor-2015-10-09:
  Revert "qdev: Use qdev_get_device_class() for -device <type>,help"
  qdev: Protect device-list-properties against broken devices
  qmp: Fix device-list-properties not to crash for abstract device
  device-introspect-test: New, covering device introspection
  libqtest: New hmp() & friends
  libqtest: Clean up unused QTestState member sigact_old
  tests: Fix how qom-test is run
  macio: move DBDMA_init from instance_init to realize
  hw: do not pass NULL to memory_region_init from instance_init
  memory: allow destroying a non-empty MemoryRegion
  virtio-input: Fix device introspection on non-Linux hosts
  update-linux-headers: Rename SW_MAX to SW_MAX_

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


Compare: https://github.com/qemu/qemu/compare/c9003eb4662f...768492239014

reply via email to

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