• Radim Krčmář's avatar
    KVM: i8254: remove unnecessary uses of PIT state lock · b39c90b6
    Radim Krčmář authored
    - kvm_create_pit had to lock only because it exposed kvm->arch.vpit very
      early, but initialization doesn't use kvm->arch.vpit since the last
      patch, so we can drop locking.
    - kvm_free_pit is only run after there are no users of KVM and therefore
      is the sole actor.
    - Locking in kvm_vm_ioctl_reinject doesn't do anything, because reinject
      is only protected at that place.
    - kvm_pit_reset isn't used anywhere and its locking can be dropped if we
      hide it.
    
    Removing useless locking allows to see what actually is being protected
    by PIT state lock (values accessible from the guest).
    Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    b39c90b6
x86.c 214 KB