1. 30 11月, 2015 12 次提交
  2. 19 11月, 2015 4 次提交
  3. 29 10月, 2015 3 次提交
    • C
      KVM: s390: use simple switch statement as multiplexer · 46b708ea
      Christian Borntraeger 提交于
      We currently do some magic shifting (by exploiting that exit codes
      are always a multiple of 4) and a table lookup to jump into the
      exit handlers. This causes some calculations and checks, just to
      do an potentially expensive function call.
      
      Changing that to a switch statement gives the compiler the chance
      to inline and dynamically decide between jump tables or inline
      compare and branches. In addition it makes the code more readable.
      
      bloat-o-meter gives me a small reduction in code size:
      
      add/remove: 0/7 grow/shrink: 1/1 up/down: 986/-1334 (-348)
      function                                     old     new   delta
      kvm_handle_sie_intercept                      72    1058    +986
      handle_prog                                  704     696      -8
      handle_noop                                   54       -     -54
      handle_partial_execution                      60       -     -60
      intercept_funcs                              120       -    -120
      handle_instruction                           198       -    -198
      handle_validity                              210       -    -210
      handle_stop                                  316       -    -316
      handle_external_interrupt                    368       -    -368
      
      Right now my gcc does conditional branches instead of jump tables.
      The inlining seems to give us enough cycles as some micro-benchmarking
      shows minimal improvements, but still in noise.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      46b708ea
    • C
      KVM: s390: drop useless newline in debugging data · 58c383c6
      Christian Borntraeger 提交于
      the s390 debug feature does not need newlines. In fact it will
      result in empty lines. Get rid of 4 leftovers.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      58c383c6
    • D
      KVM: s390: SCA must not cross page boundaries · c5c2c393
      David Hildenbrand 提交于
      We seemed to have missed a few corner cases in commit f6c137ff
      ("KVM: s390: randomize sca address").
      
      The SCA has a maximum size of 2112 bytes. By setting the sca_offset to
      some unlucky numbers, we exceed the page.
      
      0x7c0 (1984) -> Fits exactly
      0x7d0 (2000) -> 16 bytes out
      0x7e0 (2016) -> 32 bytes out
      0x7f0 (2032) -> 48 bytes out
      
      One VCPU entry is 32 bytes long.
      
      For the last two cases, we actually write data to the other page.
      1. The address of the VCPU.
      2. Injection/delivery/clearing of SIGP externall calls via SIGP IF.
      
      Especially the 2. happens regularly. So this could produce two problems:
      1. The guest losing/getting external calls.
      2. Random memory overwrites in the host.
      
      So this problem happens on every 127 + 128 created VM with 64 VCPUs.
      
      Cc: stable@vger.kernel.org # v3.15+
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      c5c2c393
  4. 14 10月, 2015 1 次提交
  5. 13 10月, 2015 10 次提交
  6. 16 9月, 2015 2 次提交
  7. 07 8月, 2015 1 次提交
  8. 04 8月, 2015 1 次提交
  9. 03 8月, 2015 1 次提交
  10. 30 7月, 2015 1 次提交
    • C
      KVM: s390: Fix hang VCPU hang/loop regression · 586b7ccd
      Christian Borntraeger 提交于
      commit 785dbef4 ("KVM: s390: optimize round trip time in request
      handling") introduced a regression. This regression was seen with
      CPU hotplug in the guest and switching between 1 or 2 CPUs. This will
      set/reset the IBS control via synced request.
      
      Whenever we make a synced request, we first set the vcpu->requests
      bit and then block the vcpu. The handler, on the other hand, unblocks
      itself, processes vcpu->requests (by clearing them) and unblocks itself
      once again.
      
      Now, if the requester sleeps between setting of vcpu->requests and
      blocking, the handler will clear the vcpu->requests bit and try to
      unblock itself (although no bit is set). When the requester wakes up,
      it blocks the VCPU and we have a blocked VCPU without requests.
      
      Solution is to always unset the block bit.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Fixes: 785dbef4 ("KVM: s390: optimize round trip time in request handling")
      586b7ccd
  11. 29 7月, 2015 4 次提交