1. 27 2月, 2012 1 次提交
  2. 25 2月, 2012 2 次提交
  3. 24 2月, 2012 1 次提交
    • M
      qemu-ga: fixes for win32 build of qemu-ga · d8ca685a
      Michael Roth 提交于
      Various stubs and #ifdefs to compile for Windows using mingw
      cross-build. Still has 1 linker error due to a dependency on the
      forthcoming win32 versions of the GAChannel/transport class.
      d8ca685a
  4. 17 2月, 2012 2 次提交
  5. 10 2月, 2012 1 次提交
    • H
      usb-redir: Add the posibility to filter out certain devices from redirecion · 6af16589
      Hans de Goede 提交于
      This patch adds the posibility to filter out certain devices from redirecion.
      To use this pass the filter property to -device usb-redir.  The filter
      property takes a string consisting of filter rules, the format for a rule is:
      <class>:<vendor>:<product>:<version>:<allow>
      
      -1 can be used to allow any value for a field.
      
      Muliple rules can be concatonated using | as a separator. Note that if
      a device matches none of the passed in rules, redirecting it will not be
      allowed!
      
      Example:
      -device usb-redir,filter='-1:0x0781:0x5567:-1:0|0x08:-1:-1:-1:1'
      
      This example will deny the Sandisk Cruzer Blade being redirected, as it
      has a usb id of 0781:5567, it will allow any other usb mass storage devices,
      and it will deny any other devices (the default for devices not matching any
      of the rules.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      6af16589
  6. 02 2月, 2012 5 次提交
    • C
      Add support for net bridge · a7c36ee4
      Corey Bryant 提交于
      The most common use of -net tap is to connect a tap device to a bridge.  This
      requires the use of a script and running qemu as root in order to allocate a
      tap device to pass to the script.
      
      This model is great for portability and flexibility but it's incredibly
      difficult to eliminate the need to run qemu as root.  The only really viable
      mechanism is to use tunctl to create a tap device, attach it to a bridge as
      root, and then hand that tap device to qemu.  The problem with this mechanism
      is that it requires administrator intervention whenever a user wants to create
      a guest.
      
      By essentially writing a helper that implements the most common qemu-ifup
      script that can be safely given cap_net_admin, we can dramatically simplify
      things for non-privileged users.  We still support existing -net tap options
      as a mechanism for advanced users and backwards compatibility.
      
      Currently, this is very Linux centric but there's really no reason why it
      couldn't be extended for other Unixes.
      
      A typical invocation would be similar to one of the following:
      
        qemu linux.img -net bridge -net nic,model=virtio
      
        qemu linux.img -net tap,helper="/usr/local/libexec/qemu-bridge-helper"
                       -net nic,model=virtio
      
        qemu linux.img -netdev bridge,id=hn0
                       -device virtio-net-pci,netdev=hn0,id=nic1
      
        qemu linux.img -netdev tap,helper="/usr/local/libexec/qemu-bridge-helper",id=hn0
                       -device virtio-net-pci,netdev=hn0,id=nic1
      
      The default bridge that we attach to is br0.  The thinking is that a distro
      could preconfigure such an interface to allow out-of-the-box bridged networking.
      
      Alternatively, if a user wants to use a different bridge, a typical invocation
      would be simliar to one of the following:
      
        qemu linux.img -net bridge,br=qemubr0 -net nic,model=virtio
      
        qemu linux.img -net tap,helper="/usr/local/libexec/qemu-bridge-helper --br=qemubr0"
                       -net nic,model=virtio
      
        qemu linux.img -netdev bridge,br=qemubr0,id=hn0
                       -device virtio-net-pci,netdev=hn0,id=nic1
      
        qemu linux.img -netdev tap,helper="/usr/local/libexec/qemu-bridge-helper --br=qemubr0",id=hn0
                       -device virtio-net-pci,netdev=hn0,id=nic1
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com>
      Signed-off-by: NCorey Bryant <coreyb@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a7c36ee4
    • C
      Add cap reduction support to enable use as SUID · 47e98658
      Corey Bryant 提交于
      The ideal way to use qemu-bridge-helper is to give it an fscap of using:
      
       setcap cap_net_admin=ep qemu-bridge-helper
      
      Unfortunately, most distros still do not have a mechanism to package files
      with fscaps applied.  This means they'll have to SUID the qemu-bridge-helper
      binary.
      
      To improve security, use libcap to reduce our capability set to just
      cap_net_admin, then reduce privileges down to the calling user.  This is
      hopefully close to equivalent to fscap support from a security perspective.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com>
      Signed-off-by: NCorey Bryant <coreyb@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      47e98658
    • C
      Add basic version of bridge helper · 7b93fadf
      Corey Bryant 提交于
      This patch adds a helper that can be used to create a tap device attached to
      a bridge device.  Since this helper is minimal in what it does, it can be
      given CAP_NET_ADMIN which allows qemu to avoid running as root while still
      satisfying the majority of what users tend to want to do with tap devices.
      
      The way this all works is that qemu launches this helper passing a bridge
      name and the name of an inherited file descriptor.  The descriptor is one
      end of a socketpair() of domain sockets.  This domain socket is used to
      transmit a file descriptor of the opened tap device from the helper to qemu.
      
      The helper can then exit and let qemu use the tap device.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com>
      Signed-off-by: NCorey Bryant <coreyb@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      7b93fadf
    • S
      ./configure: add link check for nss-smartcard · 5f01e06f
      Sergei Trofimovich 提交于
      Current './configure --static && make' fails for me:
      
          LINK  qemu-nbd
          /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lssl3
          /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsmime3
          /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnssutil3
          /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnss3
          /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lplds4
          /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lplc4
          /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnspr4
      
      My system does not provide static libraries for nss, so
      fix autoconfiguration by link checking.
      Signed-off-by: NSergei Trofimovich <slyfox@gentoo.org>
      CC: qemu-trivial <qemu-trivial@nongnu.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      5f01e06f
    • S
      ./configure: request pkg-config to provide private libs when static linking · 17884d7b
      Sergei Trofimovich 提交于
      Added wrapper around pkg-config to allow:
      - safe options injection via ${QEMU_PKG_CONFIG_FLAGS}
      - spaces in path to pkg-config
      Signed-off-by: NSergei Trofimovich <slyfox@gentoo.org>
      CC: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      17884d7b
  7. 28 1月, 2012 1 次提交
    • A
      qom: add the base Object class (v2) · 2f28d2ff
      Anthony Liguori 提交于
      This class provides the main building block for QEMU Object Model and is
      extensively documented in the header file.  It is largely inspired by GObject.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ---
      v1 -> v2
       - remove printf() in type registration
       - fix typo in comment (Paolo)
       - make Interface private
       - move object into a new directory and move header into include/qemu/
       - don't make object.h depend on qemu-common.h
       - remove Type and replace it with TypeImpl * (Paolo)
       - use hash table to store types (Paolo)
       - aggressively cache parent type (Paolo)
       - make a type_register and use it with interfaces (Paolo)
       - fix interface cast comment (Paolo)
       - add a few more functions required in later series
      2f28d2ff
  8. 27 1月, 2012 1 次提交
  9. 19 1月, 2012 1 次提交
  10. 13 1月, 2012 9 次提交
  11. 06 1月, 2012 3 次提交
  12. 04 1月, 2012 1 次提交
  13. 19 12月, 2011 11 次提交
  14. 11 12月, 2011 1 次提交
    • S
      w32: QEMU applications with SDL are always GUI applications · 946fc459
      Stefan Weil 提交于
      Since commit 1d14ffa9 (in 2005),
      QEMU applications on W32 don't use the default SDL compiler flags:
      
      Instead of a GUI application, a console application is created.
      
      This has disadvantages (there is always an empty console window) and
      no obvious reason, so this patch removes the strange flag modification.
      
      The SDL GUI applications still can be run from a console window
      and even send stdout and stderr to that console by setting environment
      variable SDL_STDIO_REDIRECT=no.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      946fc459