qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 7b6d7b: hw/microblaze/xlnx-zynqmp-pmu: Fix in


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 7b6d7b: hw/microblaze/xlnx-zynqmp-pmu: Fix introspection p...
Date: Mon, 23 Jul 2018 09:08:26 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7b6d7b84da328d5d1fffb862b8388d511e085812
      
https://github.com/qemu/qemu/commit/7b6d7b84da328d5d1fffb862b8388d511e085812
  Author: Thomas Huth <address@hidden>
  Date:   2018-07-23 (Mon, 23 Jul 2018)

  Changed paths:
    M hw/microblaze/xlnx-zynqmp-pmu.c

  Log Message:
  -----------
  hw/microblaze/xlnx-zynqmp-pmu: Fix introspection problem in 'xlnx, 
zynqmp-pmu-soc'

Valgrind complains:

echo "{'execute':'qmp_capabilities'} {'execute':'device-list-properties'," \
 "'arguments':{'typename':'xlnx,zynqmp-pmu-soc'}}" \
 "{'execute': 'human-monitor-command', " \
 "'arguments': {'command-line': 'info qtree'}}" | \
 valgrind -q microblazeel-softmmu/qemu-system-microblazeel -M none,accel=qtest 
-qmp stdio
[...]
==13605== Invalid read of size 8
==13605==    at 0x2AC69A: qdev_print (qdev-monitor.c:686)
==13605==    by 0x2AC69A: qbus_print (qdev-monitor.c:719)
==13605==    by 0x2591E8: handle_hmp_command (monitor.c:3446)

Use the new object_initialize_child() and sysbus_init_child_obj() to
fix the issue.

Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 03a31776e8fb239fee98625dd83b85f5cbe3ccba
      
https://github.com/qemu/qemu/commit/03a31776e8fb239fee98625dd83b85f5cbe3ccba
  Author: Guenter Roeck <address@hidden>
  Date:   2018-07-23 (Mon, 23 Jul 2018)

  Changed paths:
    M hw/sd/bcm2835_sdhost.c

  Log Message:
  -----------
  hw/sd/bcm2835_sdhost: Fix PIO mode writes

Writes in PIO mode have two requirements:

- A data interrupt must be generated after a write command has been
  issued to indicate that the chip is ready to receive data.
- A block interrupt must be generated after each block to indicate
  that the chip is ready to receive the next data block.

Rearrange the code to make this happen. Tested on raspi3 (in PIO mode)
and raspi2 (in DMA mode).

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


  Commit: 9d2b5a58f85be2d8e129c4b53d6708ecf8796e54
      
https://github.com/qemu/qemu/commit/9d2b5a58f85be2d8e129c4b53d6708ecf8796e54
  Author: Peter Maydell <address@hidden>
  Date:   2018-07-23 (Mon, 23 Jul 2018)

  Changed paths:
    M target/arm/helper.c

  Log Message:
  -----------
  target/arm: Correctly handle overlapping small MPU regions

To correctly handle small (less than TARGET_PAGE_SIZE) MPU regions,
we must correctly handle the case where the address being looked
up hits in an MPU region that is not small but the address is
in the same page as a small region. For instance if MPU region
1 covers an entire page from 0x2000 to 0x2400 and MPU region
2 is small and covers only 0x2200 to 0x2280, then for an access
to 0x2000 we must not return a result covering the full page
even though we hit the page-sized region 1. Otherwise we will
then cache that result in the TLB and accesses that should
hit region 2 will incorrectly find the region 1 information.

Check for the case where we miss an MPU region but it is still
within the same page, and in that case narrow the size we will
pass to tlb_set_page_with_attrs() for whatever the final
outcome is of the MPU lookup.

Reported-by: Adithya Baglody <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden


  Commit: 07bc425ea32dc5d78790c7bd23bffb77fbc727e0
      
https://github.com/qemu/qemu/commit/07bc425ea32dc5d78790c7bd23bffb77fbc727e0
  Author: Thomas Huth <address@hidden>
  Date:   2018-07-23 (Mon, 23 Jul 2018)

  Changed paths:
    M hw/arm/spitz.c

  Log Message:
  -----------
  hw/arm/spitz: Move problematic nand_init() code to realize function

nand_init() does not only create the NAND device, it also realizes
the device with qdev_init_nofail() already. So we must not call
nand_init() from an instance_init function like sl_nand_init(),
otherwise we get superfluous NAND devices in the QOM tree after
introspecting the 'sl-nand' device. So move the nand_init() to the
realize function of 'sl-nand' instead.

Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 1ddc9b98c3cb89fe23a55ba924000fd645253e87
      
https://github.com/qemu/qemu/commit/1ddc9b98c3cb89fe23a55ba924000fd645253e87
  Author: Thomas Huth <address@hidden>
  Date:   2018-07-23 (Mon, 23 Jul 2018)

  Changed paths:
    M hw/intc/exynos4210_gic.c

  Log Message:
  -----------
  hw/intc/exynos4210_gic: Turn instance_init into realize function

The instance_init function of the "exynos4210.gic" device creates a
new "arm_gic" device and immediately realizes it with qdev_init_nofail().
This will leave a lot of object in the QOM tree during introspection of
the "exynos4210.gic" device, e.g. reproducible by starting QEMU like this:

qemu-system-aarch64 -M none -nodefaults -nographic -monitor stdio

And then by running "info qom-tree" at the HMP monitor, followed by
"device_add exynos4210.gic,help" and finally checking "info qom-tree"
again.

Also note that qdev_init_nofail() can exit QEMU in case of errors - and
this must never happen during an instance_init function, otherwise QEMU
could terminate unexpectedly during introspection of a device.

Since most of the code that follows the qdev_init_nofail() depends on
the realized "gicbusdev", the easiest solution to the problem is to
turn the whole instance_init function into a realize function instead.

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


  Commit: e596be90393389405c96a5c9534c4c4e2e0b5675
      
https://github.com/qemu/qemu/commit/e596be90393389405c96a5c9534c4c4e2e0b5675
  Author: Peter Maydell <address@hidden>
  Date:   2018-07-23 (Mon, 23 Jul 2018)

  Changed paths:
    M hw/arm/spitz.c
    M hw/intc/exynos4210_gic.c
    M hw/microblaze/xlnx-zynqmp-pmu.c
    M hw/sd/bcm2835_sdhost.c
    M target/arm/helper.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180723' 
into staging

target-arm queue:
 * spitz, exynos: fix bugs when introspecting some devices
 * hw/microblaze/xlnx-zynqmp-pmu: Fix introspection problem in 'xlnx, 
zynqmp-pmu-soc'
 * target/arm: Correctly handle overlapping small MPU regions
 * hw/sd/bcm2835_sdhost: Fix PIO mode writes

# gpg: Signature made Mon 23 Jul 2018 15:40:09 BST
# gpg:                using RSA key 3C2525ED14360CDE
# gpg: Good signature from "Peter Maydell <address@hidden>"
# gpg:                 aka "Peter Maydell <address@hidden>"
# gpg:                 aka "Peter Maydell <address@hidden>"
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20180723:
  hw/intc/exynos4210_gic: Turn instance_init into realize function
  hw/arm/spitz: Move problematic nand_init() code to realize function
  target/arm: Correctly handle overlapping small MPU regions
  hw/sd/bcm2835_sdhost: Fix PIO mode writes
  hw/microblaze/xlnx-zynqmp-pmu: Fix introspection problem in 'xlnx, 
zynqmp-pmu-soc'

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


Compare: https://github.com/qemu/qemu/compare/9ba7dd14355b...e596be903933
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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