Skip to content
Snippets Groups Projects
  1. Oct 02, 2018
    • Emilio G. Cota's avatar
      util: add atomic64 · 782da5b2
      Emilio G. Cota authored
      
      This introduces read/set accessors for int64_t and uint64_t.
      
      Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
      Message-Id: <20180910232752.31565-3-cota@braap.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      782da5b2
    • Emilio G. Cota's avatar
      cacheinfo: add i/d cache_linesize_log · 5fe21034
      Emilio G. Cota authored
      
      Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
      Message-Id: <20180910232752.31565-2-cota@braap.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      5fe21034
    • Emilio G. Cota's avatar
      cpus: initialize timers_state.vm_clock_lock · 87a09cdc
      Emilio G. Cota authored
      
      We forgot to initialize the spinlock introduced in 94377115
      ("cpus: protect TimerState writes with a spinlock", 2018-08-23).
      Fix it.
      
      Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
      Message-Id: <20180903171831.15446-5-cota@braap.org>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      87a09cdc
    • Emilio G. Cota's avatar
      atomic: fix comment s/x64_64/x86_64/ · 119c440c
      Emilio G. Cota authored
      
      Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
      Message-Id: <20180903171831.15446-4-cota@braap.org>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      119c440c
    • Pavel Dovgaluk's avatar
      ps2: prevent changing irq state on save and load · a1f2ed2a
      Pavel Dovgaluk authored
      
      Commit 2858ab09 changed
      PS/2 keyboard/mouse buffers to the standard size. However, its state
      may change when migrating from the old buffer size and therefore irq needs
      updating. But this change made wrong, because it throws the whole queue
      if there are too much data instead of cropping it.
      
      That commit also updates irq (because the queue state may change).
      But updating the irq may change the VM state (and determinism of
      the execution). E.g., when replaying the execution, one may save
      the VM state and the state of the interrupt controller will be updated
      at the moment of saving, instead of using the recorded update events.
      
      This patch makes the queue update deterministic: it removes the update_irq
      call and crops the queue to prevent losing the characters and changing
      the required irq status.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
      Message-Id: <20180511081601.14610.39946.stgit@pasha-VirtualBox>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a1f2ed2a
    • Paolo Bonzini's avatar
      es1370: fix ADC_FRAMEADR and ADC_FRAMECNT · cf9270e5
      Paolo Bonzini authored
      
      They are not consecutive with DAC1_FRAME* and DAC2_FRAME*.
      
      Fixes: 154c1d1f
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cf9270e5
    • Paolo Bonzini's avatar
      qsp: hide indirect function calls from Coverity · 07d66672
      Paolo Bonzini authored
      
      Coverity does not see anymore that qemu_mutex_lock is taking a lock.
      Hide all the QSP magic so that static analysis works again.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      07d66672
    • Fam Zheng's avatar
      virtio: Return true from virtio_queue_empty if broken · 2d1df859
      Fam Zheng authored
      
      Both virtio-blk and virtio-scsi use virtio_queue_empty() as the
      loop condition in VQ handlers (virtio_blk_handle_vq,
      virtio_scsi_handle_cmd_vq). When a device is marked broken in
      virtqueue_pop, for example if a vIOMMU address translation failed, we
      want to break out of the loop.
      
      This fixes a hanging problem when booting a CentOS 3.10.0-862.el7.x86_64
      kernel with ATS enabled:
      
        $ qemu-system-x86_64 \
          ... \
          -device intel-iommu,intremap=on,caching-mode=on,eim=on,device-iotlb=on \
          -device virtio-scsi-pci,iommu_platform=on,ats=on,id=scsi0,bus=pci.4,addr=0x0
      
      The dead loop happens immediately when the kernel boots and initializes
      the device, where virtio_scsi_data_plane_handle_cmd will not return:
      
          > ...
          > #13 0x00005586602b7793 in virtio_scsi_handle_cmd_vq
          > #14 0x00005586602b8d66 in virtio_scsi_data_plane_handle_cmd
          > #15 0x00005586602ddab7 in virtio_queue_notify_aio_vq
          > #16 0x00005586602dfc9f in virtio_queue_host_notifier_aio_poll
          > #17 0x00005586607885da in run_poll_handlers_once
          > #18 0x000055866078880e in try_poll_mode
          > #19 0x00005586607888eb in aio_poll
          > #20 0x0000558660784561 in aio_wait_bh_oneshot
          > #21 0x00005586602b9582 in virtio_scsi_dataplane_stop
          > #22 0x00005586605a7110 in virtio_bus_stop_ioeventfd
          > #23 0x00005586605a9426 in virtio_pci_stop_ioeventfd
          > #24 0x00005586605ab808 in virtio_pci_common_write
          > #25 0x0000558660242396 in memory_region_write_accessor
          > #26 0x00005586602425ab in access_with_adjusted_size
          > #27 0x0000558660245281 in memory_region_dispatch_write
          > #28 0x00005586601e008e in flatview_write_continue
          > #29 0x00005586601e01d8 in flatview_write
          > #30 0x00005586601e04de in address_space_write
          > #31 0x00005586601e052f in address_space_rw
          > #32 0x00005586602607f2 in kvm_cpu_exec
          > #33 0x0000558660227148 in qemu_kvm_cpu_thread_fn
          > #34 0x000055866078bde7 in qemu_thread_start
          > #35 0x00007f5784906594 in start_thread
          > #36 0x00007f5784639e6f in clone
      
      With this patch, virtio_queue_empty will now return 1 as soon as the
      vdev is marked as broken, after a "virtio: zero sized buffers are not
      allowed" error.
      
      To be consistent, update virtio_queue_empty_rcu as well.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Message-Id: <20180910145616.8598-2-famz@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2d1df859
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/dgibson/tags/libfdt-20181002' into staging · 3892f1f1
      Peter Maydell authored
      
      Update dtc submodule to v1.4.7
      
      We have some upcoming things planned for ppc that will require some
      newer libfdt features.  In preparation, update the dtc/libfdt
      submodule to upstreasm version v1.4.7.
      
      # gpg: Signature made Tue 02 Oct 2018 05:23:43 BST
      # gpg:                using RSA key 6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/libfdt-20181002:
        Update dtc/libfdt submodule to v1.4.7
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      3892f1f1
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/xtensa/tags/20181001-xtensa' into staging · 8f09da69
      Peter Maydell authored
      
      target/xtensa: preparation for FLIX support
      
      Separate generation of per-instruction code (such as raising exceptions
      and terminating TB) from per-opcode code.
      
      # gpg: Signature made Mon 01 Oct 2018 19:14:34 BST
      # gpg:                using RSA key 51F9CC91F83FA044
      # gpg: Good signature from "Max Filippov <filippov@cadence.com>"
      # gpg:                 aka "Max Filippov <max.filippov@cogentembedded.com>"
      # gpg:                 aka "Max Filippov <jcmvbkbc@gmail.com>"
      # Primary key fingerprint: 2B67 854B 98E5 327D CDEB  17D8 51F9 CC91 F83F A044
      
      * remotes/xtensa/tags/20181001-xtensa:
        target/xtensa: extract gen_check_interrupts call
        target/xtensa: make rsr/wsr helpers return void
        target/xtensa: extract unconditional TB termination via slot 0
        target/xtensa: always end TB on CCOUNT access/CCOMPARE write
        target/xtensa: change SR number checks to assertions
        target/xtensa: extract unconditional TB termination
        target/xtensa: extract test for division by zero
        target/xtensa: extract test for cpdisabled exception
        target/xtensa: extract test for alloca exception
        target/xtensa: extract test for window underflow exception
        target/xtensa: extract test for window overflow exception
        target/xtensa: extract test for debug exception
        target/xtensa: extract test for syscall instruction
        target/xtensa: extract test for privileged instruction
        target/xtensa: extract test for an illegal instruction
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      8f09da69
    • David Gibson's avatar
      Update dtc/libfdt submodule to v1.4.7 · 0b001b30
      David Gibson authored
      
      dtc v1.4.7 contains a bunch of improvements to make libfdt safer against
      handling a corrupted or malicious tree, which is a good thing to have.  It
      also includes an explicit fdt checking function that we'll be wanting in
      future.
      
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      0b001b30
  2. Oct 01, 2018
Loading