1. 18 4月, 2012 1 次提交
    • L
      tracetool: Rewrite infrastructure as python modules · 650ab98d
      Lluís Vilanova 提交于
      The tracetool script is written in shell and has hit several portability
      problems due to shell quirks or external tools across host platforms.
      Additionally the amount of string processing and lack of real data
      structures makes it tough to implement code generator backends for
      tracers that are more complex.
      
      This patch replaces the shell version of tracetool with a Python
      version.  The new tracetool design is:
      
        scripts/tracetool.py - top-level script
        scripts/tracetool/backend/ - tracer backends live here (simple, ust)
        scripts/tracetool/format/  - output formats live here (.c, .h)
      
      There is common code for trace-events definition parsing so that
      backends can focus on generating code rather than parsing input.
      
      Support for all existing backends (nop, stderr, simple, ust,
      and dtrace) is added back in follow-up patches.
      
      [Commit description written by Stefan Hajnoczi]
      Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      650ab98d
  2. 17 4月, 2012 1 次提交
  3. 13 4月, 2012 1 次提交
  4. 12 4月, 2012 2 次提交
  5. 07 4月, 2012 2 次提交
  6. 03 4月, 2012 3 次提交
  7. 02 4月, 2012 1 次提交
  8. 01 4月, 2012 1 次提交
  9. 31 3月, 2012 2 次提交
    • G
      buildfix: check for old pod2man versions · 94dd53c5
      Gerd Hoffmann 提交于
      Older pod2man don't have a --utf8 switch, check for this in conffigure
      and use it only when present.  Fixes build on RHEL-5.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      94dd53c5
    • S
      Fix conversion from lower to upper case with Turkish locale · bb55b712
      Stefan Weil 提交于
      Some locale settings let make fail or create wrong results
      because tr '[:lower:]' '[:upper:]' which is used to convert
      from lower to upper case depends on the locale.
      
      With locale tr_TR.UTF-8, lower case 'i' is not converted to 'I'.
      This results in wrong entries in config-host.h like these ones:
      
        #define CONFIG_QEMU_PREFiX "/usr/local"
        #define CONFIG_QEMU_BiNDiR "/usr/local/bin"
      
      This problem was reported by Emre Ersin.
      
      The same problem occurs when configure creates the target specific
      files config-target.mak. They get wrong declarations:
      
      TARGET_CRiS=y
      TARGET_i386=y
      TARGET_MiCROBLAZE=y
      TARGET_MiPS64=y
      TARGET_MiPS=y
      TARGET_UNiCORE32=y
      
      It is sufficient to restrict the conversion to the characters a-z.
      
      Using this explicit range avoids the dependency on the locale
      settings and is also shorter.
      
      v2:
      POSIX says that 'tr a-z' is unspecified outside of the POSIX
      locale, so we must set LC_ALL=C to make sure that we are using
      POSIX (hint from Eric Blake, thanks).
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      bb55b712
  10. 25 3月, 2012 1 次提交
  11. 18 3月, 2012 1 次提交
  12. 15 3月, 2012 1 次提交
    • A
      qom: Introduce CPU class · dd83b06a
      Andreas Färber 提交于
      Reintroduce CPUState as QOM object: It's abstract and derived directly
      from TYPE_OBJECT for compatibility with the user emulators.
      The identifier CPUState avoids conflicts between CPU() and the struct.
      
      Introduce $(qom-twice-y) to build it separately for system and for user
      emulators.
      
      Prepare a virtual reset method, (re)introduce cpu_reset() as wrapper.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      dd83b06a
  13. 13 3月, 2012 2 次提交
  14. 12 3月, 2012 2 次提交
  15. 11 3月, 2012 1 次提交
  16. 08 3月, 2012 3 次提交
  17. 02 3月, 2012 1 次提交
  18. 29 2月, 2012 1 次提交
  19. 27 2月, 2012 3 次提交
  20. 25 2月, 2012 2 次提交
  21. 24 2月, 2012 2 次提交
  22. 17 2月, 2012 2 次提交
  23. 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
  24. 02 2月, 2012 3 次提交
    • 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