1. 17 5月, 2017 1 次提交
    • S
      xen/mapcache: store dma information in revmapcache entries for debugging · 1ff7c598
      Stefano Stabellini 提交于
      The Xen mapcache is able to create long term mappings, they are called
      "locked" mappings. The third parameter of the xen_map_cache call
      specifies if a mapping is a "locked" mapping.
      
      >From the QEMU point of view there are two kinds of long term mappings:
      
      [a] device memory mappings, such as option roms and video memory
      [b] dma mappings, created by dma_memory_map & friends
      
      After certain operations, ballooning a VM in particular, Xen asks QEMU
      kindly to destroy all mappings. However, certainly [a] mappings are
      present and cannot be removed. That's not a problem as they are not
      affected by balloonning. The *real* problem is that if there are any
      mappings of type [b], any outstanding dma operations could fail. This is
      a known shortcoming. In other words, when Xen asks QEMU to destroy all
      mappings, it is an error if any [b] mappings exist.
      
      However today we have no way of distinguishing [a] from [b]. Because of
      that, we cannot even print a decent warning.
      
      This patch introduces a new "dma" bool field to MapCacheRev entires, to
      remember if a given mapping is for dma or is a long term device memory
      mapping. When xen_invalidate_map_cache is called, we print a warning if
      any [b] mappings exist. We ignore [a] mappings.
      
      Mappings created by qemu_map_ram_ptr are assumed to be [a], while
      mappings created by address_space_map->qemu_ram_ptr_length are assumed
      to be [b].
      
      The goal of the patch is to make debugging and system understanding
      easier.
      Signed-off-by: NStefano Stabellini <sstabellini@kernel.org>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Acked-by: NAnthony PERARD <anthony.perard@citrix.com>
      1ff7c598
  2. 16 5月, 2017 6 次提交
    • G
      block/win32: fix 'ret not initialized' warning · cdece046
      Gerd Hoffmann 提交于
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Message-id: 20170516074256.24731-1-kraxel@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      cdece046
    • G
      fix mingw build failure · 612fc05a
      Gerd Hoffmann 提交于
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170516052439.16214-1-kraxel@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      612fc05a
    • K
      maintainers: Add myself as a NetBSD reviewer · 3c2bdbc1
      Kamil Rytarowski 提交于
      I volunteer to review NetBSD patches.
      Adding myself will help to not miss some of them.
      
      Restore NetBSD as a maintained host.
      
      All patches to make qemu/pkgsrc building have been emitted to review.
      Signed-off-by: NKamil Rytarowski <n54@gmx.com>
      Message-id: 20170513022143.2838-1-n54@gmx.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      3c2bdbc1
    • S
      Merge remote-tracking branch 'gkurz/tags/security-fix-for-2.10' into staging · 96cd5998
      Stefan Hajnoczi 提交于
      Fix for CVE-2017-7493.
      
      # gpg: Signature made Mon 15 May 2017 07:48:20 PM BST
      # gpg:                using DSA key 0x02FC3AEB0101DBC2
      # gpg: Good signature from "Greg Kurz <groug@kaod.org>"
      # gpg:                 aka "Greg Kurz <groug@free.fr>"
      # gpg:                 aka "Greg Kurz <gkurz@fr.ibm.com>"
      # gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
      # gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
      # gpg:                 aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>"
      # gpg:                 aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.com>"
      # 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: 2BD4 3B44 535E C0A7 9894  DBA2 02FC 3AEB 0101 DBC2
      
      * gkurz/tags/security-fix-for-2.10:
        9pfs: local: forbid client access to metadata (CVE-2017-7493)
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      96cd5998
    • S
      Merge remote-tracking branch 'aurel32/tags/pull-target-sh4-20170513' into staging · 6a8d8349
      Stefan Hajnoczi 提交于
      Queued target/sh4 patches
      
      # gpg: Signature made Sat 13 May 2017 10:25:41 AM BST
      # gpg:                using RSA key 0xBA9C78061DDD8C9B
      # gpg: Good signature from "Aurelien Jarno <aurelien@aurel32.net>"
      # gpg:                 aka "Aurelien Jarno <aurelien@jarno.fr>"
      # gpg:                 aka "Aurelien Jarno <aurel32@debian.org>"
      # Primary key fingerprint: 7746 2642 A9EF 94FD 0F77  196D BA9C 7806 1DDD 8C9B
      
      * aurel32/tags/pull-target-sh4-20170513:
        target/sh4: use cpu_loop_exit_restore
        target/sh4: trap unaligned accesses
        target/sh4: movua.l is an SH4-A only instruction
        target/sh4: implement tas.b using atomic helper
        target/sh4: generate fences for SH4
        target/sh4: optimize gen_write_sr using extract op
        target/sh4: optimize gen_store_fpr64
        target/sh4: fold ctx->bstate = BS_BRANCH into gen_conditional_jump
        target/sh4: only save flags state at the end of the TB
        target/sh4: fix BS_EXCP exit
        target/sh4: fix BS_STOP exit
        target/sh4: move DELAY_SLOT_TRUE flag into a separate global
        target/sh4: do not include DELAY_SLOT_TRUE in the TB state
        target/sh4: get rid of DELAY_SLOT_CLEARME
        target/sh4: split ctx->flags into ctx->tbflags and ctx->envflags
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      6a8d8349
    • S
      Merge remote-tracking branch 'rth/tags/pull-s390-20170512' into staging · eba01619
      Stefan Hajnoczi 提交于
      Queued target/s390 patches
      
      # gpg: Signature made Sat 13 May 2017 12:33:08 AM BST
      # gpg:                using RSA key 0xAD1270CC4DD0279B
      # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
      # gpg:                 aka "Richard Henderson <rth@redhat.com>"
      # gpg:                 aka "Richard Henderson <rth@twiddle.net>"
      # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B
      
      * rth/tags/pull-s390-20170512:
        target/s390x: implement serialization in BRANCH CONDITION
        target/s390x: fix SIGNAL PROCESSOR return value
        target/s390x: mask the SIGP order_code using SIGP_ORDER_MASK
        target/s390x: Use atomic operations for LOAD AND OP
        target/s390x: Use atomic operations for COMPARE SWAP
        target/s390x: Implement LOAD PAIR DISJOINT
        target/s390x: Diagnose specification exception for atomics
        target/s390x: Implement LOAD PROGRAM PARAMETER
        target/s390x: Implement STORE FACILITIES LIST EXTENDED
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      eba01619
  3. 15 5月, 2017 6 次提交
    • S
      Merge remote-tracking branch 'kraxel/tags/pull-usb-20170512-1' into staging · 8a813c98
      Stefan Hajnoczi 提交于
      usb: bugfixes, doc update
      
      # gpg: Signature made Fri 12 May 2017 01:20:29 PM BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * kraxel/tags/pull-usb-20170512-1:
        hw/usb/dev-serial: Do not try to set vendorid or productid properties
        xhci: relax link check
        usb-hub: clear PORT_STAT_SUSPEND on wakeup
        xhci: fix logging
        usb-redir: fix stack overflow in usbredir_log_data
        qemu-doc: Update to use the new way of attaching USB devices
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      8a813c98
    • S
      Merge remote-tracking branch 'kraxel/tags/pull-ui-20170512-1' into staging · 384d9d55
      Stefan Hajnoczi 提交于
      ui: add egl-headless
      ui: some vnc cleanups
      ui: absolute events for input-linux
      
      # gpg: Signature made Fri 12 May 2017 12:50:07 PM BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * kraxel/tags/pull-ui-20170512-1:
        vnc: replace hweight_long() with ctpopl()
        vnc: simple clean up
        opengl: add egl-headless display
        egl: explicitly ask for core context
        egl-helpers: add missing error check
        egl-helpers: fix display init for x11
        egl-helpers: drop support for gles and debug logging
        virtio-gpu: move virtio_gpu_gl_block
        ui: input-linux: Add absolute event support
        ui: Support non-zero minimum values for absolute input axes
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      384d9d55
    • G
      9pfs: local: forbid client access to metadata (CVE-2017-7493) · 7a95434e
      Greg Kurz 提交于
      When using the mapped-file security mode, we shouldn't let the client mess
      with the metadata. The current code already tries to hide the metadata dir
      from the client by skipping it in local_readdir(). But the client can still
      access or modify it through several other operations. This can be used to
      escalate privileges in the guest.
      
      Affected backend operations are:
      - local_mknod()
      - local_mkdir()
      - local_open2()
      - local_symlink()
      - local_link()
      - local_unlinkat()
      - local_renameat()
      - local_rename()
      - local_name_to_path()
      
      Other operations are safe because they are only passed a fid path, which
      is computed internally in local_name_to_path().
      
      This patch converts all the functions listed above to fail and return
      EINVAL when being passed the name of the metadata dir. This may look
      like a poor choice for errno, but there's no such thing as an illegal
      path name on Linux and I could not think of anything better.
      
      This fixes CVE-2017-7493.
      Reported-by: NLeo Gaspard <leo@gaspard.io>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      7a95434e
    • S
      Merge remote-tracking branch 'ehabkost/tags/x86-and-machine-pull-request' into staging · ba9915e1
      Stefan Hajnoczi 提交于
      x86 and machine queue, 2017-05-11
      
      Highlights:
      * New "-numa cpu" option
      * NUMA distance configuration
      * migration/i386 vmstatification
      
      # gpg: Signature made Thu 11 May 2017 08:16:07 PM BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # gpg: Note: This key has expired!
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * ehabkost/tags/x86-and-machine-pull-request: (29 commits)
        migration/i386: Remove support for pre-0.12 formats
        vmstatification: i386 FPReg
        migration/i386: Remove old non-softfloat 64bit FP support
        tests: check -numa node,cpu=props_list usecase
        numa: add '-numa cpu,...' option for property based node mapping
        numa: remove node_cpu bitmaps as they are no longer used
        numa: use possible_cpus for not mapped CPUs check
        machine: call machine init from wrapper
        numa: remove no longer need numa_post_machine_init()
        tests: numa: add case for QMP command query-cpus
        QMP: include CpuInstanceProperties into query_cpus output output
        virt-arm: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu()
        spapr: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu()
        pc: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu()
        numa: do default mapping based on possible_cpus instead of node_cpu bitmaps
        numa: mirror cpu to node mapping in MachineState::possible_cpus
        numa: add check that board supports cpu_index to node mapping
        virt-arm: add node-id property to CPU
        pc: add node-id property to CPU
        spapr: add node-id property to sPAPR core
        ...
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ba9915e1
    • S
      Merge remote-tracking branch 'kraxel/tags/pull-vga-20170511-1' into staging · 43ad494c
      Stefan Hajnoczi 提交于
      make display updates thread safe, batch #2
      
      # gpg: Signature made Thu 11 May 2017 03:41:51 PM BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * kraxel/tags/pull-vga-20170511-1:
        vga: fix display update region calculation
        sm501: make display updates thread safe
        tcx: make display updates thread safe
        cg3: make display updates thread safe
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      43ad494c
    • S
      Merge remote-tracking branch 'dgibson/tags/ppc-for-2.10-20170511' into staging · 2f77ec73
      Stefan Hajnoczi 提交于
      ppc patch queue for 2017-05-11
      
      This pull request supersedes the one from yesterday (20170510), fixing
      an important style bug in one patch, and adding an extra couple of
      simple patches.
      
      Highlights of this set:
        * Some fixes for POWER9
        * TCG support for POWER9 radix MMU
        * VGA rom for Mac machine types
        * Fixes for the XICS interrupt controller
        * MTTCG support for ppc targets
      
      As suggested by Paolo, I've tried to add the Docker tests to my
      standard pre-pull-request tests.  I haven't wholly suceeded; this has
      been tested with some of the Docker images, but others I haven't
      managed due to problems that as best I can tell are not due to
      problems in this patch series.  I'll continue working on this for
      future pull requests.  Specifically, 'travis', 'fedora', and 'centos6'
      seem to work.  'min-glib' jammed while gtesting moxie, which seems
      very unlikely to be caused by this series.  'ubuntu', 'debian' and
      'debian-bootstrap' hit build errors almost immediately that look like
      problems with the container configuration, and 'debian-*-cross' hit
      build errors later on which also look like missing dependencies from
      the container.
      
      # gpg: Signature made Thu 11 May 2017 05:13:46 AM BST
      # gpg:                using RSA key 0x6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * dgibson/tags/ppc-for-2.10-20170511: (23 commits)
        target/ppc: Avoid printing wrong aliases in CPU help text
        pnv: Fix build failures on some host platforms
        target/ppc: Allow workarounds for POWER9 DD1
        spapr: Don't accidentally advertise HTM support on POWER9
        ppc: xics: fix compilation with CentOS 6
        target/ppc: Enable RADIX mmu mode for pseries TCG guest
        target/ppc: Implement ISA V3.00 radix page fault handler
        target/ppc: Change tlbie invalid fields for POWER9 support
        target/ppc: Update tlbie to check privilege level based on GTSE
        target/ppc: Set UPRT and GTSE on all cpus in H_REGISTER_PROCESS_TABLE
        ppc: add qemu_vga.ndrv ROM to fw_cfg interface for NewWorld Macs
        ppc: add qemu_vga.ndrv ROM to fw_cfg interface for OldWorld Macs
        Add QemuMacDrivers qemu_vga.ndrv revision d4e7d7a built as submodule
        Add QemuMacDrivers as submodule
        ppc/xics: preserve P and Q bits for KVM IRQs
        ppc/xics: Fix stale irq->status bits after get
        target/ppc: do not reset reserve_addr in exec_enter
        tcg: enable MTTCG by default for PPC64 on x86
        cpus: Fix CPU unplug for MTTCG
        target/ppc: Generate fence operations
        ...
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2f77ec73
  4. 13 5月, 2017 24 次提交
  5. 12 5月, 2017 3 次提交
    • S
      Merge tag 'tracing-pull-request' into staging · 3a876066
      Stefan Hajnoczi 提交于
      # gpg: Signature made Fri 12 May 2017 10:38:07 AM EDT
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * tag 'tracing-pull-request':
        trace: add sanity check
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      3a876066
    • S
      Merge tag 'block-pull-request' into staging · b54933ee
      Stefan Hajnoczi 提交于
      # gpg: Signature made Fri 12 May 2017 10:37:12 AM EDT
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * tag 'block-pull-request':
        aio: add missing aio_notify() to aio_enable_external()
        block: Simplify BDRV_BLOCK_RAW recursion
        coroutine: remove GThread implementation
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      b54933ee
    • S
      Merge remote-tracking branch 'kwolf/tags/for-upstream' into staging · 3753e255
      Stefan Hajnoczi 提交于
      Block layer patches
      
      # gpg: Signature made Thu 11 May 2017 10:31:37 AM EDT
      # gpg:                using RSA key 0x7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * kwolf/tags/for-upstream: (58 commits)
        MAINTAINERS: Add qemu-progress to the block layer
        qcow2: Discard/zero clusters by byte count
        qcow2: Assert that cluster operations are aligned
        qcow2: Optimize write zero of unaligned tail cluster
        iotests: Add test 179 to cover write zeroes with unmap
        iotests: Improve _filter_qemu_img_map
        qcow2: Optimize zero_single_l2() to minimize L2 churn
        qcow2: Make distinction between zero cluster types obvious
        qcow2: Name typedef for cluster type
        qcow2: Correctly report status of preallocated zero clusters
        block: Update comments on BDRV_BLOCK_* meanings
        qcow2: Use consistent switch indentation
        qcow2: Nicer variable names in qcow2_update_snapshot_refcount()
        tests: Add coverage for recent block geometry fixes
        blkdebug: Add ability to override unmap geometries
        blkdebug: Simplify override logic
        blkdebug: Add pass-through write_zero and discard support
        blkdebug: Refactor error injection
        blkdebug: Sanity check block layer guarantees
        qemu-io: Switch 'map' output to byte-based reporting
        ...
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      3753e255