Skip to content
  • Roland McGrath's avatar
    x86 ptrace: avoid unnecessary wrmsr · 4ba51fd7
    Roland McGrath authored
    
    
    This avoids using wrmsr on MSR_IA32_DEBUGCTLMSR when it's not needed.
    No wrmsr ever needs to be done if noone has ever used block stepping.
    
    Without this change, using ptrace on 2.6.25 on an x86 KVM guest
    will tickle KVM's missing support for the MSR and crash the guest
    kernel.  Though host KVM is the buggy one, this makes for a regression
    in the guest behavior from 2.6.24->2.6.25 that we can easily avoid.
    
    I also corrected some bad whitespace.
    
    Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    4ba51fd7