1. 15 1月, 2014 1 次提交
  2. 09 1月, 2014 1 次提交
  3. 26 8月, 2013 1 次提交
  4. 25 7月, 2013 2 次提交
  5. 27 6月, 2013 1 次提交
  6. 03 6月, 2013 1 次提交
    • G
      KVM: Fix race in apic->pending_events processing · 299018f4
      Gleb Natapov 提交于
      apic->pending_events processing has a race that may cause INIT and
      SIPI
      processing to be reordered:
      
      vpu0:                            vcpu1:
      set INIT
                                     test_and_clear_bit(KVM_APIC_INIT)
                                        process INIT
      set INIT
      set SIPI
                                     test_and_clear_bit(KVM_APIC_SIPI)
                                        process SIPI
      
      At the end INIT is left pending in pending_events. The following patch
      fixes this by latching pending event before processing them.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      299018f4
  7. 14 5月, 2013 1 次提交
  8. 17 4月, 2013 4 次提交
  9. 16 4月, 2013 3 次提交
  10. 07 4月, 2013 2 次提交
  11. 13 3月, 2013 1 次提交
    • J
      KVM: x86: Rework INIT and SIPI handling · 66450a21
      Jan Kiszka 提交于
      A VCPU sending INIT or SIPI to some other VCPU races for setting the
      remote VCPU's mp_state. When we were unlucky, KVM_MP_STATE_INIT_RECEIVED
      was overwritten by kvm_emulate_halt and, thus, got lost.
      
      This introduces APIC events for those two signals, keeping them in
      kvm_apic until kvm_apic_accept_events is run over the target vcpu
      context. kvm_apic_has_events reports to kvm_arch_vcpu_runnable if there
      are pending events, thus if vcpu blocking should end.
      
      The patch comes with the side effect of effectively obsoleting
      KVM_MP_STATE_SIPI_RECEIVED. We still accept it from user space, but
      immediately translate it to KVM_MP_STATE_INIT_RECEIVED + KVM_APIC_SIPI.
      The vcpu itself will no longer enter the KVM_MP_STATE_SIPI_RECEIVED
      state. That also means we no longer exit to user space after receiving a
      SIPI event.
      
      Furthermore, we already reset the VCPU on INIT, only fixing up the code
      segment later on when SIPI arrives. Moreover, we fix INIT handling for
      the BSP: it never enter wait-for-SIPI but directly starts over on INIT.
      Tested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      66450a21
  12. 29 1月, 2013 3 次提交
  13. 28 11月, 2012 1 次提交
  14. 23 10月, 2012 1 次提交
  15. 20 9月, 2012 1 次提交
  16. 13 9月, 2012 1 次提交
  17. 05 9月, 2012 1 次提交
  18. 09 8月, 2012 1 次提交
  19. 07 8月, 2012 4 次提交
  20. 06 8月, 2012 2 次提交
  21. 01 8月, 2012 2 次提交
  22. 31 7月, 2012 1 次提交
  23. 21 7月, 2012 1 次提交
  24. 25 6月, 2012 2 次提交
    • M
      KVM: host side for eoi optimization · ae7a2a3f
      Michael S. Tsirkin 提交于
      Implementation of PV EOI using shared memory.
      This reduces the number of exits an interrupt
      causes as much as by half.
      
      The idea is simple: there's a bit, per APIC, in guest memory,
      that tells the guest that it does not need EOI.
      We set it before injecting an interrupt and clear
      before injecting a nested one. Guest tests it using
      a test and clear operation - this is necessary
      so that host can detect interrupt nesting -
      and if set, it can skip the EOI MSR.
      
      There's a new MSR to set the address of said register
      in guest memory. Otherwise not much changed:
      - Guest EOI is not required
      - Register is tested & ISR is automatically cleared on exit
      
      For testing results see description of previous patch
      'kvm_para: guest side for eoi avoidance'.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      ae7a2a3f
    • M
      KVM: optimize ISR lookups · 8680b94b
      Michael S. Tsirkin 提交于
      We perform ISR lookups twice: during interrupt
      injection and on EOI. Typical workloads only have
      a single bit set there. So we can avoid ISR scans by
      1. counting bits as we set/clear them in ISR
      2. on set, caching the injected vector number
      3. on clear, invalidating the cache
      
      The real purpose of this is enabling PV EOI
      which needs to quickly validate the vector.
      But non PV guests also benefit: with this patch,
      and without interrupt nesting, apic_find_highest_isr
      will always return immediately without scanning ISR.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      8680b94b
  25. 24 4月, 2012 1 次提交