1. 17 7月, 2017 5 次提交
  2. 11 7月, 2017 2 次提交
    • E
      tests: Avoid non-portable 'echo -ARG' · b43671f8
      Eric Blake 提交于
      POSIX says that backslashes in the arguments to 'echo', as well as
      any use of 'echo -n' and 'echo -e', are non-portable; it recommends
      people should favor 'printf' instead.  This is definitely true where
      we do not control which shell is running (such as in makefile snippets
      or in documentation examples).  But even for scripts where we
      require bash (and therefore, where echo does what we want by default),
      it is still possible to use 'shopt -s xpg_echo' to change bash's
      behavior of echo.  And setting a good example never hurts when we are
      not sure if a snippet will be copied from a bash-only script to a
      general shell script (although I don't change the use of non-portable
      \e for ESC when we know the running shell is bash).
      
      Replace 'echo -n "..."' with 'printf %s "..."', and 'echo -e "..."'
      with 'printf %b "...\n"', with the optimization that the %s/%b
      argument can be omitted if the string being printed is a strict
      literal with no '%', '$', or '`' (we could technically also make
      this optimization when there are $ or `` substitutions but where
      we can prove their results will not be problematic, but proving
      that such substitutions are safe makes the patch less trivial
      compared to just being consistent).
      
      In the qemu-iotests check script, fix unusual shell quoting
      that would result in word-splitting if 'date' outputs a space.
      
      In test 051, take an opportunity to shorten the line.
      
      In test 068, get rid of a pointless second invocation of bash.
      
      CC: qemu-trivial@nongnu.org
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-id: 20170703180950.9895-1-eblake@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      b43671f8
    • P
      doc: add item for "-M enforce-config-section" · 16f72448
      Peter Xu 提交于
      It's never documented, and now we have one more parameter for it (which
      obsoletes this one). Document it properly.
      Suggested-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1499396048-21657-1-git-send-email-peterx@redhat.com>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
        Removed 'Although now' commit message as per Eduardo's review
      16f72448
  3. 10 7月, 2017 1 次提交
  4. 29 6月, 2017 1 次提交
    • T
      9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes · b96feb2c
      Tobias Schramm 提交于
      In mapped security modes, files are created with very restrictive
      permissions (600 for files and 700 for directories). This makes
      file sharing between virtual machines and users on the host rather
      complicated. Imagine eg. a group of users that need to access data
      produced by processes on a virtual machine. Giving those users access
      to the data will be difficult since the group access mode is always 0.
      
      This patch makes the default mode for both files and directories
      configurable. Existing setups that don't know about the new parameters
      keep using the current secure behavior.
      Signed-off-by: NTobias Schramm <tobleminer@gmail.com>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      b96feb2c
  5. 26 6月, 2017 2 次提交
  6. 04 6月, 2017 2 次提交
    • S
      help: Add newline to end of thread option help text · f603164a
      Suraj Jitindar Singh 提交于
      The help text for the thread sub option of the accel option is missing
      a newline at the end. This is annoying as it makes it hard to see the
      help text for the next option.
      
      Add the new line so that the following option help text (-smp) is
      displayed on a new line rather on the same line and directly after
      the thread help.
      
      Before patch:
      
      -accel [accel=]accelerator[,thread=single|multi]
                      select accelerator (kvm, xen, hax or tcg; use 'help' for a list)
                      thread=single|multi (enable multi-threaded TCG)-smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]
                      set the number of CPUs to 'n' [default=1]
                      maxcpus= maximum number of total cpus, including
                      offline CPUs for hotplug, etc
                      cores= number of CPU cores on one socket
                      threads= number of threads on one CPU core
                      sockets= number of discrete sockets in the system
      
      After patch:
      
      -accel [accel=]accelerator[,thread=single|multi]
                      select accelerator (kvm, xen, hax or tcg; use 'help' for a list)
                      thread=single|multi (enable multi-threaded TCG)
      -smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]
                      set the number of CPUs to 'n' [default=1]
                      maxcpus= maximum number of total cpus, including
                      offline CPUs for hotplug, etc
                      cores= number of CPU cores on one socket
                      threads= number of threads on one CPU core
                      sockets= number of discrete sockets in the system
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      f603164a
    • M
      1c9f3b88
  7. 29 5月, 2017 1 次提交
  8. 23 5月, 2017 1 次提交
  9. 19 5月, 2017 1 次提交
  10. 12 5月, 2017 2 次提交
    • I
      numa: add '-numa cpu,...' option for property based node mapping · 419fcdec
      Igor Mammedov 提交于
      legacy cpu to node mapping is using cpu index values to map
      VCPU to node with help of '-numa node,nodeid=node,cpus=x[-y]'
      option. However cpu index is internal concept and QEMU users
      have to guess /reimplement qemu's logic/ to map it to
      a concrete cpu socket/core/thread to make sane CPUs
      placement across numa nodes.
      
      This patch allows to map cpu objects to numa nodes using
      the same properties as used for cpus with -device/device_add
      (socket-id/core-id/thread-id/node-id).
      
      At present valid properties/values to address CPUs could be
      fetched using hotpluggable-cpus monitor/qmp command, it will
      require user to start qemu twice when creating domain to fetch
      possible CPUs for a machine type/-smp layout first and
      then the second time with numa explicit mapping for actual
      usage. The first step results could be saved and reused to
      set/change mapping later as far as machine type/-smp stays
      the same.
      
      Proposed impl. supports exact and wildcard matching to
      simplify CLI and allow to set mapping for a specific cpu
      or group of cpu objects specified by matched properties.
      
      For example:
      
         # exact mapping x86
         -numa cpu,node-id=x,socket-id=y,core-id=z,thread-id=n
      
         # exact mapping SPAPR
         -numa cpu,node-id=x,core-id=y
      
         # wildcard mapping, all cpu objects that match socket-id=y
         # are mapped to node-id=x
         -numa cpu,node-id=x,socket-id=y
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <1494415802-227633-18-git-send-email-imammedo@redhat.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      419fcdec
    • H
      numa: Allow setting NUMA distance for different NUMA nodes · 0f203430
      He Chen 提交于
      This patch is going to add SLIT table support in QEMU, and provides
      additional option `dist` for command `-numa` to allow user set vNUMA
      distance by QEMU command.
      
      With this patch, when a user wants to create a guest that contains
      several vNUMA nodes and also wants to set distance among those nodes,
      the QEMU command would like:
      
      ```
      -numa node,nodeid=0,cpus=0 \
      -numa node,nodeid=1,cpus=1 \
      -numa node,nodeid=2,cpus=2 \
      -numa node,nodeid=3,cpus=3 \
      -numa dist,src=0,dst=1,val=21 \
      -numa dist,src=0,dst=2,val=31 \
      -numa dist,src=0,dst=3,val=41 \
      -numa dist,src=1,dst=2,val=21 \
      -numa dist,src=1,dst=3,val=31 \
      -numa dist,src=2,dst=3,val=21 \
      ```
      Signed-off-by: NHe Chen <he.chen@linux.intel.com>
      Message-Id: <1493260558-20728-1-git-send-email-he.chen@linux.intel.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      0f203430
  11. 10 5月, 2017 1 次提交
    • C
      virtfs: allow a device id to be specified in the -virtfs option · 3baa0a6a
      Chris Webb 提交于
      When using a virtfs root filesystem, the mount_tag needs to be set to
      /dev/root. This can be done long-hand as
      
        -fsdev local,id=root,path=/path/to/rootfs,...
        -device virtio-9p-pci,fsdev=root,mount_tag=/dev/root
      
      but the -virtfs shortcut cannot be used as it hard-codes the device identifier
      to match the mount_tag, and device identifiers may not contain '/':
      
        $ qemu-system-x86_64 -virtfs local,path=/foo,mount_tag=/dev/root,security_model=passthrough
        qemu-system-x86_64: -virtfs local,path=/foo,mount_tag=/dev/root,security_model=passthrough: duplicate fsdev id: /dev/root
      
      To support this case using -virtfs, we allow the device identifier to be
      specified explicitly when the mount_tag is not suitable:
      
        -virtfs local,id=root,path=/path/to/rootfs,mount_tag=/dev/root,...
      Signed-off-by: NChris Webb <chris@arachsys.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      3baa0a6a
  12. 07 5月, 2017 1 次提交
  13. 05 5月, 2017 2 次提交
  14. 27 4月, 2017 1 次提交
  15. 26 4月, 2017 2 次提交
  16. 22 4月, 2017 1 次提交
    • P
      xen: use libxendevice model to restrict operations · 1c599472
      Paul Durrant 提交于
      This patch adds a command-line option (-xen-domid-restrict) which will
      use the new libxendevicemodel API to restrict devicemodel [1] operations
      to the specified domid. (Such operations are not applicable to the xenpv
      machine type).
      
      This patch also adds a tracepoint to allow successful enabling of the
      restriction to be monitored.
      
      [1] I.e. operations issued by libxendevicemodel. Operation issued by other
          xen libraries (e.g. libxenforeignmemory) are currently still unrestricted
          but this will be rectified by subsequent patches.
      Signed-off-by: NPaul Durrant <paul.durrant@citrix.com>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      1c599472
  17. 21 4月, 2017 1 次提交
  18. 14 3月, 2017 1 次提交
  19. 07 3月, 2017 1 次提交
    • M
      block: Initial implementation of -blockdev · 42e5f393
      Markus Armbruster 提交于
      The new command line option -blockdev works like QMP command
      blockdev-add.
      
      The option argument may be given in JSON syntax, exactly as in QMP.
      Example usage:
      
          -blockdev '{"node-name": "foo", "driver": "raw", "file": {"driver": "file", "filename": "foo.img"} }'
      
      The JSON argument doesn't exactly blend into the existing option
      syntax, so the traditional KEY=VALUE,... syntax is also supported,
      using dotted keys to do the nesting:
      
          -blockdev node-name=foo,driver=raw,file.driver=file,file.filename=foo.img
      
      This does not yet support lists, but that will be addressed shortly.
      
      Note that calling qmp_blockdev_add() (say via qmp_marshal_block_add())
      right away would crash.  We need to stash the configuration for later
      instead.  This is crudely done, and bypasses QemuOpts, even though
      storing configuration is what QemuOpts is for.  Need to revamp option
      infrastructure to support QAPI types like BlockdevOptions.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1488317230-26248-22-git-send-email-armbru@redhat.com>
      42e5f393
  20. 03 3月, 2017 1 次提交
  21. 28 2月, 2017 2 次提交
  22. 24 2月, 2017 1 次提交
  23. 21 2月, 2017 2 次提交
  24. 20 2月, 2017 1 次提交
  25. 16 2月, 2017 1 次提交
  26. 10 2月, 2017 1 次提交
    • D
      ui: refactor code for populating SocketAddress from vnc_display_open · 275e0d61
      Daniel P. Berrange 提交于
      The code which interprets the CLI args to populate the SocketAddress
      objects for plain & websockets VNC is quite complex already and will
      need further enhancements shortly. Refactor it into separate methods
      to avoid vnc_display_open getting even larger. As a side effect of
      the refactoring, it is now possible to specify a listen address for
      the websocket server explicitly. e.g,
      
        -vnc localhost:5900,websockets=0.0.0.0:8080
      
      will listen on localhost for the plain VNC server, but expose the
      websockets VNC server on the public interface. This refactoring
      also removes the restriction that prevents enabling websockets
      when the plain VNC server is listening on a UNIX socket.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170203120649.15637-5-berrange@redhat.com
      
      [ kraxel: squashed clang build fix ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      275e0d61
  27. 28 1月, 2017 2 次提交