1. 27 3月, 2018 3 次提交
  2. 26 3月, 2018 20 次提交
  3. 25 3月, 2018 3 次提交
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180323' into staging · 7b1db090
      Peter Maydell 提交于
      target-arm queue:
       * arm/translate-a64: don't lose interrupts after unmasking via write to DAIF
       * sdhci: fix incorrect use of Error *
       * hw/intc/arm_gicv3: Fix secure-GIC NS ICC_PMR and ICC_RPR accesses
       * hw/arm/bcm2836: Use the Cortex-A7 instead of Cortex-A15
       * i.MX: Support serial RS-232 break properly
       * mach-virt: Set VM's SMBIOS system version to mc->name
       * target/arm: Honour MDCR_EL2.TDE when routing exceptions due to BKPT/BRK
       * target/arm: Factor out code to calculate FSR for debug exceptions
       * target/arm: Set FSR for BKPT, BRK when raising exception
       * target/arm: Always set FAR to a known unknown value for debug exceptions
      
      # gpg: Signature made Fri 23 Mar 2018 18:48:57 GMT
      # gpg:                using RSA key 3C2525ED14360CDE
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20180323:
        target/arm: Always set FAR to a known unknown value for debug exceptions
        target/arm: Set FSR for BKPT, BRK when raising exception
        target/arm: Factor out code to calculate FSR for debug exceptions
        target/arm: Honour MDCR_EL2.TDE when routing exceptions due to BKPT/BRK
        mach-virt: Set VM's SMBIOS system version to mc->name
        i.MX: Support serial RS-232 break properly
        hw/arm/bcm2836: Use the Cortex-A7 instead of Cortex-A15
        hw/intc/arm_gicv3: Fix secure-GIC NS ICC_PMR and ICC_RPR accesses
        sdhci: fix incorrect use of Error *
        arm/translate-a64: treat DISAS_UPDATE as variant of DISAS_EXIT
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7b1db090
    • P
      Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180323a' into staging · 77fea92d
      Peter Maydell 提交于
      Migration fixes for 2.12
      
      All small fixes.  Dan's is a missing piece
      of a cleanup that finally completes something,
      and between Paolo, Dan and myself we recon it's
      still on the edge of being a bug fix.
      
      # gpg: Signature made Fri 23 Mar 2018 20:17:40 GMT
      # gpg:                using RSA key 0516331EBC5BFDE7
      # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
      # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7
      
      * remotes/dgilbert/tags/pull-migration-20180323a:
        migration: Fix block migration flag case
        migration/block: compare only read blocks against the rate limiter
        migration/block: limit the number of parallel I/O requests
        migration: Fix rate limiting issue on RDMA migration
        migration: convert socket server to QIONetListener
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      77fea92d
    • P
      Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging · ed4916e8
      Peter Maydell 提交于
      * fix PVRDMA compilation errors and warnings
      * implement query_qp for the PVRDMA device
      * fix make - switch from -I to -iquote
      
      # gpg: Signature made Fri 23 Mar 2018 15:39:23 GMT
      # gpg:                using RSA key 36D4C0F0CF2FE46D
      # gpg: Good signature from "Marcel Apfelbaum <marcel@redhat.com>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: B1C6 3A57 F92E 08F2 640F  31F5 36D4 C0F0 CF2F E46D
      
      * remotes/marcel/tags/rdma-pull-request:
        hw/rdma: Fix 32-bit compilation
        hw/rdma: Use correct print format in CHK_ATTR macro
        hw/rdma: Change host_virt to void *
        hw/rdma: fix clang compilation errors
        make: switch from -I to -iquote
        rdma: fix up include directives
        hw/rdma: Add support for Query QP verb to pvrdma device
        hw/rdma: Add Query QP operation
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ed4916e8
  4. 24 3月, 2018 14 次提交
    • P
      target/arm: Always set FAR to a known unknown value for debug exceptions · 548f514c
      Peter Maydell 提交于
      For debug exceptions due to breakpoints or the BKPT instruction which
      are taken to AArch32, the Fault Address Register is architecturally
      UNKNOWN.  We were using that as license to simply not set
      env->exception.vaddress, but this isn't correct, because it will
      expose to the guest whatever old value was in that field when
      arm_cpu_do_interrupt_aarch32() writes it to the guest IFSR.  That old
      value might be a FAR for a previous guest EL2 or secure exception, in
      which case we shouldn't show it to an EL1 or non-secure exception
      handler. It might also be a non-deterministic value, which is bad
      for record-and-replay.
      
      Clear env->exception.vaddress before taking breakpoint debug
      exceptions, to avoid this minor information leak.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180320134114.30418-5-peter.maydell@linaro.org
      548f514c
    • P
      target/arm: Set FSR for BKPT, BRK when raising exception · 62b94f31
      Peter Maydell 提交于
      Now that we have a helper function specifically for the BRK and
      BKPT instructions, we can set the exception.fsr there rather
      than in arm_cpu_do_interrupt_aarch32(). This allows us to
      use our new arm_debug_exception_fsr() helper.
      
      In particular this fixes a bug where we were hardcoding the
      short-form IFSR value, which is wrong if the target exception
      level has LPAE enabled.
      
      Fixes: https://bugs.launchpad.net/qemu/+bug/1756927Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180320134114.30418-4-peter.maydell@linaro.org
      62b94f31
    • P
      target/arm: Factor out code to calculate FSR for debug exceptions · 81621d9a
      Peter Maydell 提交于
      When a debug exception is taken to AArch32, it appears as a Prefetch
      Abort, and the Instruction Fault Status Register (IFSR) must be set.
      The IFSR has two possible formats, depending on whether LPAE is in
      use. Factor out the code in arm_debug_excp_handler() which picks
      an FSR value into its own utility function, update it to use
      arm_fi_to_lfsc() and arm_fi_to_sfsc() rather than hard-coded constants,
      and use the correct condition to select long or short format.
      
      In particular this fixes a bug where we could select the short
      format because we're at EL0 and the EL1 translation regime is
      not using LPAE, but then route the debug exception to EL2 because
      of MDCR_EL2.TDE and hand EL2 the wrong format FSR.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180320134114.30418-3-peter.maydell@linaro.org
      81621d9a
    • P
      target/arm: Honour MDCR_EL2.TDE when routing exceptions due to BKPT/BRK · c900a2e6
      Peter Maydell 提交于
      The MDCR_EL2.TDE bit allows the exception level targeted by debug
      exceptions to be set to EL2 for code executing at EL0.  We handle
      this in the arm_debug_target_el() function, but this is only used for
      hardware breakpoint and watchpoint exceptions, not for the exception
      generated when the guest executes an AArch32 BKPT or AArch64 BRK
      instruction.  We don't have enough information for a translate-time
      equivalent of arm_debug_target_el(), so instead make BKPT and BRK
      call a special purpose helper which can do the routing, rather than
      the generic exception_with_syndrome helper.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180320134114.30418-2-peter.maydell@linaro.org
      c900a2e6
    • W
      mach-virt: Set VM's SMBIOS system version to mc->name · dfadc3bf
      Wei Huang 提交于
      Instead of using "1.0" as the system version of SMBIOS, we should use
      mc->name for mach-virt machine type to be consistent other architectures.
      With this patch, "dmidecode -t 1" (e.g., "-M virt-2.12,accel=kvm") will
      show:
      
          Handle 0x0100, DMI type 1, 27 bytes
          System Information
                  Manufacturer: QEMU
                  Product Name: KVM Virtual Machine
                  Version: virt-2.12
                  Serial Number: Not Specified
                  ...
      
      instead of:
      
          Handle 0x0100, DMI type 1, 27 bytes
          System Information
                  Manufacturer: QEMU
                  Product Name: KVM Virtual Machine
                  Version: 1.0
                  Serial Number: Not Specified
                  ...
      
      For backward compatibility, we allow older machine types to keep "1.0"
      as the default system version.
      Signed-off-by: NWei Huang <wei@redhat.com>
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Message-id: 20180322212318.7182-1-wei@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      dfadc3bf
    • T
      i.MX: Support serial RS-232 break properly · 478a573a
      Trent Piepho 提交于
      Linux does not detect a break from this IMX serial driver as a magic
      sysrq.  Nor does it note a break in the port error counts.
      
      The former is because the Linux driver uses the BRCD bit in the USR2
      register to trigger the RS-232 break handler in the kernel, which is
      where sysrq hooks in.  The emulated UART was not setting this status
      bit.
      
      The latter is because the Linux driver expects, in addition to the BRK
      bit, that the ERR bit is set when a break is read in the FIFO.  A break
      should also count as a frame error, so add that bit too.
      
      Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
      Signed-off-by: NTrent Piepho <tpiepho@impinj.com>
      Message-id: 20180320013657.25038-1-tpiepho@impinj.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      478a573a
    • P
      hw/arm/bcm2836: Use the Cortex-A7 instead of Cortex-A15 · 2b0b9321
      Peter Maydell 提交于
      The BCM2836 uses a Cortex-A7, not a Cortex-A15. Update the device to
      use the correct CPU.
      https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/QA7_rev3.4.pdf
      
      When the BCM2836 was introduced (bad56236) the Cortex-A7 was not
      available, so the very similar Cortex-A15 was used. Since dcf578ed
      we can model the correct core.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlistair Francis <alistair@alistair23.me>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180319110215.16755-1-peter.maydell@linaro.org
      2b0b9321
    • P
      hw/intc/arm_gicv3: Fix secure-GIC NS ICC_PMR and ICC_RPR accesses · a2e2d7fc
      Peter Maydell 提交于
      If the GIC has the security extension support enabled, then a
      non-secure access to ICC_PMR must take account of the non-secure
      view of interrupt priorities, where real priorities 0x00..0x7f
      are secure-only and not visible to the non-secure guest, and
      priorities 0x80..0xff are shown to the guest as if they were
      0x00..0xff. We had the logic here wrong:
       * on reads, the priority is in the secure range if bit 7
         is clear, not if it is set
       * on writes, we want to set bit 7, not mask everything else
      
      Our ICC_RPR read code had the same error as ICC_PMR.
      
      (Compare the GICv3 spec pseudocode functions ICC_RPR_EL1
      and ICC_PMR_EL1.)
      
      Fixes: https://bugs.launchpad.net/qemu/+bug/1748434Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Message-id: 20180315133441.24149-1-peter.maydell@linaro.org
      a2e2d7fc
    • P
      sdhci: fix incorrect use of Error * · 544156ef
      Paolo Bonzini 提交于
      Detected by Coverity (CID 1386072, 1386073, 1386076, 1386077).  local_err
      was unused, and this made the static analyzer unhappy.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20180320151355.25854-1-pbonzini@redhat.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      544156ef
    • V
      arm/translate-a64: treat DISAS_UPDATE as variant of DISAS_EXIT · a75a52d6
      Victor Kamensky 提交于
      In OE project 4.15 linux kernel boot hang was observed under
      single cpu aarch64 qemu. Kernel code was in a loop waiting for
      vtimer arrival, spinning in TC generated blocks, while interrupt
      was pending unprocessed. This happened because when qemu tried to
      handle vtimer interrupt target had interrupts disabled, as
      result flag indicating TCG exit, cpu->icount_decr.u16.high,
      was cleared but arm_cpu_exec_interrupt function did not call
      arm_cpu_do_interrupt to process interrupt. Later when target
      reenabled interrupts, it happened without exit into main loop, so
      following code that waited for result of interrupt execution
      run in infinite loop.
      
      To solve the problem instructions that operate on CPU sys state
      (i.e enable/disable interrupt), and marked as DISAS_UPDATE,
      should be considered as DISAS_EXIT variant, and should be
      forced to exit back to main loop so qemu will have a chance
      processing pending CPU state updates, including pending
      interrupts.
      
      This change brings consistency with how DISAS_UPDATE is treated
      in aarch32 case.
      
      CC: Peter Maydell <peter.maydell@linaro.org>
      CC: Alex Bennée <alex.bennee@linaro.org>
      CC: qemu-stable@nongnu.org
      Suggested-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NVictor Kamensky <kamensky@cisco.com>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a75a52d6
    • D
      migration: Fix block migration flag case · 09576e74
      Dr. David Alan Gilbert 提交于
      Fix the case where when a migration with a bad protocol is tried,
      we leave the block migration capability set.
      
      (This is a cut down version of my 'migration: Fix block failure cases'
      where it's other case was fixed by Peter's dd0ee30c )
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20180316202114.32345-1-dgilbert@redhat.com>
      Reviewed-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      09576e74
    • P
      Merge remote-tracking branch 'remotes/ericb/tags/pull-qapi-2018-03-23' into staging · 66793daa
      Peter Maydell 提交于
      qapi patches for 2018-03-12, 2.12-rc1
      
      - Peter Xu: 0/4 Turn OOB off for 2.12-rc1, revert OOB tests
      - Eric Blake: qapi: Force UTF8 encoding when parsing qapi files
      
      # gpg: Signature made Fri 23 Mar 2018 17:35:49 GMT
      # gpg:                using RSA key A7A16B4A2527436A
      # gpg: Good signature from "Eric Blake <eblake@redhat.com>"
      # gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>"
      # gpg:                 aka "[jpeg image of size 6874]"
      # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A
      
      * remotes/ericb/tags/pull-qapi-2018-03-23:
        qapi: Force UTF8 encoding when parsing qapi files
        Revert "monitor: enable IO thread for (qmp & !mux) typed"
        Revert "tests: qmp-test: verify command batching"
        Revert "tests: qmp-test: add oob test"
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      66793daa
    • E
      qapi: Force UTF8 encoding when parsing qapi files · 39615354
      Eric Blake 提交于
      Commit d4e5ec87 already fixed things to work around Python 3's
      lame bug of having LC_ALL=C not be 8-bit clean, when parsing the
      main QMP qapi files; but failed to do likewise in the tests
      directory.  As a result, running 'LC_ALL=C make check' fails on
      escape-too-big and unicode-str when using python 3 with a nasty
      stack trace instead of the intended graceful error message that
      QAPI doesn't yet support 8-bit data (the two tests contain
      Unicode é, when parsed in UTF-8; they represent something
      different when parsed in a proper single-byte C locale, but that
      doesn't matter to the error message printed out, provided that
      brain-dead Python hasn't first choked on the input instead of
      being 8-bit clean).
      
      Ideally, we'd teach the qapi generator scripts to automatically
      slurp things in using UTF-8 regardless of locale, and to honor
      content that is not limited to 7 bit data rather than gracefully
      erroring out; but until then, since our graceful error depends
      on python parsing 8-bit data (even if nothing we generate uses
      8-bit data), our quick fix is to use the right locale when
      running these tests.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180319205040.1113423-1-eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      39615354
    • P
      Revert "monitor: enable IO thread for (qmp & !mux) typed" · a4f90923
      Peter Xu 提交于
      This reverts commit 3fd2457d.
      
      Enabling OOB caused several iotests failures; due to the imminent
      2.12 release, the safest action is to disable OOB for now.  If
      other patches fix the issues that iotests exposed, it may be turned
      back on in time for the release, otherwise it will be 2.13 material;
      either way, the framework changes not reverted now do not hurt if
      they remain as part of the 2.12 release.
      
      Additionally, revert the tests in the patch 02130314 ("qmp: introduce
      QMPCapability", 2018-03-19), as both parts must be reverted at once
      to keep 'make check' passing.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <20180323140821.28957-2-peterx@redhat.com>
      Tested-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      [eblake: reorder/squash commits, enhance commit message]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a4f90923