Skip to content

Commit 482e73e

Browse files
mstsirkingregkh
authored andcommitted
kvm: fix typo in flag name
commit 766d357 upstream. KVM_X86_DISABLE_EXITS_HTL really refers to exit on halt. Obviously a typo: should be named KVM_X86_DISABLE_EXITS_HLT. Fixes: caa057a ("KVM: X86: Provide a capability to disable HLT intercepts") Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a0f33fd commit 482e73e

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

arch/x86/kvm/x86.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,7 +2894,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
28942894
r = KVM_CLOCK_TSC_STABLE;
28952895
break;
28962896
case KVM_CAP_X86_DISABLE_EXITS:
2897-
r |= KVM_X86_DISABLE_EXITS_HTL | KVM_X86_DISABLE_EXITS_PAUSE;
2897+
r |= KVM_X86_DISABLE_EXITS_HLT | KVM_X86_DISABLE_EXITS_PAUSE;
28982898
if(kvm_can_mwait_in_guest())
28992899
r |= KVM_X86_DISABLE_EXITS_MWAIT;
29002900
break;
@@ -4248,7 +4248,7 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
42484248
if ((cap->args[0] & KVM_X86_DISABLE_EXITS_MWAIT) &&
42494249
kvm_can_mwait_in_guest())
42504250
kvm->arch.mwait_in_guest = true;
4251-
if (cap->args[0] & KVM_X86_DISABLE_EXITS_HTL)
4251+
if (cap->args[0] & KVM_X86_DISABLE_EXITS_HLT)
42524252
kvm->arch.hlt_in_guest = true;
42534253
if (cap->args[0] & KVM_X86_DISABLE_EXITS_PAUSE)
42544254
kvm->arch.pause_in_guest = true;

include/uapi/linux/kvm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,10 @@ struct kvm_ioeventfd {
677677
};
678678

679679
#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
680-
#define KVM_X86_DISABLE_EXITS_HTL (1 << 1)
680+
#define KVM_X86_DISABLE_EXITS_HLT (1 << 1)
681681
#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
682682
#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
683-
KVM_X86_DISABLE_EXITS_HTL | \
683+
KVM_X86_DISABLE_EXITS_HLT | \
684684
KVM_X86_DISABLE_EXITS_PAUSE)
685685

686686
/* for KVM_ENABLE_CAP */

tools/include/uapi/linux/kvm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,10 @@ struct kvm_ioeventfd {
677677
};
678678

679679
#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
680-
#define KVM_X86_DISABLE_EXITS_HTL (1 << 1)
680+
#define KVM_X86_DISABLE_EXITS_HLT (1 << 1)
681681
#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
682682
#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
683-
KVM_X86_DISABLE_EXITS_HTL | \
683+
KVM_X86_DISABLE_EXITS_HLT | \
684684
KVM_X86_DISABLE_EXITS_PAUSE)
685685

686686
/* for KVM_ENABLE_CAP */

0 commit comments

Comments
 (0)