1. 30 1月, 2019 4 次提交
    • Y
      usb: XHCI shall not halt isochronous endpoints · a587c832
      Yuri Benditovich 提交于
      According to the XHCI spec (4.10.2) the controller
      never halts isochronous endpoints. This commit prevent
      stop of isochronous streaming when sporadic errors
      status received from backends.
      Signed-off-by: NYuri Benditovich <yuri.benditovich@janustech.com>
      Message-id: 20190128200444.5128-2-yuri.benditovich@janustech.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      a587c832
    • T
      hw/usb: Fix LGPL information in the file headers · 75a49fc6
      Thomas Huth 提交于
      It's either "GNU *Library* General Public version 2" or "GNU Lesser
      General Public version *2.1*", but there was no "version 2.0" of the
      "Lesser" library. So assume that version 2.1 is meant here.
      Additionally, suggest that the user should have received a copy of
      the LGPL, and not the GPL here.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1548254454-7659-1-git-send-email-thuth@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      75a49fc6
    • L
      usb: dev-mtp: close fd in usb_mtp_object_readdir() · 6e3c1a68
      Li Qiang 提交于
      Spotted by Coverity: CID 1397070
      Signed-off-by: NLi Qiang <liq3ea@163.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-id: 20190103133113.49599-1-liq3ea@163.com
      
      [ kraxel: dropped chunk which adds close() after successful
                fdopendir() call, that is not needed according to
                POSIX even though Coverity flags it as bug ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      6e3c1a68
    • G
      usb: assign unique serial numbers to hid devices · b63e1050
      Gerd Hoffmann 提交于
      Windows guests have trouble dealing with usb devices having identical
      serial numbers.  So, assign unique serial numbers to usb hid devices.
      All other usb devices have this already.
      
      In the past the fixed serial number has been used to indicate working
      remote setup to linux guests.  Here is a bit of history:
      
       * First there was nothing.
       * Then I added a rule to udev checking for serial == 42.
         (this is in rhel-6).
       * Then systemd + udev merged.
       * Then I changed the rule to check for serial != 1 instead, so we can
         use any serial but "1" which is the one the old broken devices had
         (this is in rhel-7).  March 2014 in upstream systemd.
       * Then all usb power management rules where dropped from systemd (June
         2015).  Which I figured today (Sept 2018), after wondering that the
         rules are gone in fedora 28.
      
      So, three years ago the serial number check was dropped upstream, yet I
      hav't seen a single report about autosuspend issues (or cpu usage for
      usb emulation going up, which is the typical symtom).
      
      So I figured I can stop worring that changing the serial number will
      break things and just do it.
      
      And even if it turns out autosuspend is still an issue:  I think
      meanwhile we can really stop worrying about guests running in old qemu
      versions with broken usb suspend (fixed in 0.13 !).  If needed we can
      enable autosuspend unconditionally in guests.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20190110125108.22834-1-kraxel@redhat.com
      b63e1050
  2. 29 1月, 2019 25 次提交
  3. 28 1月, 2019 11 次提交
    • R
      cputlb: Remove static tlb sizing · e77c89fb
      Richard Henderson 提交于
      Now that all tcg backends support TCG_TARGET_IMPLEMENTS_DYN_TLB,
      remove the define and the old code.
      Reviewed-by: NAlistair Francis <alistair.francis@wdc.com>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      e77c89fb
    • R
      tcg/tci: enable dynamic TLB sizing · 0a9a83d6
      Richard Henderson 提交于
      This is automatic due to TCI using the other softtlb macros.
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      0a9a83d6
    • R
      ac33373e
    • R
      tcg/mips: Fix tcg_out_qemu_ld_slow_path · a31aa4ce
      Richard Henderson 提交于
      Patch the branch after it has been emitted rather
      than before it exists.
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      a31aa4ce
    • R
      cd7d3cb7
    • R
    • R
      4f47e338
    • R
      17ff9f78
    • R
      644f591a
    • R
    • E
      tcg/i386: enable dynamic TLB sizing · 54eaf40b
      Emilio G. Cota 提交于
      As the following experiments show, this series is a net perf gain,
      particularly for memory-heavy workloads. Experiments are run on an
      Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz.
      
      1. System boot + shudown, debian aarch64:
      
      - Before (v3.1.0):
       Performance counter stats for './die.sh v3.1.0' (10 runs):
      
             9019.797015      task-clock (msec)         #    0.993 CPUs utilized            ( +-  0.23% )
          29,910,312,379      cycles                    #    3.316 GHz                      ( +-  0.14% )
          54,699,252,014      instructions              #    1.83  insn per cycle           ( +-  0.08% )
          10,061,951,686      branches                  # 1115.541 M/sec                    ( +-  0.08% )
             172,966,530      branch-misses             #    1.72% of all branches          ( +-  0.07% )
      
             9.084039051 seconds time elapsed                                          ( +-  0.23% )
      
      - After:
       Performance counter stats for './die.sh tlb-dyn-v5' (10 runs):
      
             8624.084842      task-clock (msec)         #    0.993 CPUs utilized            ( +-  0.23% )
          28,556,123,404      cycles                    #    3.311 GHz                      ( +-  0.13% )
          51,755,089,512      instructions              #    1.81  insn per cycle           ( +-  0.05% )
           9,526,513,946      branches                  # 1104.641 M/sec                    ( +-  0.05% )
             166,578,509      branch-misses             #    1.75% of all branches          ( +-  0.19% )
      
             8.680540350 seconds time elapsed                                          ( +-  0.24% )
      
      That is, a 4.4% perf increase.
      
      2. System boot + shutdown, ubuntu 18.04 x86_64:
      
      - Before (v3.1.0):
            56100.574751      task-clock (msec)         #    1.016 CPUs utilized            ( +-  4.81% )
         200,745,466,128      cycles                    #    3.578 GHz                      ( +-  5.24% )
         431,949,100,608      instructions              #    2.15  insn per cycle           ( +-  5.65% )
          77,502,383,330      branches                  # 1381.490 M/sec                    ( +-  6.18% )
             844,681,191      branch-misses             #    1.09% of all branches          ( +-  3.82% )
      
            55.221556378 seconds time elapsed                                          ( +-  5.01% )
      
      - After:
            56603.419540      task-clock (msec)         #    1.019 CPUs utilized            ( +- 10.19% )
         202,217,930,479      cycles                    #    3.573 GHz                      ( +- 10.69% )
         439,336,291,626      instructions              #    2.17  insn per cycle           ( +- 14.14% )
          80,538,357,447      branches                  # 1422.853 M/sec                    ( +- 16.09% )
             776,321,622      branch-misses             #    0.96% of all branches          ( +-  3.77% )
      
            55.549661409 seconds time elapsed                                          ( +- 10.44% )
      
      No improvement (within noise range). Note that for this workload,
      increasing the time window too much can lead to perf degradation,
      since it flushes the TLB *very* frequently.
      
      3. x86_64 SPEC06int:
      
                 x86_64-softmmu speedup vs. v3.1.0 for SPEC06int (test set)
                  Host: Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz (Skylake)
      
      5.5 +------------------------------------------------------------------------+
          |                   +-+                                                  |
        5 |-+.................+-+...............................tlb-dyn-v5.......+-|
          |                   * *                                                  |
      4.5 |-+.................*.*................................................+-|
          |                   * *                                                  |
        4 |-+.................*.*................................................+-|
          |                   * *                                                  |
      3.5 |-+.................*.*................................................+-|
          |                   * *                                                  |
        3 |-+......+-+*.......*.*................................................+-|
          |        *  *       * *                                                  |
      2.5 |-+......*..*.......*.*.................................+-+*...........+-|
          |        *  *       * *                                 *  *             |
        2 |-+......*..*.......*.*.................................*..*...........+-|
          |        *  *       * *                                 *  *  +-+        |
      1.5 |-+......*..*.......*.*.................................*..*.*+-+.*+-+.+-|
          |        *  * *+-+  * *  +-+       *+-+  +-+       +-+  *  * *  * *  *   |
        1 |++++-+*+*++*+*++*++*+*++*+*+++-+*+*+-++*+-++++-++++-+++*++*+*++*+*++*+++|
          |   *  * *  * *  *  * *  * *  *  * *  * *  *  * *  * *  *  * *  * *  *   |
      0.5 +------------------------------------------------------------------------+
        400.perlb401.bzip403.g429445.g456.hm462.libq464.h471.omn47483.xalancbgeomean
        png: https://imgur.com/YRF90f7
      
      That is, a 1.51x average speedup over the baseline, with a max speedup
      of 5.17x.
      
      Here's a different look at the SPEC06int results, using KVM as the baseline:
      
                   x86_64-softmmu slowdown vs. KVM for SPEC06int (test set)
                   Host: Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz (Skylake)
      
      25 +---------------------------------------------------------------------------+
         |                   +-+                                        +-+          |
         |                   * *                             +-+      v3.1.0         |
         |                   * *                             +-+  tlb-dyn-v5         |
         |                   * *                             * *        +-+          |
      20 |-+.................*.*.............................*.+-+......*.*........+-|
         |                   * *                             * # #      * *          |
         |        +-+        * *                             * # #      * *          |
         |        * *        * *                             * # #      * *          |
      15 |-+......*.*........*.*.............................*.#.#......*.+-+......+-|
         |        * *        * *                             * # #      * #|#        |
         |        * *        * *        +-+                  * # #      * +-+        |
         |        * *  +-+   * *        ++-+       +-+       * # #      * # # +-+    |
         |        * *  +-+   * *        * ##       *|   +-+  * # #      * # # +-+    |
      10 |-+......*.*..*.+-+.*.*........*.##.......++-+.*.+-+*.#.#......*.#.#.*.*..+-|
         |        * *  * +-+ * *        * ## +-+   *# # * # #* # # +-+  * # # * *    |
         |        * *  * # # * *  +-+   * ## * +-+ *# # * # #* # # * *  * # # *+-+   |
         |        * *  * # # * *  * +-+ * ## * # # *# # * # #* # # * *  * # # * ##   |
       5 |-+......*.+-+*.#.#.*.*..*.#.#.*.##.*.#.#.*#.#.*.#.#*.#.#.*.*..*.#.#.*.##.+-|
         |        * # #* # # * +-+* # # * ## * # # *# # * # #* # # * *  * # # * ##   |
         |        * # #* # # * # #* # # * ## * # # *# # * # #* # # * +-+* # # * ##   |
         |   ++-+ * # #* # # * # #* # # * ## * # # *# # * # #* # # * # #* # # * ##   |
         |+++*#+#+*+#+#*+#+#+*+#+#*+#+#+*+##+*+#+#+*#+#+*+#+#*+#+#+*+#+#*+#+#+*+##+++|
       0 +---------------------------------------------------------------------------+
       400.perlbe401.bzi403.gc429445.go456.h462.libqu464.h471.omne4483.xalancbmgeomean
        png: https://imgur.com/YzAMNEV
      
      After this series, we bring down the average SPEC06int slowdown vs KVM
      from 11.47x to 7.58x.
      Tested-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      Message-Id: <20190116170114.26802-4-cota@braap.org>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      54eaf40b