1. 29 1月, 2018 1 次提交
    • T
      net: Allow hubports to connect to other netdevs · 18d65d22
      Thomas Huth 提交于
      QEMU can emulate hubs to connect NICs and netdevs. This is currently
      primarily used for the mis-named 'vlan' feature of the networking
      subsystem. Now the 'vlan' feature has been marked as deprecated, since
      its name is rather confusing and the users often rather mis-configure
      their network when trying to use it. But while the 'vlan' parameter
      should be removed at one point in time, the basic idea of emulating
      a hub in QEMU is still good: It's useful for bundling up the output of
      multiple NICs into one single l2tp netdev for example.
      
      Now to be able to use the hubport feature without 'vlan's, there is one
      missing piece: The possibility to connect a hubport to a netdev, too.
      This patch adds this possibility by introducing a new "netdev=..."
      parameter to the hubports.
      
      To bundle up the output of multiple NICs into one socket netdev, you can
      now run QEMU with these parameters for example:
      
      qemu-system-ppc64 ... -netdev socket,id=s1,connect=:11122 \
          -netdev hubport,hubid=1,id=h1,netdev=s1 \
          -netdev hubport,hubid=1,id=h2 -device e1000,netdev=h2 \
          -netdev hubport,hubid=1,id=h3 -device virtio-net-pci,netdev=h3
      
      For using the socket netdev, you have got to start another QEMU as the
      receiving side first, for example with network dumping enabled:
      
      qemu-system-x86_64 -M isapc -netdev socket,id=s0,listen=:11122 \
          -device ne2k_isa,netdev=s0 \
          -object filter-dump,id=f1,netdev=s0,file=/tmp/dump.dat
      
      After the ppc64 guest tried to boot from both NICs, you can see in the
      dump file (using Wireshark, for example), that the output of both NICs
      (the e1000 and the virtio-net-pci) has been successfully transfered
      via the socket netdev in this case.
      Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      18d65d22
  2. 26 1月, 2018 1 次提交
    • T
      usb: Remove legacy -usbdevice options (host, serial, disk and net) · 99761176
      Thomas Huth 提交于
      The option have been marked as deprecated since QEMU 2.10, and so far
      nobody complained that the host, serial, disk and net options are urgently
      required anymore. So let's now get rid at least of this legacy pile, to
      simplify the usb code quite a bit.
      
      This patch removes the usbdevices host, serial, disk and net. These devices
      use their own complicated parameter parsing mechanisms, so they are just
      ugly to maintain, without real benefit for the users (the users can use the
      corresponding "-device" parameters instead which have the same complexity
      as the "-usbdevice" devices here).
      
      Note that the other rather simple -usbdevice options (mouse, tablet, etc.)
      are not removed yet (the code is really simple here, so it does not hurt
      much to keep it), as well as the two devices "braille" and "bt" which are
      easier to use with -usbdevice than with -device.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1515519171-20315-1-git-send-email-thuth@redhat.com
      
      [kraxel] delete some usb_host_device_open() leftovers.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      99761176
  3. 19 1月, 2018 4 次提交
  4. 22 12月, 2017 3 次提交
    • T
      block: Remove the deprecated -hdachs option · d1cdd92e
      Thomas Huth 提交于
      It's been marked as deprecated since QEMU v2.10.0, and so far nobody
      complained that we should keep it, so let's remove this legacy option
      now to simplify the code quite a bit.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d1cdd92e
    • S
      i386: hvf: add code base from Google's QEMU repository · c97d6d2c
      Sergio Andres Gomez Del Real 提交于
      This file begins tracking the files that will be the code base for HVF
      support in QEMU. This code base is part of Google's QEMU version of
      their Android emulator, and can be found at
      https://android.googlesource.com/platform/external/qemu/+/emu-master-dev
      
      This code is based on Veertu Inc's vdhh (Veertu Desktop Hosted
      Hypervisor), found at https://github.com/veertuinc/vdhh. Everything is
      appropriately licensed under GPL v2-or-later, except for the code inside
      x86_task.c and x86_task.h, which, deriving from KVM (the Linux kernel),
      is licensed GPL v2-only.
      
      This code base already implements a very great deal of functionality,
      although Google's version removed from Vertuu's the support for APIC
      page and hyperv-related stuff. According to the Android Emulator Release
      Notes, Revision 26.1.3 (August 2017), "Hypervisor.framework is now
      enabled by default on macOS for 32-bit x86 images to improve performance
      and macOS compatibility", although we better use with caution for, as the
      same Revision warns us, "If you experience issues with it specifically,
      please file a bug report...". The code hasn't seen much update in the
      last 5 months, so I think that we can further develop the code with
      occasional visiting Google's repository to see if there has been any
      update.
      
      On top of Google's code, the following changes were made:
      
      - add code to the configure script to support the --enable-hvf argument.
      If the OS is Darwin, it checks for presence of HVF in the system. The
      patch also adds strings related to HVF in the file qemu-options.hx.
      QEMU will only support the modern syntax style '-M accel=hvf' no enable
      hvf; the legacy '-enable-hvf' will not be supported.
      
      - fix styling issues
      
      - add glue code to cpus.c
      
      - move HVFX86EmulatorState field to CPUX86State, changing the
      the emulation functions to have a parameter with signature 'CPUX86State *'
      instead of 'CPUState *' so we don't have to get the 'env'.
      Signed-off-by: NSergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com>
      Message-Id: <20170913090522.4022-2-Sergio.G.DelReal@gmail.com>
      Message-Id: <20170913090522.4022-3-Sergio.G.DelReal@gmail.com>
      Message-Id: <20170913090522.4022-5-Sergio.G.DelReal@gmail.com>
      Message-Id: <20170913090522.4022-6-Sergio.G.DelReal@gmail.com>
      Message-Id: <20170905035457.3753-7-Sergio.G.DelReal@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c97d6d2c
    • T
      qemu-doc: The "-net nic" option can be used with "netdev=...", too · 0e60a82d
      Thomas Huth 提交于
      Looks like we missed to document that it is also possible to specify
      a netdev with "-net nic" - which is very useful if you want to
      configure your on-board NIC to use a backend that has been specified
      with "-netdev".
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      0e60a82d
  5. 21 12月, 2017 1 次提交
  6. 20 12月, 2017 8 次提交
  7. 18 12月, 2017 1 次提交
  8. 15 12月, 2017 1 次提交
  9. 27 11月, 2017 1 次提交
  10. 20 11月, 2017 1 次提交
  11. 13 11月, 2017 1 次提交
  12. 13 10月, 2017 1 次提交
  13. 10 10月, 2017 1 次提交
  14. 26 9月, 2017 1 次提交
  15. 19 9月, 2017 1 次提交
  16. 15 9月, 2017 4 次提交
  17. 01 8月, 2017 1 次提交
  18. 17 7月, 2017 5 次提交
  19. 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
  20. 10 7月, 2017 1 次提交