Skip to content

Commit 93f073a

Browse files
author
Maxim Levitsky
committed
KVM: x86: do not allow re-enabling quirks
JIRA: https://issues.redhat.com/browse/RHEL-47242 commit 9966b78 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Mon Mar 3 09:09:37 2025 -0500 KVM: x86: do not allow re-enabling quirks Allowing arbitrary re-enabling of quirks puts a limit on what the quirks themselves can do, since you cannot assume that the quirk prevents a particular state. More important, it also prevents KVM from disabling a quirk at VM creation time, because userspace can always go back and re-enable that. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
1 parent 60ee501 commit 93f073a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/x86.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6550,7 +6550,7 @@ int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
65506550
break;
65516551
fallthrough;
65526552
case KVM_CAP_DISABLE_QUIRKS:
6553-
kvm->arch.disabled_quirks = cap->args[0];
6553+
kvm->arch.disabled_quirks |= cap->args[0];
65546554
r = 0;
65556555
break;
65566556
case KVM_CAP_SPLIT_IRQCHIP: {

0 commit comments

Comments
 (0)