1. 05 9月, 2012 3 次提交
  2. 31 8月, 2012 1 次提交
  3. 28 8月, 2012 1 次提交
  4. 22 8月, 2012 2 次提交
  5. 14 8月, 2012 1 次提交
  6. 09 8月, 2012 1 次提交
  7. 07 8月, 2012 2 次提交
  8. 06 8月, 2012 4 次提交
  9. 05 8月, 2012 1 次提交
  10. 04 8月, 2012 1 次提交
  11. 02 8月, 2012 1 次提交
    • B
      KVM: x86: apply kvmclock offset to guest wall clock time · 4b648665
      Bruce Rogers 提交于
      When a guest migrates to a new host, the system time difference from the
      previous host is used in the updates to the kvmclock system time visible
      to the guest, resulting in a continuation of correct kvmclock based guest
      timekeeping.
      
      The wall clock component of the kvmclock provided time is currently not
      updated with this same time offset. Since the Linux guest caches the
      wall clock based time, this discrepency is not noticed until the guest is
      rebooted. After reboot the guest's time calculations are off.
      
      This patch adjusts the wall clock by the kvmclock_offset, resulting in
      correct guest time after a reboot.
      
      Cc: Zachary Amsden <zamsden@gmail.com>
      Signed-off-by: NBruce Rogers <brogers@suse.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      4b648665
  12. 01 8月, 2012 1 次提交
  13. 26 7月, 2012 1 次提交
  14. 21 7月, 2012 1 次提交
  15. 20 7月, 2012 1 次提交
    • X
      KVM: x86: remove unnecessary mark_page_dirty · 9d3c92af
      Xiao Guangrong 提交于
      fix:
      [  132.474633] 3.5.0-rc1+ #50 Not tainted
      [  132.474634] -------------------------------
      [  132.474635] include/linux/kvm_host.h:369 suspicious rcu_dereference_check() usage!
      [  132.474636]
      [  132.474636] other info that might help us debug this:
      [  132.474636]
      [  132.474638]
      [  132.474638] rcu_scheduler_active = 1, debug_locks = 1
      [  132.474640] 1 lock held by qemu-kvm/2832:
      [  132.474657]  #0:  (&vcpu->mutex){+.+.+.}, at: [<ffffffffa01e1636>] vcpu_load+0x1e/0x91 [kvm]
      [  132.474658]
      [  132.474658] stack backtrace:
      [  132.474660] Pid: 2832, comm: qemu-kvm Not tainted 3.5.0-rc1+ #50
      [  132.474661] Call Trace:
      [  132.474665]  [<ffffffff81092f40>] lockdep_rcu_suspicious+0xfc/0x105
      [  132.474675]  [<ffffffffa01e0c85>] kvm_memslots+0x6d/0x75 [kvm]
      [  132.474683]  [<ffffffffa01e0ca1>] gfn_to_memslot+0x14/0x4c [kvm]
      [  132.474693]  [<ffffffffa01e3575>] mark_page_dirty+0x17/0x2a [kvm]
      [  132.474706]  [<ffffffffa01f21ea>] kvm_arch_vcpu_ioctl+0xbcf/0xc07 [kvm]
      
      Actually, we do not write vcpu->arch.time at this time, mark_page_dirty
      should be removed.
      Signed-off-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      9d3c92af
  16. 19 7月, 2012 1 次提交
  17. 12 7月, 2012 1 次提交
    • M
      KVM: VMX: Implement PCID/INVPCID for guests with EPT · ad756a16
      Mao, Junjie 提交于
      This patch handles PCID/INVPCID for guests.
      
      Process-context identifiers (PCIDs) are a facility by which a logical processor
      may cache information for multiple linear-address spaces so that the processor
      may retain cached information when software switches to a different linear
      address space. Refer to section 4.10.1 in IA32 Intel Software Developer's Manual
      Volume 3A for details.
      
      For guests with EPT, the PCID feature is enabled and INVPCID behaves as running
      natively.
      For guests without EPT, the PCID feature is disabled and INVPCID triggers #UD.
      Signed-off-by: NJunjie Mao <junjie.mao@intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      ad756a16
  18. 09 7月, 2012 1 次提交
  19. 25 6月, 2012 3 次提交
    • 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: rearrange injection cancelling code · d905c069
      Michael S. Tsirkin 提交于
      Each time we need to cancel injection we invoke same code
      (cancel_injection callback).  Move it towards the end of function using
      the familiar goto on error pattern.
      
      Will make it easier to do more cleanups for PV EOI.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d905c069
    • M
      KVM: only sync when attention bits set · 5cfb1d5a
      Michael S. Tsirkin 提交于
      Commit eb0dc6d0368072236dcd086d7fdc17fd3c4574d4 introduced apic
      attention bitmask but kvm still syncs lapic unconditionally.
      As that commit suggested and in anticipation of adding more attention
      bits, only sync lapic if(apic_attention).
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      5cfb1d5a
  20. 19 6月, 2012 1 次提交
  21. 06 6月, 2012 1 次提交
  22. 05 6月, 2012 1 次提交
  23. 17 5月, 2012 1 次提交
  24. 06 5月, 2012 1 次提交
    • G
      KVM: ensure async PF event wakes up vcpu from halt · a4fa1635
      Gleb Natapov 提交于
      If vcpu executes hlt instruction while async PF is waiting to be delivered
      vcpu can block and deliver async PF only after another even wakes it
      up. This happens because kvm_check_async_pf_completion() will remove
      completion event from vcpu->async_pf.done before entering kvm_vcpu_block()
      and this will make kvm_arch_vcpu_runnable() return false. The solution
      is to make vcpu runnable when processing completion.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      a4fa1635
  25. 21 4月, 2012 3 次提交
  26. 20 4月, 2012 1 次提交
    • A
      KVM: Fix page-crossing MMIO · f78146b0
      Avi Kivity 提交于
      MMIO that are split across a page boundary are currently broken - the
      code does not expect to be aborted by the exit to userspace for the
      first MMIO fragment.
      
      This patch fixes the problem by generalizing the current code for handling
      16-byte MMIOs to handle a number of "fragments", and changes the MMIO
      code to create those fragments.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      f78146b0
  27. 08 4月, 2012 3 次提交
    • T
      KVM: Switch to srcu-less get_dirty_log() · 60c34612
      Takuya Yoshikawa 提交于
      We have seen some problems of the current implementation of
      get_dirty_log() which uses synchronize_srcu_expedited() for updating
      dirty bitmaps; e.g. it is noticeable that this sometimes gives us ms
      order of latency when we use VGA displays.
      
      Furthermore the recent discussion on the following thread
          "srcu: Implement call_srcu()"
          http://lkml.org/lkml/2012/1/31/211
      also motivated us to implement get_dirty_log() without SRCU.
      
      This patch achieves this goal without sacrificing the performance of
      both VGA and live migration: in practice the new code is much faster
      than the old one unless we have too many dirty pages.
      
      Implementation:
      
      The key part of the implementation is the use of xchg() operation for
      clearing dirty bits atomically.  Since this allows us to update only
      BITS_PER_LONG pages at once, we need to iterate over the dirty bitmap
      until every dirty bit is cleared again for the next call.
      
      Although some people may worry about the problem of using the atomic
      memory instruction many times to the concurrently accessible bitmap,
      it is usually accessed with mmu_lock held and we rarely see concurrent
      accesses: so what we need to care about is the pure xchg() overheads.
      
      Another point to note is that we do not use for_each_set_bit() to check
      which ones in each BITS_PER_LONG pages are actually dirty.  Instead we
      simply use __ffs() in a loop.  This is much faster than repeatedly call
      find_next_bit().
      
      Performance:
      
      The dirty-log-perf unit test showed nice improvements, some times faster
      than before, except for some extreme cases; for such cases the speed of
      getting dirty page information is much faster than we process it in the
      userspace.
      
      For real workloads, both VGA and live migration, we have observed pure
      improvements: when the guest was reading a file during live migration,
      we originally saw a few ms of latency, but with the new method the
      latency was less than 200us.
      Signed-off-by: NTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      60c34612
    • T
      KVM: Avoid checking huge page mappings in get_dirty_log() · 5dc99b23
      Takuya Yoshikawa 提交于
      Dropped such mappings when we enabled dirty logging and we will never
      create new ones until we stop the logging.
      
      For this we introduce a new function which can be used to write protect
      a range of PT level pages: although we do not need to care about a range
      of pages at this point, the following patch will need this feature to
      optimize the write protection of many pages.
      Signed-off-by: NTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      5dc99b23
    • E
      KVM: x86: Add ioctl for KVM_KVMCLOCK_CTRL · 1c0b28c2
      Eric B Munson 提交于
      Now that we have a flag that will tell the guest it was suspended, create an
      interface for that communication using a KVM ioctl.
      Signed-off-by: NEric B Munson <emunson@mgebm.net>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      1c0b28c2