1. 15 8月, 2018 1 次提交
  2. 14 8月, 2018 1 次提交
  3. 08 8月, 2018 1 次提交
  4. 07 8月, 2018 3 次提交
  5. 06 8月, 2018 8 次提交
  6. 03 8月, 2018 5 次提交
    • M
      tests/acpi: update tables after memory hotplug changes · 1c707d69
      Michael S. Tsirkin 提交于
      Previous patch changes acpi tables, update expected
      files accordingly.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      1c707d69
    • I
      pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size · 10efd7e1
      Igor Mammedov 提交于
      Commit 848a1cc1 (hw/acpi-build: build SRAT memory affinity structures for DIMM devices)
      broke the first dimm hotplug in following cases:
      
       1: there is no coldplugged dimm in the last numa node
          but there is a coldplugged dimm in another node
      
        -m 4096,slots=4,maxmem=32G               \
        -object memory-backend-ram,id=m0,size=2G \
        -device pc-dimm,memdev=m0,node=0         \
        -numa node,nodeid=0                      \
        -numa node,nodeid=1
      
       2: if order of dimms on CLI is:
             1st plugged dimm in node1
             2nd plugged dimm in node0
      
        -m 4096,slots=4,maxmem=32G               \
        -object memory-backend-ram,size=2G,id=m0 \
        -device pc-dimm,memdev=m0,node=1         \
        -object memory-backend-ram,id=m1,size=2G \
        -device pc-dimm,memdev=m1,node=0         \
        -numa node,nodeid=0                      \
        -numa node,nodeid=1
      
      (qemu) object_add memory-backend-ram,id=m2,size=1G
      (qemu) device_add pc-dimm,memdev=m2,node=0
      
      the first DIMM hotplug to any node except the last one
      fails (Windows is unable to online it).
      
      Length reduction of stub hotplug memory SRAT entry,
      fixes issue for some reason.
      
      RHBZ: 1609234
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      10efd7e1
    • D
      tests/acpi-test: update ACPI tables test blobs · 16e2841d
      Dou Liyang 提交于
      Now, QEmu adds a new check for memory-less NUMA nodes in build_srat().
      
      It effects the ACPI test.
      
      So, Update ACPI tables test blobs.
      Signed-off-by: NDou Liyang <douly.fnst@cn.fujitsu.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      16e2841d
    • D
      hw/acpi-build: Add a check for memory-less NUMA nodes · 16b42263
      Dou Liyang 提交于
      Currently, Qemu ACPI builder doesn't consider the memory-less NUMA nodes, eg:
      
        -m 4G,slots=4,maxmem=8G \
        -numa node,nodeid=0 \
        -numa node,nodeid=1,mem=2G \
        -numa node,nodeid=2,mem=2G \
        -numa node,nodeid=3\
      
      Guest Linux will report
      
        [    0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0xffffffffffffffff]
        [    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x00000000-0x0009ffff]
        [    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x00100000-0x7fffffff]
        [    0.000000] ACPI: SRAT: Node 2 PXM 2 [mem 0x80000000-0xbfffffff]
        [    0.000000] ACPI: SRAT: Node 2 PXM 2 [mem 0x100000000-0x13fffffff]
        [    0.000000] ACPI: SRAT: Node 3 PXM 3 [mem 0x140000000-0x13fffffff]
        [    0.000000] ACPI: SRAT: Node 3 PXM 3 [mem 0x140000000-0x33fffffff] hotplug
      
      [mem 0x00000000-0xffffffffffffffff] and [mem 0x140000000-0x13fffffff] are bogus.
      
      Add a check to avoid building srat memory for memory-less NUMA nodes, also update
      the test file. Now the info in guest linux will be
      
        [    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x00000000-0x0009ffff]
        [    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x00100000-0x7fffffff]
        [    0.000000] ACPI: SRAT: Node 2 PXM 2 [mem 0x80000000-0xbfffffff]
        [    0.000000] ACPI: SRAT: Node 2 PXM 2 [mem 0x100000000-0x13fffffff]
        [    0.000000] ACPI: SRAT: Node 3 PXM 3 [mem 0x140000000-0x33fffffff] hotplug
      Signed-off-by: NDou Liyang <douly.fnst@cn.fujitsu.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      16b42263
    • T
      vhost: check region type before casting · 388a86df
      Tiwei Bie 提交于
      Check region type first before casting the memory region
      to IOMMUMemoryRegion. Otherwise QEMU will abort with below
      error message when casting non-IOMMU memory region:
      
      vhost_iommu_region_add: Object 0x561f28bce4f0 is not an
      instance of type qemu:iommu-memory-region
      
      Fixes: cb1efcf4 ("iommu: Add IOMMU index argument to notifier APIs")
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NTiwei Bie <tiwei.bie@intel.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      388a86df
  7. 01 8月, 2018 4 次提交
  8. 31 7月, 2018 9 次提交
    • M
      monitor: temporary fix for dead-lock on event recursion · 9a105406
      Marc-André Lureau 提交于
      With a Spice port chardev, it is possible to reenter
      monitor_qapi_event_queue() (when the client disconnects for
      example). This will dead-lock on monitor_lock.
      
      Instead, use some TLS variables to check for recursion and queue the
      events.
      
      Fixes:
       (gdb) bt
       #0  0x00007fa69e7217fd in __lll_lock_wait () at /lib64/libpthread.so.0
       #1  0x00007fa69e71acf4 in pthread_mutex_lock () at /lib64/libpthread.so.0
       #2  0x0000563303567619 in qemu_mutex_lock_impl (mutex=0x563303d3e220 <monitor_lock>, file=0x5633036589a8 "/home/elmarco/src/qq/monitor.c", line=645) at /home/elmarco/src/qq/util/qemu-thread-posix.c:66
       #3  0x0000563302fa6c25 in monitor_qapi_event_queue (event=QAPI_EVENT_SPICE_DISCONNECTED, qdict=0x56330602bde0, errp=0x7ffc6ab5e728) at /home/elmarco/src/qq/monitor.c:645
       #4  0x0000563303549aca in qapi_event_send_spice_disconnected (server=0x563305afd630, client=0x563305745360, errp=0x563303d8d0f0 <error_abort>) at qapi/qapi-events-ui.c:149
       #5  0x00005633033e600f in channel_event (event=3, info=0x5633061b0050) at /home/elmarco/src/qq/ui/spice-core.c:235
       #6  0x00007fa69f6c86bb in reds_handle_channel_event (reds=<optimized out>, event=3, info=0x5633061b0050) at reds.c:316
       #7  0x00007fa69f6b193b in main_dispatcher_self_handle_channel_event (info=0x5633061b0050, event=3, self=0x563304e088c0) at main-dispatcher.c:197
       #8  0x00007fa69f6b193b in main_dispatcher_channel_event (self=0x563304e088c0, event=event@entry=3, info=0x5633061b0050) at main-dispatcher.c:197
       #9  0x00007fa69f6d0833 in red_stream_push_channel_event (s=s@entry=0x563305ad8f50, event=event@entry=3) at red-stream.c:414
       #10 0x00007fa69f6d086b in red_stream_free (s=0x563305ad8f50) at red-stream.c:388
       #11 0x00007fa69f6b7ddc in red_channel_client_finalize (object=0x563304df2360) at red-channel-client.c:347
       #12 0x00007fa6a56b7fb9 in g_object_unref () at /lib64/libgobject-2.0.so.0
       #13 0x00007fa69f6ba212 in red_channel_client_push (rcc=0x563304df2360) at red-channel-client.c:1341
       #14 0x00007fa69f68b259 in red_char_device_send_msg_to_client (client=<optimized out>, msg=0x5633059b6310, dev=0x563304e08bc0) at char-device.c:305
       #15 0x00007fa69f68b259 in red_char_device_send_msg_to_clients (msg=0x5633059b6310, dev=0x563304e08bc0) at char-device.c:305
       #16 0x00007fa69f68b259 in red_char_device_read_from_device (dev=0x563304e08bc0) at char-device.c:353
       #17 0x000056330317d01d in spice_chr_write (chr=0x563304cafe20, buf=0x563304cc50b0 "{\"timestamp\": {\"seconds\": 1532944763, \"microseconds\": 326636}, \"event\": \"SHUTDOWN\", \"data\": {\"guest\": false}}\r\n", len=111) at /home/elmarco/src/qq/chardev/spice.c:199
       #18 0x00005633034deee7 in qemu_chr_write_buffer (s=0x563304cafe20, buf=0x563304cc50b0 "{\"timestamp\": {\"seconds\": 1532944763, \"microseconds\": 326636}, \"event\": \"SHUTDOWN\", \"data\": {\"guest\": false}}\r\n", len=111, offset=0x7ffc6ab5ea70, write_all=false) at /home/elmarco/src/qq/chardev/char.c:112
       #19 0x00005633034df054 in qemu_chr_write (s=0x563304cafe20, buf=0x563304cc50b0 "{\"timestamp\": {\"seconds\": 1532944763, \"microseconds\": 326636}, \"event\": \"SHUTDOWN\", \"data\": {\"guest\": false}}\r\n", len=111, write_all=false) at /home/elmarco/src/qq/chardev/char.c:147
       #20 0x00005633034e1e13 in qemu_chr_fe_write (be=0x563304dbb800, buf=0x563304cc50b0 "{\"timestamp\": {\"seconds\": 1532944763, \"microseconds\": 326636}, \"event\": \"SHUTDOWN\", \"data\": {\"guest\": false}}\r\n", len=111) at /home/elmarco/src/qq/chardev/char-fe.c:42
       #21 0x0000563302fa6334 in monitor_flush_locked (mon=0x563304dbb800) at /home/elmarco/src/qq/monitor.c:425
       #22 0x0000563302fa6520 in monitor_puts (mon=0x563304dbb800, str=0x563305de7e9e "") at /home/elmarco/src/qq/monitor.c:468
       #23 0x0000563302fa680c in qmp_send_response (mon=0x563304dbb800, rsp=0x563304df5730) at /home/elmarco/src/qq/monitor.c:517
       #24 0x0000563302fa6905 in qmp_queue_response (mon=0x563304dbb800, rsp=0x563304df5730) at /home/elmarco/src/qq/monitor.c:538
       #25 0x0000563302fa6b5b in monitor_qapi_event_emit (event=QAPI_EVENT_SHUTDOWN, qdict=0x563304df5730) at /home/elmarco/src/qq/monitor.c:624
       #26 0x0000563302fa6c4b in monitor_qapi_event_queue (event=QAPI_EVENT_SHUTDOWN, qdict=0x563304df5730, errp=0x7ffc6ab5ed00) at /home/elmarco/src/qq/monitor.c:649
       #27 0x0000563303548cce in qapi_event_send_shutdown (guest=false, errp=0x563303d8d0f0 <error_abort>) at qapi/qapi-events-run-state.c:58
       #28 0x000056330313bcd7 in main_loop_should_exit () at /home/elmarco/src/qq/vl.c:1822
       #29 0x000056330313bde3 in main_loop () at /home/elmarco/src/qq/vl.c:1862
       #30 0x0000563303143781 in main (argc=3, argv=0x7ffc6ab5f068, envp=0x7ffc6ab5f088) at /home/elmarco/src/qq/vl.c:4644
      
      Note that error report is now moved to the first caller, which may
      receive an error for a recursed event. This is probably fine (95% of
      callers use &error_abort, the rest have NULL error and ignore it)
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20180731150144.14022-1-marcandre.lureau@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [*_no_recurse renamed to *_no_reenter, local variables reordered]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      9a105406
    • P
      Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging · 42e76456
      Peter Maydell 提交于
      Fix safe_syscall() on ppc64 host
      Fix mmap() 0 length error case
      
      # gpg: Signature made Tue 31 Jul 2018 09:41:07 BST
      # gpg:                using RSA key F30C38BD3F2FBE3C
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/linux-user-for-3.0-pull-request:
        linux-user: ppc64: don't use volatile register during safe_syscall
        tests: add check_invalid_maps to test-mmap
        linux-user/mmap.c: handle invalid len maps correctly
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      42e76456
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · 45a505d0
      Peter Maydell 提交于
      Bug fixes.
      
      # gpg: Signature made Mon 30 Jul 2018 13:00:39 BST
      # gpg:                using RSA key BFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream:
        backends/cryptodev: remove dead code
        timer: remove replay clock probe in deadline calculation
        i386: implement MSR_SMI_COUNT for TCG
        i386: do not migrate MSR_SMI_COUNT on machine types <2.12
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      45a505d0
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180731' into staging · fd76fef8
      Peter Maydell 提交于
      fix large guests on s390x
      
      # gpg: Signature made Tue 31 Jul 2018 07:47:38 BST
      # gpg:                using RSA key DECF6B93C6F02FAF
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
      # gpg:                 aka "Cornelia Huck <cohuck@redhat.com>"
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * remotes/cohuck/tags/s390x-20180731:
        s390x/sclp: fix maxram calculation
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fd76fef8
    • S
      linux-user: ppc64: don't use volatile register during safe_syscall · 5d9f3ea0
      Shivaprasad G Bhat 提交于
      r11 is a volatile register on PPC as per calling conventions.
      The safe_syscall code uses it to check if the signal_pending
      is set during the safe_syscall. When a syscall is interrupted
      on return from signal handling, the r11 might be corrupted
      before we retry the syscall leading to a crash. The registers
      r0-r13 are not to be used here as they have
      volatile/designated/reserved usages.
      
      Change the code to use r14 which is non-volatile.
      Use SP+16 which is a slot for LR, for save/restore of previous value
      of r14. SP+16 can be used, as LR is preserved across the syscall.
      
      Steps to reproduce:
      On PPC host, issue `qemu-x86_64 /usr/bin/cc -E -`
      Attempt Ctrl-C, the issue is reproduced.
      
      Reference:
      https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html#REG
      https://openpowerfoundation.org/wp-content/uploads/2016/03/ABI64BitOpenPOWERv1.1_16July2015_pub4.pdfSigned-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
      Tested-by: NRichard Henderson <richard.henderson@linaro.org>
      Tested-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Message-Id: <153301568965.30312.10498134581068746871.stgit@dhcp-9-109-246-16>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      5d9f3ea0
    • A
      tests: add check_invalid_maps to test-mmap · 28cbb997
      Alex Bennée 提交于
      This adds a test to make sure we fail properly for a 0 length mmap.
      There are most likely other failure conditions we should also check.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Cc: umarcor <1783362@bugs.launchpad.net>
      Message-Id: <20180730134321.19898-3-alex.bennee@linaro.org>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      28cbb997
    • A
      linux-user/mmap.c: handle invalid len maps correctly · 38138fab
      Alex Bennée 提交于
      I've slightly re-organised the check to more closely match the
      sequence that the kernel uses in do_mmap(). We check for both the zero
      case (EINVAL) and the overflow length case (ENOMEM).
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Cc: umarcor <1783362@bugs.launchpad.net>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Message-Id: <20180730134321.19898-2-alex.bennee@linaro.org>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      38138fab
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 7b799ec6
      Peter Maydell 提交于
      Block layer patches:
      
      - qemu-img convert -C is now required to enable copy offloading
      - file-posix: Fix write_zeroes with unmap on block devices (would fall
        back to explicit writes on recent kernels)
      - Fix query-blockstats interface for use with -blockdev
      - Minor fixes and documentation updates
      
      # gpg: Signature made Mon 30 Jul 2018 16:08:14 BST
      # gpg:                using RSA key 7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream:
        qemu-iotests: Test query-blockstats with -drive and -blockdev
        block/qapi: Include anonymous BBs in query-blockstats
        block/qapi: Add 'qdev' field to query-blockstats result
        file-posix: Fix write_zeroes with unmap on block devices
        block: Fix documentation for BDRV_REQ_MAY_UNMAP
        iotests: Add test for 'qemu-img convert -C' compatibility
        qemu-img: Add -C option for convert with copy offloading
        Revert "qemu-img: Document copy offloading implications with -S and -c"
        iotests: Don't lock /dev/null in 226
        docs: Describe using images in writing iotests
        file-posix: Handle EINTR in preallocation=full write
        qcow2: A grammar fix in conflicting cache sizing error message
        qcow: fix a reference leak
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7b799ec6
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180730' into staging · 7aefc145
      Peter Maydell 提交于
      target-arm queue:
       * arm/smmuv3: Fix broken VM state migration
       * armv7m_nvic: Fix broken VM state migration
       * hw/arm/sysbus-fdt: Fix assertion in copy_properties_from_host()
       * hw/arm/iotkit: Fix IRQ number for timer1
       * hw/misc/tz-mpc: Zero the LUT on initialization, not just reset
       * target/arm: Remove duplicate 'host' entry in '-cpu ?' output
      
      # gpg: Signature made Mon 30 Jul 2018 15:16:01 BST
      # 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-20180730:
        target/arm: Remove duplicate 'host' entry in '-cpu ?' output
        hw/misc/tz-mpc: Zero the LUT on initialization, not just reset
        hw/arm/iotkit: Fix IRQ number for timer1
        armv7m_nvic: Fix m-security subsection name
        hw/arm/sysbus-fdt: Fix assertion in copy_properties_from_host()
        arm/smmuv3: Fix missing VMSD terminator
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7aefc145
  9. 30 7月, 2018 8 次提交