1. 23 6月, 2020 5 次提交
    • M
      fdc: Reject clash between -drive if=floppy and -global isa-fdc · 6172e067
      Markus Armbruster 提交于
      The floppy controller devices desugar their drive properties into
      floppy devices (since commit a92bd191 "fdc: Move qdev properties to
      FloppyDrive", v2.8.0).  This involves some bad magic in
      fdctrl_connect_drives(), and exists for backward compatibility.
      
      The functions for boards to create floppy controller devices
      fdctrl_init_isa(), fdctrl_init_sysbus(), and sun4m_fdctrl_init()
      desugar -drive if=floppy to these floppy controller drive properties.
      
      If you use both -drive if=floppy (or its -fda / -fdb sugar) and
      -global isa-fdc for the same floppy device, -global silently loses the
      conflict, and both backends involved end up with the floppy device
      frontend attached, as demonstrated by iotest 172 (see commit before
      previous).  This is wrong.
      
      Desugar -drive if=floppy straight to floppy devices instead, with
      helper fdctrl_init_drives().  The conflict now gets rejected cleanly:
      first, fdctrl_connect_drives() creates the floppy for the controller's
      property, then fdctrl_init_drives() attempts to create the floppy for
      -drive if=floppy, but fails because the unit is already in use.
      
      Output of iotest 172 changes in three ways:
      
      1. The clash gets rejected.
      
      2. In one test case, "info qtree" has the floppy devices swapped, and
         "info block" has their QOM paths swapped.  This is because the
         floppy device for -fda now gets created after the one for -global
         isa-fdc.driveB.
      
      3. The error message for -global floppy.drive=floppy0 changes.  Before
         the patch, we set isa-fdc.driveA to -fda's block backend, then
         create the floppy device for it, then move the backend from
         isa-fdc.driveA to floppy.drive.  Floppy creation fails when
         applying -global floppy.drive=floppy0, because floppy0 is still
         attached to isa-fdc.  After the patch, we create the floppy for
         -fda, then set its drive property to floppy0.  Now floppy creation
         succeeds, but setting the drive property fails, because -global
         already set it.  Yes, this is exasperatingly complicated.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20200622094227.1271650-5-armbru@redhat.com>
      6172e067
    • M
      iotests/172: Cover -global floppy.drive=... · 02b83f7d
      Markus Armbruster 提交于
      Use of -global to set a default backend for non-singleton devices is a
      bad idea.  But as long as we permit it, we better test it.
      
      Test output demonstrates we screw up when -global floppy clashes with
      -fda or with -device floppy: according to "info qtree", only the
      latter backend is attached, but according to "info block", both are.
      Here's the clash with -device:
      
          Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global floppy.drive=none0 -device floppy,drive=none1,unit=0
      
                    dev: isa-fdc, id ""
                      [...]
                      driveA = ""
                      driveB = ""
                      [...]
                      bus: floppy-bus.0
                        type floppy-bus
                        dev: floppy, id ""
                          unit = 0 (0x0)
      --->                drive = "none1"
          [...]
          none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
      --->    Attached to:      /machine/peripheral-anon/device[0]
              Cache mode:       writeback
      
          none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
      --->    Attached to:      /machine/peripheral-anon/device[0]
              Removable device: not locked, tray closed
              Cache mode:       writeback
      
      /machine/peripheral-anon/device[0] is the floppy created with -device.
      
      Test output further demonstrates the "Drive 'FOO' is already in use
      because it has been automatically connected to another device" error
      message can be misleading.  With '-fda "" -global
      floppy.drive=floppy0', it's in use because -global reuses -fda's
      backend.  There is no other device involved.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20200622094227.1271650-4-armbru@redhat.com>
      02b83f7d
    • M
      iotests/172: Cover empty filename and multiple use of drives · 20171739
      Markus Armbruster 提交于
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20200622094227.1271650-3-armbru@redhat.com>
      20171739
    • M
      iotests/172: Include "info block" in test output · 6a1a6433
      Markus Armbruster 提交于
      The additional output demonstrates we screw up when -global isa-fdc
      clashes with -drive if=floppy or its sugared forms: according to "info
      qtree", only the latter backend is attached, but according to "info
      block", both are.  For instance:
      
          Testing: -fda TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=none0
      
      	      dev: isa-fdc, id ""
      	        [...]
      		driveA = ""
      		driveB = ""
                      [...]
                      bus: floppy-bus.0
                        type floppy-bus
                        dev: floppy, id ""
                          unit = 0 (0x0)
      --->                drive = "floppy0"
          [...]
          floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
      --->    Attached to:      /machine/unattached/device[15]
              Removable device: not locked, tray closed
              Cache mode:       writeback
      
          none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
      --->    Attached to:      /machine/unattached/device[14]
              Cache mode:       writeback
      
      /machine/unattached/device[15] is floppy, and
      /machine/unattached/device[14] is isa-fdc.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20200622094227.1271650-2-armbru@redhat.com>
      6a1a6433
    • P
      Merge remote-tracking branch 'remotes/philmd-gitlab/tags/acceptance-testing-20200622' into staging · 61fee7f4
      Peter Maydell 提交于
      Acceptance tests patches
      
      - List acceptance test reviewers in MAINTAINERS
      - Record/Replay tests from Pavel Dovgalyuk
      
      Example of use:
      
      $ avocado --show=app,replay run -t machine:vexpress-a9 tests/acceptance/replay_kernel.py
      Fetching asset from tests/acceptance/replay_kernel.py:ReplayKernel.test_arm_vexpressa9
       (1/1) tests/acceptance/replay_kernel.py:ReplayKernel.test_arm_vexpressa9:
      replay: recording the execution...
      replay: finished the recording with log size 204784 bytes
      replay: elapsed time 6.44 sec
      replay: replaying the execution...
      replay: successfully finished the replay
      replay: elapsed time 7.97 sec
      replay: replay overhead 23.86%
      PASS (14.67 s)
      
      Travis-CI:
      https://travis-ci.org/github/philmd/qemu/jobs/700787719
      
      # gpg: Signature made Mon 22 Jun 2020 09:58:13 BST
      # gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
      # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
      # Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE
      
      * remotes/philmd-gitlab/tags/acceptance-testing-20200622:
        tests/acceptance: record/replay tests with advcal images
        tests/acceptance: add record/replay test for m68k
        tests/acceptance: add record/replay test for ppc64
        tests/acceptance: add record/replay test for arm
        tests/acceptance: add record/replay test for aarch64
        tests/acceptance: add kernel record/replay test for x86_64
        tests/acceptance: add base class record/replay kernel tests
        MAINTAINERS: Add an entry to review Avocado based acceptance tests
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      61fee7f4
  2. 22 6月, 2020 1 次提交
    • P
      Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20200619-3' into staging · 171199f5
      Peter Maydell 提交于
      This is a range of patches for RISC-V.
      
      Some key points are:
       - Generalise the CPU init functions
       - Support the SiFive revB machine
       - Improvements to the Hypervisor implementation and error checking
       - Connect some OpenTitan devices
       - Changes to the sifive_u machine to support U-boot
      
      v2:
       - Fix missing realise assert
      
      # gpg: Signature made Fri 19 Jun 2020 17:34:34 BST
      # gpg:                using RSA key F6C4AC46D4934868D3B8CE8F21E10D29DF977054
      # gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [full]
      # Primary key fingerprint: F6C4 AC46 D493 4868 D3B8  CE8F 21E1 0D29 DF97 7054
      
      * remotes/alistair/tags/pull-riscv-to-apply-20200619-3: (32 commits)
        hw/riscv: sifive_u: Add a dummy DDR memory controller device
        hw/riscv: sifive_u: Sort the SoC memmap table entries
        hw/riscv: sifive_u: Support different boot source per MSEL pin state
        hw/riscv: sifive: Change SiFive E/U CPU reset vector to 0x1004
        target/riscv: Rename IBEX CPU init routine
        hw/riscv: sifive_u: Add a new property msel for MSEL pin state
        hw/riscv: sifive_u: Rename serial property get/set functions to a generic name
        hw/riscv: sifive_u: Add reset functionality
        hw/riscv: sifive_gpio: Do not blindly trigger output IRQs
        hw/riscv: sifive_u: Hook a GPIO controller
        hw/riscv: sifive_gpio: Add a new 'ngpio' property
        hw/riscv: sifive_gpio: Clean up the codes
        hw/riscv: sifive_u: Generate device tree node for OTP
        hw/riscv: sifive_u: Simplify the GEM IRQ connect code a little bit
        hw/riscv: opentitan: Remove the riscv_ prefix of the machine* and soc* functions
        hw/riscv: sifive_e: Remove the riscv_ prefix of the machine* and soc* functions
        target/riscv: Use a smaller guess size for no-MMU PMP
        riscv/opentitan: Connect the UART device
        riscv/opentitan: Connect the PLIC device
        hw/intc: Initial commit of lowRISC Ibex PLIC
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      171199f5
  3. 21 6月, 2020 8 次提交
  4. 20 6月, 2020 2 次提交
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/audio-20200619-pull-request' into staging · bae31bfa
      Peter Maydell 提交于
      audio: bugfixes for jack backend and gus emulation.
      
      # gpg: Signature made Fri 19 Jun 2020 14:17:22 BST
      # gpg:                using RSA key 4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/audio-20200619-pull-request:
        hw/audio/gus: Fix registers 32-bit access
        audio/jack: simplify the re-init code path
        audio/jack: honour the enable state of the audio device
        audio/jack: do not remove ports when finishing
        audio/jack: remove invalid set of input support bool
        audio/jack: remove unused stopped state
        audio/jack: fix invalid minimum buffer size check
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      bae31bfa
    • R
      qht: Fix threshold rate calculation · 06c4cc36
      Richard Henderson 提交于
      tests/qht-bench.c:287:29: error: implicit conversion from 'unsigned long'
        to 'double' changes value from 18446744073709551615
        to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
              *threshold = rate * UINT64_MAX;
                                ~ ^~~~~~~~~~
      
      Fix this by splitting the 64-bit constant into two halves,
      each of which is individually perfectly representable, the
      sum of which produces the correct arithmetic result.
      
      This is very likely just a sticking plaster over some underlying
      incorrect code, but it will suppress the warning for the moment.
      
      Cc: Emilio G. Cota <cota@braap.org>
      Reported-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      06c4cc36
  5. 19 6月, 2020 24 次提交