Skip to content
Snippets Groups Projects
  1. Jun 26, 2020
  2. Jun 25, 2020
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/xtensa/tags/20200625-xtensa' into staging · 5acc270a
      Peter Maydell authored
      
      target/xtensa fixes for 5.1:
      
      - fix access to special registers missing in the core configuration;
      - fix simcall opcode behavior for new hardware;
      - drop gen_io_end call from xtensa translator.
      
      # gpg: Signature made Thu 25 Jun 2020 09:08:58 BST
      # gpg:                using RSA key 2B67854B98E5327DCDEB17D851F9CC91F83FA044
      # gpg:                issuer "jcmvbkbc@gmail.com"
      # gpg: Good signature from "Max Filippov <filippov@cadence.com>" [unknown]
      # gpg:                 aka "Max Filippov <max.filippov@cogentembedded.com>" [full]
      # gpg:                 aka "Max Filippov <jcmvbkbc@gmail.com>" [full]
      # Primary key fingerprint: 2B67 854B 98E5 327D CDEB  17D8 51F9 CC91 F83F A044
      
      * remotes/xtensa/tags/20200625-xtensa:
        target/xtensa: drop gen_io_end call
        target/xtensa: fix simcall for newer hardware
        target/xtensa: fetch HW version from configuration overlay
        target/xtensa: work around missing SR definitions
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      5acc270a
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging · 63d21199
      Peter Maydell authored
      
      virtio,acpi,pci: fixes, cleanups.
      
      Fixes, cleanups in ACPI, PCI, virtio.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Thu 25 Jun 2020 07:48:47 BST
      # gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
      # gpg:                issuer "mst@redhat.com"
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
      # 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
      
      * remotes/mst/tags/for_upstream:
        Rename use_acpi_pci_hotplug to more appropriate use_acpi_hotplug_bridge
        Stop vhost-user sending uninitialized mmap_offsets
        docs/specs/tpm: ACPI boot now supported for TPM/ARM
        arm/acpi: Add the TPM2.0 device under the DSDT
        acpi: Some build_tpm2() code reshape
        tests/acpi: update expected data files
        acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.
        acpi: drop build_piix4_pm()
        acpi: drop serial/parallel enable bits from dsdt
        acpi: simplify build_isa_devices_aml()
        acpi: factor out fw_cfg_add_acpi_dsdt()
        acpi: move aml builder code for i8042 (kbd+mouse) device
        floppy: move cmos_get_fd_drive_type() from pc
        floppy: make isa_fdc_get_drive_max_chs static
        acpi: move aml builder code for floppy device
        acpi: bios-tables-test: show more context on asl diffs
        qtest: allow DSDT acpi table changes
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      63d21199
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging · beafab86
      Peter Maydell authored
      
      Pull request
      
      # gpg: Signature made Wed 24 Jun 2020 11:25:27 BST
      # gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/tracing-pull-request:
        trace/simple: Fix unauthorized enable
        scripts/tracetool: Update maintainer email address
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      beafab86
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/armbru/tags/pull-qdev-2020-06-23' into staging · 0250c595
      Peter Maydell authored
      
      Qdev patches for 2020-06-23
      
      # gpg: Signature made Tue 23 Jun 2020 15:08:28 BST
      # gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
      # gpg:                issuer "armbru@redhat.com"
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * remotes/armbru/tags/pull-qdev-2020-06-23:
        sd/milkymist-memcard: Fix error API violation
        sd/pxa2xx_mmci: Don't crash on pxa2xx_mmci_init() error
        arm/aspeed: Drop aspeed_board_init_flashes() parameter @errp
        qdev: Make qdev_prop_set_drive() match the other helpers
        qdev: Reject chardev property override
        qdev: Reject drive property override
        qdev: Improve netdev property override error a bit
        qdev: Eliminate get_pointer(), set_pointer()
        blockdev: Deprecate -drive with bogus interface type
        docs/qdev-device-use.txt: Update section "Default Devices"
        fdc: Deprecate configuring floppies with -global isa-fdc
        fdc: Open-code fdctrl_init_isa()
        fdc: Reject clash between -drive if=floppy and -global isa-fdc
        iotests/172: Cover -global floppy.drive=...
        iotests/172: Cover empty filename and multiple use of drives
        iotests/172: Include "info block" in test output
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      0250c595
  3. Jun 24, 2020
  4. Jun 23, 2020
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200623' into staging · d4b78317
      Peter Maydell authored
      
      target-arm queue:
       * util/oslib-posix : qemu_init_exec_dir implementation for Mac
       * target/arm: Last parts of neon decodetree conversion
       * hw/arm/virt: Add 5.0 HW compat props
       * hw/watchdog/cmsdk-apb-watchdog: Add trace event for lock status
       * mps2: Add CMSDK APB watchdog, FPGAIO block, S2I devices and I2C devices
       * mps2: Add some unimplemented-device stubs for audio and GPIO
       * mps2-tz: Use the ARM SBCon two-wire serial bus interface
       * target/arm: Check supported KVM features globally (not per vCPU)
       * tests/qtest/arm-cpu-features: Add feature setting tests
       * arm/virt: Add memory hot remove support
      
      # gpg: Signature made Tue 23 Jun 2020 12:38:31 BST
      # gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
      # gpg:                issuer "peter.maydell@linaro.org"
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20200623: (42 commits)
        arm/virt: Add memory hot remove support
        tests/qtest/arm-cpu-features: Add feature setting tests
        target/arm: Check supported KVM features globally (not per vCPU)
        hw/arm/mps2-tz: Use the ARM SBCon two-wire serial bus interface
        hw/arm/mps2: Add audio I2S interface as unimplemented device
        hw/arm/mps2: Add I2C devices
        hw/arm/mps2: Add SPI devices
        hw/arm/mps2: Map the FPGA I/O block
        hw/arm/mps2: Add CMSDK AHB GPIO peripherals as unimplemented devices
        hw/arm/mps2: Add CMSDK APB watchdog device
        hw/arm/mps2: Rename CMSDK AHB peripheral region
        hw/arm/mps2: Document CMSDK/FPGA APB subsystem sections
        hw/arm: Use TYPE_VERSATILE_I2C instead of hardcoded string
        hw/i2c: Add header for ARM SBCon two-wire serial bus interface
        hw/i2c/versatile_i2c: Add SCL/SDA definitions
        hw/i2c/versatile_i2c: Add definitions for register addresses
        hw/watchdog/cmsdk-apb-watchdog: Add trace event for lock status
        target/arm: Remove dead code relating to SABA and UABA
        target/arm: Remove unnecessary gen_io_end() calls
        target/arm: Move some functions used only in translate-neon.inc.c to that file
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      d4b78317
    • Markus Armbruster's avatar
      sd/milkymist-memcard: Fix error API violation · 953cd661
      Markus Armbruster authored
      
      The Error ** argument must be NULL, &error_abort, &error_fatal, or a
      pointer to a variable containing NULL.  Passing an argument of the
      latter kind twice without clearing it in between is wrong: if the
      first call sets an error, it no longer points to NULL for the second
      call.
      
      milkymist_memcard_realize() is wrong that way: it passes &err to
      qdev_prop_set_drive_err() and qdev_realize_and_unref().  Currently
      harmless, because the latter uses it only as first argument of
      error_propagate().
      
      Making qdev_prop_set_drive_err() fail involves abuse of -global.
      Leave handling that to qdev_prop_set_drive(), like we do elsewhere.
      
      Cc: Michael Walle <michael@walle.cc>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20200622094227.1271650-17-armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      953cd661
    • Markus Armbruster's avatar
      sd/pxa2xx_mmci: Don't crash on pxa2xx_mmci_init() error · 17d26ac6
      Markus Armbruster authored
      
      On error, pxa2xx_mmci_init() reports to stderr and returns NULL.
      Callers don't check for errors.  Machines akita, borzoi, mainstone,
      spitz, terrier, tosa, and z2 crash shortly after, like this:
      
          $ qemu-system-aarch64 -M akita -drive if=sd,readonly=on
          qemu-system-aarch64: failed to init SD card: Cannot use read-only drive as SD card
          Segmentation fault (core dumped)
      
      Machines connex and verdex reach the check for orphaned drives first:
      
          $ aarch64-softmmu/qemu-system-aarch64 -M connex -drive if=sd,readonly=on -accel qtest
          qemu-system-aarch64: failed to init SD card: Cannot use read-only drive as SD card
          qemu-system-aarch64: -drive if=sd,readonly=on: machine type does not support if=sd,bus=0,unit=0
      
      Make pxa2xx_mmci_init() fail cleanly right away.
      
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: qemu-arm@nongnu.org
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20200622094227.1271650-16-armbru@redhat.com>
      17d26ac6
    • Markus Armbruster's avatar
      arm/aspeed: Drop aspeed_board_init_flashes() parameter @errp · c20b4ccc
      Markus Armbruster authored
      
      We always pass &error_abort.  Drop the parameter, use &error_abort
      directly.
      
      Cc: Cédric Le Goater <clg@kaod.org>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Andrew Jeffery <andrew@aj.id.au>
      Cc: Joel Stanley <joel@jms.id.au>
      Cc: qemu-arm@nongnu.org
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20200622094227.1271650-15-armbru@redhat.com>
      c20b4ccc
    • Markus Armbruster's avatar
      qdev: Make qdev_prop_set_drive() match the other helpers · 934df912
      Markus Armbruster authored
      
      qdev_prop_set_drive() can fail.  None of the other qdev_prop_set_FOO()
      can; they abort on error.
      
      To clean up this inconsistency, rename qdev_prop_set_drive() to
      qdev_prop_set_drive_err(), and create a qdev_prop_set_drive() that
      aborts on error.
      
      Coccinelle script to update callers:
      
          @ depends on !(file in "hw/core/qdev-properties-system.c")@
          expression dev, name, value;
          symbol error_abort;
          @@
          -    qdev_prop_set_drive(dev, name, value, &error_abort);
          +    qdev_prop_set_drive(dev, name, value);
      
          @@
          expression dev, name, value, errp;
          @@
          -    qdev_prop_set_drive(dev, name, value, errp);
          +    qdev_prop_set_drive_err(dev, name, value, errp);
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20200622094227.1271650-14-armbru@redhat.com>
      934df912
    • Markus Armbruster's avatar
      qdev: Reject chardev property override · 9572a787
      Markus Armbruster authored
      
      qdev_prop_set_chr() screws up when the property already has a non-null
      value: it neglects to release the old value.  Both the old and the new
      backend become attached to the same device.  Unlike for block devices
      (see previous commit), this can't be observed from the monitor (I
      think).
      
      Example: -serial null -chardev null,id=chr0 -global isa-serial.chardev=chr0
      
      Special case: attempting to use the same backend both times crashes:
      
          $ qemu-system-x86_64 --nodefaults -serial null -global isa-serial.chardev=serial0
          Unexpected error in qemu_chr_fe_init() at /work/armbru/qemu/chardev/char-fe.c:220:
          qemu-system-x86_64: Device 'serial0' is in use
          Aborted (core dumped)
      
      Yet another example: -device with multiple chardev=... (but not
      device_add, which silently drops all but the last duplicate property).
      
      Perhaps chardev property override could be made to work.  Perhaps it
      should.  I can't afford the time to figure this out now.  What I can
      do reject usage that leaves backends in unhealthy states.  For what
      it's worth, we've long done the same for netdev properties.
      
      Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20200622094227.1271650-13-armbru@redhat.com>
      9572a787
    • Markus Armbruster's avatar
      qdev: Reject drive property override · 84b0475c
      Markus Armbruster authored
      
      qdev_prop_set_drive() screws up when the property already has a
      non-null value: it neglects to release the old value.  Both the old
      and the new backend become attached to the same device.
      
      Example (taken from iotest 172): -fda ... -drive if=none,... -global
      floppy.drive=none0.
      
      Special case: attempting to use the same backend both times fails.
      Example (also from iotest 172): -fda ... -global floppy.drive=floppy0.
      
      Yet another example: -device with multiple drive=... (but not
      device_add, which silently drops all but the last duplicate property).
      
      Perhaps drive property override could be made to work.  Perhaps it
      should.  I can't afford the time to figure this out now.  What I can
      do is reject usage that leaves backends in unhealthy states.  For what
      it's worth, we've long done the same for netdev properties.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20200622094227.1271650-12-armbru@redhat.com>
      84b0475c
    • Markus Armbruster's avatar
      qdev: Improve netdev property override error a bit · 1bc13336
      Markus Armbruster authored
      
      qdev_prop_set_netdev() fails when the property already has a non-null
      value.  Seems to go back to commit 30c367ed
      "qdev-properties-system.c: Allow vlan or netdev for -device, not
      both", v1.7.0.  Board code doesn't expect failure, and crashes:
      
          $ qemu-system-x86_64 --nodefaults -nic user -netdev user,id=nic0 -global e1000.netdev=nic0
          Unexpected error in error_set_from_qdev_prop_error() at /work/armbru/qemu/hw/core/qdev-properties.c:1101:
          qemu-system-x86_64: Property 'e1000.netdev' doesn't take value '__org.qemu.nic0
          '
          Aborted (core dumped)
      
      -device and device_add handle the failure:
      
          $ qemu-system-x86_64 -nodefaults -netdev user,id=net0 -netdev user,id=net1 -device e1000,netdev=net0,netdev=net1
          qemu-system-x86_64: -device e1000,netdev=net0,netdev=net1: Property 'e1000.netdev' doesn't take value 'net1'
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -netdev user,id=net0 -netdev user,id=net1 -global e1000.netdev=net0
          QEMU 5.0.50 monitor - type 'help' for more information
          (qemu) qemu-system-x86_64: warning: netdev net0 has no peer
          qemu-system-x86_64: warning: netdev net1 has no peer
          device_add e1000,netdev=net1
          Error: Property 'e1000.netdev' doesn't take value 'net1'
      
      Perhaps netdev property override could be made to work.  Perhaps it
      should.  I'm not the right guy to figure this out.  What I can do is
      improve the error message a bit:
      
          (qemu) device_add e1000,netdev=net1
          Error: -global e1000.netdev=... conflicts with netdev=net1
      
      Cc: Jason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20200622094227.1271650-11-armbru@redhat.com>
      1bc13336
Loading