1. 27 Dec, 2009 2 commits
    • Sheng Yang's avatar
      KVM: Fix possible circular locking in kvm_vm_ioctl_assign_device() · fae3a353
      Sheng Yang authored
      One possible order is:
      
      KVM_CREATE_IRQCHIP ioctl(took kvm->lock) -> kvm_iobus_register_dev() ->
      down_write(kvm->slots_lock).
      
      The other one is in kvm_vm_ioctl_assign_device(), which take kvm->slots_lock
      first, then kvm->lock.
      
      Update the comment of lock order as well.
      
      Observe it due to kernel locking debug warnings.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarSheng Yang <sheng@linux.intel.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      fae3a353
    • Marcelo Tosatti's avatar
      KVM: MMU: remove prefault from invlpg handler · fb341f57
      Marcelo Tosatti authored
      The invlpg prefault optimization breaks Windows 2008 R2 occasionally.
      
      The visible effect is that the invlpg handler instantiates a pte which
      is, microseconds later, written with a different gfn by another vcpu.
      
      The OS could have other mechanisms to prevent a present translation from
      being used, which the hypervisor is unaware of.
      
      While the documentation states that the cpu is at liberty to prefetch tlb
      entries, it looks like this is not heeded, so remove tlb prefetch from
      invlpg.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      fb341f57
  2. 24 Dec, 2009 38 commits