1. 08 10月, 2016 1 次提交
  2. 27 9月, 2016 3 次提交
    • A
      tap: Allow specifying a bridge · 584613ea
      Alexey Kardashevskiy 提交于
      The tap backend is already using qemu-bridge-helper to attach tap
      interface to a bridge but (unlike the bridge backend) it always uses
      the default bridge name - br0.
      
      This adds a "br" property support to the tap backend.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Tested-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      584613ea
    • Z
      filter-rewriter: introduce filter-rewriter initialization · e6eee8ab
      Zhang Chen 提交于
      Filter-rewriter is a part of COLO project.
      It will rewrite some of secondary packet to make
      secondary guest's tcp connection established successfully.
      In this module we will rewrite tcp packet's ack to the secondary
      from primary,and rewrite tcp packet's seq to the primary from
      secondary.
      
      usage:
      
      colo secondary:
      -object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
      -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
      -object filter-rewriter,id=rew0,netdev=hn0,queue=all
      Signed-off-by: NZhang Chen <zhangchen.fnst@cn.fujitsu.com>
      Signed-off-by: NLi Zhijian <lizhijian@cn.fujitsu.com>
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      e6eee8ab
    • Z
      colo-compare: introduce colo compare initialization · 7dce4e6f
      Zhang Chen 提交于
      This a COLO net ascii figure:
      
       Primary qemu                                                           Secondary qemu
      +--------------------------------------------------------------+       +----------------------------------------------------------------+
      | +----------------------------------------------------------+ |       |  +-----------------------------------------------------------+ |
      | |                                                          | |       |  |                                                           | |
      | |                        guest                             | |       |  |                        guest                              | |
      | |                                                          | |       |  |                                                           | |
      | +-------^--------------------------+-----------------------+ |       |  +---------------------+--------+----------------------------+ |
      |         |                          |                         |       |                        ^        |                              |
      |         |                          |                         |       |                        |        |                              |
      |         |  +------------------------------------------------------+  |                        |        |                              |
      |netfilter|  |                       |                         |    |  |   netfilter            |        |                              |
      | +----------+ +----------------------------+                  |    |  |  +-----------------------------------------------------------+ |
      | |       |  |                       |      |        out       |    |  |  |                     |        |  filter excute order       | |
      | |       |  |          +-----------------------------+        |    |  |  |                     |        | +------------------->      | |
      | |       |  |          |            |      |         |        |    |  |  |                     |        |   TCP                      | |
      | | +-----+--+-+  +-----v----+ +-----v----+ |pri +----+----+sec|    |  |  | +------------+  +---+----+---v+rewriter++  +------------+ | |
      | | |          |  |          | |          | |in  |         |in |    |  |  | |            |  |        |              |  |            | | |
      | | |  filter  |  |  filter  | |  filter  +------>  colo   <------+ +-------->  filter   +--> adjust |   adjust     +-->   filter   | | |
      | | |  mirror  |  |redirector| |redirector| |    | compare |   |  |    |  | | redirector |  | ack    |   seq        |  | redirector | | |
      | | |          |  |          | |          | |    |         |   |  |    |  | |            |  |        |              |  |            | | |
      | | +----^-----+  +----+-----+ +----------+ |    +---------+   |  |    |  | +------------+  +--------+--------------+  +---+--------+ | |
      | |      |   tx        |   rx           rx  |                  |  |    |  |            tx                        all       |  rx      | |
      | |      |             |                    |                  |  |    |  +-----------------------------------------------------------+ |
      | |      |             +--------------+     |                  |  |    |                                                   |            |
      | |      |   filter excute order      |     |                  |  |    |                                                   |            |
      | |      |  +---------------->        |     |                  |  +--------------------------------------------------------+            |
      | +-----------------------------------------+                  |       |                                                                |
      |        |                            |                        |       |                                                                |
      +--------------------------------------------------------------+       +----------------------------------------------------------------+
               |guest receive               | guest send
               |                            |
      +--------+----------------------------v------------------------+
      |                                                              |                          NOTE: filter direction is rx/tx/all
      |                         tap                                  |                          rx:receive packets sent to the netdev
      |                                                              |                          tx:receive packets sent by the netdev
      +--------------------------------------------------------------+
      
      In COLO-compare, we do packet comparing job.
      Packets coming from the primary char indev will be sent to outdev.
      Packets coming from the secondary char dev will be dropped after comparing.
      colo-comapre need two input chardev and one output chardev:
      primary_in=chardev1-id (source: primary send packet)
      secondary_in=chardev2-id (source: secondary send packet)
      outdev=chardev3-id
      
      usage:
      
      primary:
      -netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
      -device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
      -chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
      -chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
      -chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
      -chardev socket,id=compare0-0,host=3.3.3.3,port=9001
      -chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
      -chardev socket,id=compare_out0,host=3.3.3.3,port=9005
      -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
      -object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
      -object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
      -object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0
      
      secondary:
      -netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down script=/etc/qemu-ifdown
      -device e1000,netdev=hn0,mac=52:a4:00:12:78:66
      -chardev socket,id=red0,host=3.3.3.3,port=9003
      -chardev socket,id=red1,host=3.3.3.3,port=9004
      -object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
      -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
      Signed-off-by: NZhang Chen <zhangchen.fnst@cn.fujitsu.com>
      Signed-off-by: NLi Zhijian <lizhijian@cn.fujitsu.com>
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      7dce4e6f
  3. 14 9月, 2016 2 次提交
  4. 13 9月, 2016 2 次提交
  5. 04 8月, 2016 1 次提交
  6. 07 7月, 2016 1 次提交
  7. 04 7月, 2016 1 次提交
  8. 29 6月, 2016 2 次提交
  9. 21 6月, 2016 1 次提交
  10. 17 6月, 2016 1 次提交
    • R
      vl.c: Add '-L help' which lists data dirs. · 37146e7e
      Richard W.M. Jones 提交于
      QEMU compiles a list of data directories from various sources.  When
      consuming a QEMU binary it's useful to be able to get this list of
      data directories: a primary reason is so you can list what BIOSes or
      keymaps ship with this version of QEMU.  However without reproducing
      the method that QEMU uses internally, it's not possible to get the
      list of data directories.
      
      This commit adds a simple '-L help' option that just lists out the
      data directories as qemu calculates them:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -L help
      /home/rjones/d/qemu/pc-bios
      /usr/local/share/qemu
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -L /tmp -L help
      /tmp
      /home/rjones/d/qemu/pc-bios
      /usr/local/share/qemu
      Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1463416475-11728-2-git-send-email-rjones@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      37146e7e
  11. 07 6月, 2016 3 次提交
  12. 03 6月, 2016 1 次提交
  13. 19 4月, 2016 1 次提交
    • M
      fw_cfg: Adopt /opt/RFQDN convention · 63d3145a
      Markus Armbruster 提交于
      FW CFG's primary user is QEMU, which uses it to expose configuration
      information (in the widest sense) to Firmware.  Thus the name FW CFG.
      
      FW CFG can also be used by others for their own purposes.  QEMU is
      merely acting as transport then.  Names starting with opt/ are
      reserved for such uses.  There is no provision, however, to guide safe
      sharing among different such users.
      
      Fix that, loosely following QMP precedence: names should start with
      opt/RFQDN/, where RFQDN is a reverse fully qualified domain name you
      control.
      
      Based on a more ambitious patch from Michael Tsirkin.
      
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Gabriel L. Somlo <somlo@cmu.edu>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NGabriel Somlo <somlo@cmu.edu>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      63d3145a
  14. 05 4月, 2016 1 次提交
  15. 01 4月, 2016 1 次提交
  16. 30 3月, 2016 2 次提交
  17. 29 3月, 2016 1 次提交
  18. 24 3月, 2016 1 次提交
  19. 23 3月, 2016 1 次提交
    • A
      qemu-log: new option -dfilter to limit output · 3514552e
      Alex Bennée 提交于
      When debugging big programs or system emulation sometimes you want both
      the verbosity of cpu,exec et all but don't want to generate lots of logs
      for unneeded stuff. This patch adds a new option -dfilter which allows
      you to specify interesting address ranges in the form:
      
        -dfilter 0x8000..0x8fff,0xffffffc000080000+0x200,...
      
      Then logging code can use the new qemu_log_in_addr_range() function to
      decide if it will output logging information for the given range.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <1458052224-9316-7-git-send-email-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3514552e
  20. 15 3月, 2016 1 次提交
  21. 08 3月, 2016 2 次提交
    • G
      input: linux evdev support · e0d2bd51
      Gerd Hoffmann 提交于
      This patch adds support for reading input events directly from linux
      evdev devices and forward them to the guest.  Unlike virtio-input-host
      which simply passes on all events to the guest without looking at them
      this will interpret the events and feed them into the qemu input
      subsystem.
      
      Therefore this is limited to what the qemu input subsystem and the
      emulated input devices are able to handle.  Also there is no support for
      absolute coordinates (tablet/touchscreen).  So we are talking here about
      basic mouse and keyboard support.
      
      The advantage is that it'll work without virtio-input drivers in the
      guest, the events are delivered to the usual ps/2 or usb input devices
      (depending on what the machine happens to have).  And for keyboards
      qemu is able to switch the keyboard between guest and host on hotkey.
      The hotkey is hard-coded for now (both control keys), initialy the
      guest owns the keyboard.
      
      Probably most useful when assigning vga devices with vfio and using a
      physical monitor instead of vnc/spice/gtk as guest display.
      
      Usage:  Add '-input-linux /dev/input/event<nr>' to the qemu command
      line.  Note that udev has rules which populate /dev/input/by-{id,path}
      with static names, which might be more convinient to use.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1457087116-4379-2-git-send-email-kraxel@redhat.com
      e0d2bd51
    • Z
      filter: Add 'status' property for filter object · 338d3f41
      zhanghailiang 提交于
      With this property, users can control if this filter is 'on'
      or 'off'. The default behavior for filter is 'on'.
      
      For some types of filters, they may need to react to status changing,
      So here, we introduced status changing callback/notifier for filter class.
      
      We will skip the disabled ('off') filter when delivering packets in net layer.
      Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Yang Hongyang <hongyang.yang@easystack.cn>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      338d3f41
  22. 07 3月, 2016 1 次提交
  23. 28 2月, 2016 1 次提交
  24. 23 2月, 2016 1 次提交
    • G
      spice: add opengl/virgl/dmabuf support · 474114b7
      Gerd Hoffmann 提交于
      This adds support for dma-buf passing to spice.  This makes virtio-gpu
      with 3d acceleration work with spice.
      
      Workflow:
       * virglrenderer renders the guest command stream into a texture.
       * qemu exports the texture as dma-buf and passes on that dma-buf
         to spice-server.
       * spice-server passes the dma-buf to spice-client, using unix
         socket file descriptor passing.
       * spice-client asks the window systems composer to render the
         dma-buf to the screen.
      
      Requires cutting edge spice (server) and spice-gtk (client) builds,
      from git master branch.
      
      Also requires libvirt managing your qemu instance, and using
      "virt-viewer --attach $guest".  libvirt will connect spice-server and
      spice-client using unix sockets instead of tcp sockets then, which
      is required for file descriptor passing.
      
      Works for the local case (spice server and client on the same machine)
      only.  Supporting remote too is planned (by feeding the dma-bufs into
      gpu-assisted video encoder), but not there yet.
      
      gl mode is turned off by default, use "-spice gl=on,$otherargs" to
      enable it.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      474114b7
  25. 20 2月, 2016 1 次提交
  26. 07 2月, 2016 1 次提交
  27. 03 2月, 2016 3 次提交
  28. 26 1月, 2016 1 次提交
    • D
      char: introduce support for TLS encrypted TCP chardev backend · a8fb5427
      Daniel P. Berrange 提交于
      This integrates support for QIOChannelTLS object in the TCP
      chardev backend. If the 'tls-creds=NAME' option is passed with
      the '-chardev tcp' argument, then it will setup the chardev
      such that the client is required to establish a TLS handshake
      when connecting. There is no support for checking the client
      certificate against ACLs in this initial patch. This is pending
      work to QOM-ify the ACL object code.
      
      A complete invocation to run QEMU as the server for a TLS
      encrypted serial dev might be
      
        $ qemu-system-x86_64 \
            -nodefconfig -nodefaults -device sga -display none \
            -chardev socket,id=s0,host=127.0.0.1,port=9000,tls-creds=tls0,server \
            -device isa-serial,chardev=s0 \
            -object tls-creds-x509,id=tls0,endpoint=server,verify-peer=off,\
               dir=/home/berrange/security/qemutls
      
      To test with the gnutls-cli tool as the client:
      
        $ gnutls-cli --priority=NORMAL -p 9000 \
             --x509cafile=/home/berrange/security/qemutls/ca-cert.pem \
             127.0.0.1
      
      If QEMU was told to use 'anon' credential type, then use the
      priority string 'NORMAL:+ANON-DH' with gnutls-cli
      
      Alternatively, if setting up a chardev to operate as a client,
      then the TLS credentials registered must be for the client
      endpoint. First a TLS server must be setup, which can be done
      with the gnutls-serv tool
      
        $ gnutls-serv --priority=NORMAL -p 9000 --echo \
             --x509cafile=/home/berrange/security/qemutls/ca-cert.pem \
             --x509certfile=/home/berrange/security/qemutls/server-cert.pem \
             --x509keyfile=/home/berrange/security/qemutls/server-key.pem
      
      Then QEMU can connect with
      
        $ qemu-system-x86_64 \
            -nodefconfig -nodefaults -device sga -display none \
            -chardev socket,id=s0,host=127.0.0.1,port=9000,tls-creds=tls0 \
            -device isa-serial,chardev=s0 \
            -object tls-creds-x509,id=tls0,endpoint=client,\
              dir=/home/berrange/security/qemutls
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1453202071-10289-5-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a8fb5427
  29. 16 1月, 2016 1 次提交
    • D
      qemu-char: add logfile facility to all chardev backends · d0d7708b
      Daniel P. Berrange 提交于
      Typically a UNIX guest OS will log boot messages to a serial
      port in addition to any graphical console. An admin user
      may also wish to use the serial port for an interactive
      console. A virtualization management system may wish to
      collect system boot messages by logging the serial port,
      but also wish to allow admins interactive access.
      
      Currently providing such a feature forces the mgmt app
      to either provide 2 separate serial ports, one for
      logging boot messages and one for interactive console
      login, or to proxy all output via a separate service
      that can multiplex the two needs onto one serial port.
      While both are valid approaches, they each have their
      own downsides. The former causes confusion and extra
      setup work for VM admins creating disk images. The latter
      places an extra burden to re-implement much of the QEMU
      chardev backends logic in libvirt or even higher level
      mgmt apps and adds extra hops in the data transfer path.
      
      A simpler approach that is satisfactory for many use
      cases is to allow the QEMU chardev backends to have a
      "logfile" property associated with them.
      
       $QEMU -chardev socket,host=localhost,port=9000,\
                      server=on,nowait,id-charserial0,\
      		logfile=/var/log/libvirt/qemu/test-serial0.log
             -device isa-serial,chardev=charserial0,id=serial0
      
      This patch introduces a 'ChardevCommon' struct which
      is setup as a base for all the ChardevBackend types.
      Ideally this would be registered directly as a base
      against ChardevBackend, rather than each type, but
      the QAPI generator doesn't allow that since the
      ChardevBackend is a non-discriminated union. The
      ChardevCommon struct provides the optional 'logfile'
      parameter, as well as 'logappend' which controls
      whether QEMU truncates or appends (default truncate).
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1452516281-27519-1-git-send-email-berrange@redhat.com>
      [Call qemu_chr_parse_common if cd->parse is NULL. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d0d7708b