Skip to content
Snippets Groups Projects
  1. Jul 29, 2019
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.1-20190728' into staging · 08831f67
      Peter Maydell authored
      
      ppc patch queue (for 4.1) 2019-07-28
      
      Here's a pull request for qemu-4.1, which I hope will be the last from
      the ppc tree.  This applies a couple of last minute fixes for the XIVE
      code.
      
      # gpg: Signature made Sun 28 Jul 2019 07:42:11 BST
      # gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-4.1-20190728:
        xics/kvm: Fix fallback to emulated XICS
        spapr/irq: Inform the user when falling back to emulated IC
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      08831f67
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.1-rc3' into staging · 5132f6ea
      Peter Maydell authored
      
      RISC-V Patch for 4.1-rc3
      
      This contains a single patch that fixes the warning introduced as part
      of the OpenSBI integration.
      
      # gpg: Signature made Sat 27 Jul 2019 00:04:19 BST
      # gpg:                using RSA key 00CE76D1834960DFCE886DF8EF4CA1502CCBAB41
      # gpg:                issuer "palmer@dabbelt.com"
      # gpg: Good signature from "Palmer Dabbelt <palmer@dabbelt.com>" [unknown]
      # gpg:                 aka "Palmer Dabbelt <palmer@sifive.com>" [unknown]
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 00CE 76D1 8349 60DF CE88  6DF8 EF4C A150 2CCB AB41
      
      * remotes/palmer/tags/riscv-for-master-4.1-rc3:
        riscv/boot: Fixup the RISC-V firmware warning
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      5132f6ea
  2. Jul 28, 2019
    • Greg Kurz's avatar
      xics/kvm: Fix fallback to emulated XICS · 8d216d8c
      Greg Kurz authored
      
      Commit 4812f261 tried to fix rollback path of xics_kvm_connect() but
      it isn't enough. If we fail to create the KVM device, the guest fails
      to boot later on with:
      
      [    0.010817] pci 0000:00:00.0: Adding to iommu group 0
      [    0.010863] irq: unknown-1 didn't like hwirq-0x1200 to VIRQ17 mapping (rc=-22)
      [    0.010923] pci 0000:00:01.0: Adding to iommu group 0
      [    0.010968] irq: unknown-1 didn't like hwirq-0x1201 to VIRQ17 mapping (rc=-22)
      [    0.011543] EEH: No capable adapters found
      [    0.011597] irq: unknown-1 didn't like hwirq-0x1000 to VIRQ17 mapping (rc=-22)
      [    0.011651] audit: type=2000 audit(1563977526.000:1): state=initialized audit_enabled=0 res=1
      [    0.011703] ------------[ cut here ]------------
      [    0.011729] event-sources: Unable to allocate interrupt number for /event-sources/epow-events
      [    0.011776] WARNING: CPU: 0 PID: 1 at arch/powerpc/platforms/pseries/event_sources.c:34 request_event_sources_irqs+0xbc/0x150
      [    0.011828] Modules linked in:
      [    0.011850] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.1.17-300.fc30.ppc64le #1
      [    0.011886] NIP:  c0000000000d4fac LR: c0000000000d4fa8 CTR: c0000000018f0000
      [    0.011923] REGS: c00000001e4c38d0 TRAP: 0700   Not tainted  (5.1.17-300.fc30.ppc64le)
      [    0.011966] MSR:  8000000002029033 <SF,VEC,EE,ME,IR,DR,RI,LE>  CR: 28000284  XER: 20040000
      [    0.012012] CFAR: c00000000011b42c IRQMASK: 0
      [    0.012012] GPR00: c0000000000d4fa8 c00000001e4c3b60 c0000000015fc400 0000000000000051
      [    0.012012] GPR04: 0000000000000001 0000000000000000 0000000000000081 772d6576656e7473
      [    0.012012] GPR08: 000000001edf0000 c0000000014d4830 c0000000014d4830 6e6576652f20726f
      [    0.012012] GPR12: 0000000000000000 c0000000018f0000 c000000000010bf0 0000000000000000
      [    0.012012] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      [    0.012012] GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      [    0.012012] GPR24: 0000000000000000 0000000000000000 c000000000ebbf00 c0000000000d5570
      [    0.012012] GPR28: c000000000ebc008 c00000001fff8248 0000000000000000 0000000000000000
      [    0.012372] NIP [c0000000000d4fac] request_event_sources_irqs+0xbc/0x150
      [    0.012409] LR [c0000000000d4fa8] request_event_sources_irqs+0xb8/0x150
      [    0.012445] Call Trace:
      [    0.012462] [c00000001e4c3b60] [c0000000000d4fa8] request_event_sources_irqs+0xb8/0x150 (unreliable)
      [    0.012513] [c00000001e4c3bf0] [c000000001042848] __machine_initcall_pseries_init_ras_IRQ+0xc8/0xf8
      [    0.012563] [c00000001e4c3c20] [c000000000010810] do_one_initcall+0x60/0x254
      [    0.012611] [c00000001e4c3cf0] [c000000001024538] kernel_init_freeable+0x35c/0x444
      [    0.012655] [c00000001e4c3db0] [c000000000010c14] kernel_init+0x2c/0x148
      [    0.012693] [c00000001e4c3e20] [c00000000000bdc4] ret_from_kernel_thread+0x5c/0x78
      [    0.012736] Instruction dump:
      [    0.012759] 38a00000 7c7f1b78 7f64db78 2c1f0000 2fbf0000 78630020 4180002c 409effa8
      [    0.012805] 7fa4eb78 7f43d378 48046421 60000000 <0fe00000> 3bde0001 2c1e0010 7fde07b4
      [    0.012851] ---[ end trace aa5785707323fad3 ]---
      
      This happens because QEMU fell back on XICS emulation but didn't unregister
      the RTAS calls from KVM. The emulated RTAS calls are hence never called and
      the KVM ones return an error to the guest since the KVM device is absent.
      
      The sanity checks in xics_kvm_disconnect() are abusive since we're freeing
      the KVM device. Simply drop them.
      
      Fixes: 4812f261 "xics/kvm: Add proper rollback to xics_kvm_init()"
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      Message-Id: <156398744035.546975.7029414194633598474.stgit@bahia.lan>
      Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      8d216d8c
    • Greg Kurz's avatar
      spapr/irq: Inform the user when falling back to emulated IC · f5bda010
      Greg Kurz authored
      
      Just to give an indication to the user that the error condition is
      handled and how.
      
      Reported-by: default avatarSatheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      Message-Id: <156398743479.546975.14566809803480887488.stgit@bahia.lan>
      Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      f5bda010
  3. Jul 26, 2019
  4. Jul 25, 2019
  5. Jul 24, 2019
    • Ivan Ren's avatar
      migration: fix migrate_cancel multifd migration leads destination hung forever · f193bc0c
      Ivan Ren authored
      
      When migrate_cancel a multifd migration, if run sequence like this:
      
              [source]                              [destination]
      
      multifd_send_sync_main[finish]
                                          multifd_recv_thread wait &p->sem_sync
      shutdown to_dst_file
                                          detect error from_src_file
      send  RAM_SAVE_FLAG_EOS[fail]       [no chance to run multifd_recv_sync_main]
                                          multifd_load_cleanup
                                          join multifd receive thread forever
      
      will lead destination qemu hung at following stack:
      
      pthread_join
      qemu_thread_join
      multifd_load_cleanup
      process_incoming_migration_co
      coroutine_trampoline
      
      Signed-off-by: default avatarIvan Ren <ivanren@tencent.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-Id: <1561468699-9819-4-git-send-email-ivanren@tencent.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      f193bc0c
    • Juan Quintela's avatar
      migration: Make explicit that we are quitting multifd · 3c3ca25d
      Juan Quintela authored
      
      We add a bool to indicate that.
      
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      3c3ca25d
    • Ivan Ren's avatar
      migration: fix migrate_cancel leads live_migration thread hung forever · a3ec6b7d
      Ivan Ren authored
      
      When we 'migrate_cancel' a multifd migration, live_migration thread may
      hung forever at some points, because of multifd_send_thread has already
      exit for socket error:
      1. multifd_send_pages may hung at qemu_sem_wait(&multifd_send_state->
         channels_ready)
      2. multifd_send_sync_main my hung at qemu_sem_wait(&multifd_send_state->
         sem_sync)
      
      Signed-off-by: default avatarIvan Ren <ivanren@tencent.com>
      Message-Id: <1561468699-9819-3-git-send-email-ivanren@tencent.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      
      ---
      
      Remove spurious not needed bits
      a3ec6b7d
    • Ivan Ren's avatar
      migration: fix migrate_cancel leads live_migration thread endless loop · 713f762a
      Ivan Ren authored
      
      When we 'migrate_cancel' a multifd migration, live_migration thread may
      go into endless loop in multifd_send_pages functions.
      
      Reproduce steps:
      
      (qemu) migrate_set_capability multifd on
      (qemu) migrate -d url
      (qemu) [wait a while]
      (qemu) migrate_cancel
      
      Then may get live_migration 100% cpu usage in following stack:
      
      pthread_mutex_lock
      qemu_mutex_lock_impl
      multifd_send_pages
      multifd_queue_page
      ram_save_multifd_page
      ram_save_target_page
      ram_save_host_page
      ram_find_and_save_block
      ram_find_and_save_block
      ram_save_iterate
      qemu_savevm_state_iterate
      migration_iteration_run
      migration_thread
      qemu_thread_start
      start_thread
      clone
      
      Signed-off-by: default avatarIvan Ren <ivanren@tencent.com>
      Message-Id: <1561468699-9819-2-git-send-email-ivanren@tencent.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      713f762a
    • Marc-André Lureau's avatar
      docs: correct kconfig option · 6baabe5c
      Marc-André Lureau authored
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20190723120804.29565-1-marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      6baabe5c
    • Jan Kiszka's avatar
      i386/kvm: Do not sync nested state during runtime · bec7156a
      Jan Kiszka authored
      
      Writing the nested state e.g. after a vmport access can invalidate
      important parts of the kernel-internal state, and it is not needed as
      well. So leave this out from KVM_PUT_RUNTIME_STATE.
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Message-Id: <bdd53f40-4e60-f3ae-7ec6-162198214953@siemens.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      bec7156a
    • Zhengui Li's avatar
      virtio-scsi: fixed virtio_scsi_ctx_check failed when detaching scsi disk · 9c5aad84
      Zhengui Li authored
      
      commit a6f230c8 move blockbackend back to main AioContext on unplug. It set the AioContext of
      SCSIDevice to the main AioContex, but s->ctx is still the iothread AioContex(if the scsi controller
      is configure with iothread). So if there are having in-flight requests during unplug, a failing assertion
      happend. The bt is below:
      (gdb) bt
      #0  0x0000ffff86aacbd0 in raise () from /lib64/libc.so.6
      #1  0x0000ffff86aadf7c in abort () from /lib64/libc.so.6
      #2  0x0000ffff86aa6124 in __assert_fail_base () from /lib64/libc.so.6
      #3  0x0000ffff86aa61a4 in __assert_fail () from /lib64/libc.so.6
      #4  0x0000000000529118 in virtio_scsi_ctx_check (d=<optimized out>, s=<optimized out>, s=<optimized out>) at /home/qemu-4.0.0/hw/scsi/virtio-scsi.c:246
      #5  0x0000000000529ec4 in virtio_scsi_handle_cmd_req_prepare (s=0x2779ec00, req=0xffff740397d0) at /home/qemu-4.0.0/hw/scsi/virtio-scsi.c:559
      #6  0x000000000052a228 in virtio_scsi_handle_cmd_vq (s=0x2779ec00, vq=0xffff7c6d7110) at /home/qemu-4.0.0/hw/scsi/virtio-scsi.c:603
      #7  0x000000000052afa8 in virtio_scsi_data_plane_handle_cmd (vdev=<optimized out>, vq=0xffff7c6d7110) at /home/qemu-4.0.0/hw/scsi/virtio-scsi-dataplane.c:59
      #8  0x000000000054d94c in virtio_queue_host_notifier_aio_poll (opaque=<optimized out>) at /home/qemu-4.0.0/hw/virtio/virtio.c:2452
      
      assert(blk_get_aio_context(d->conf.blk) == s->ctx) failed.
      
      To avoid assertion failed,  moving the "if" after qdev_simple_device_unplug_cb.
      
      In addition, to avoid another qemu crash below, add aio_disable_external before
      qdev_simple_device_unplug_cb, which disable the further processing of external clients
      when doing qdev_simple_device_unplug_cb.
      (gdb) bt
      #0  scsi_req_unref (req=0xffff6802c6f0) at hw/scsi/scsi-bus.c:1283
      #1  0x00000000005294a4 in virtio_scsi_handle_cmd_req_submit (req=<optimized out>,
          s=<optimized out>) at /home/qemu-4.0.0/hw/scsi/virtio-scsi.c:589
      #2  0x000000000052a2a8 in virtio_scsi_handle_cmd_vq (s=s@entry=0x9c90e90,
          vq=vq@entry=0xffff7c05f110) at /home/qemu-4.0.0/hw/scsi/virtio-scsi.c:625
      #3  0x000000000052afd8 in virtio_scsi_data_plane_handle_cmd (vdev=<optimized out>,
          vq=0xffff7c05f110) at /home/qemu-4.0.0/hw/scsi/virtio-scsi-dataplane.c:60
      #4  0x000000000054d97c in virtio_queue_host_notifier_aio_poll (opaque=<optimized out>)
          at /home/qemu-4.0.0/hw/virtio/virtio.c:2447
      #5  0x00000000009b204c in run_poll_handlers_once (ctx=ctx@entry=0x6efea40,
          timeout=timeout@entry=0xffff7d7f7308) at util/aio-posix.c:521
      #6  0x00000000009b2b64 in run_poll_handlers (ctx=ctx@entry=0x6efea40,
          max_ns=max_ns@entry=4000, timeout=timeout@entry=0xffff7d7f7308) at util/aio-posix.c:559
      #7  0x00000000009b2ca0 in try_poll_mode (ctx=ctx@entry=0x6efea40, timeout=0xffff7d7f7308,
          timeout@entry=0xffff7d7f7348) at util/aio-posix.c:594
      #8  0x00000000009b31b8 in aio_poll (ctx=0x6efea40, blocking=blocking@entry=true)
          at util/aio-posix.c:636
      #9  0x00000000006973cc in iothread_run (opaque=0x6ebd800) at iothread.c:75
      #10 0x00000000009b592c in qemu_thread_start (args=0x6efef60) at util/qemu-thread-posix.c:502
      #11 0x0000ffff8057f8bc in start_thread () from /lib64/libpthread.so.0
      #12 0x0000ffff804e5f8c in thread_start () from /lib64/libc.so.6
      (gdb) p bus
      $1 = (SCSIBus *) 0x0
      
      Signed-off-by: default avatarZhengui li <lizhengui@huawei.com>
      Message-Id: <1563696502-7972-1-git-send-email-lizhengui@huawei.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <1563829520-17525-1-git-send-email-pbonzini@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9c5aad84
Loading