Skip to content

Commit 9966b78

Browse files
committed
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>
1 parent 26eab9a commit 9966b78

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
@@ -6533,7 +6533,7 @@ int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
65336533
break;
65346534
fallthrough;
65356535
case KVM_CAP_DISABLE_QUIRKS:
6536-
kvm->arch.disabled_quirks = cap->args[0];
6536+
kvm->arch.disabled_quirks |= cap->args[0];
65376537
r = 0;
65386538
break;
65396539
case KVM_CAP_SPLIT_IRQCHIP: {

0 commit comments

Comments
 (0)