Re: [RFC PATCH v3 17/59] KVM: x86: Add flag to disallow #MC injection / KVM_X86_SETUP_MCE
From: Thomas Gleixner
Date: Thu Nov 25 2021 - 14:35:11 EST
On Wed, Nov 24 2021 at 16:20, isaku yamahata wrote:
> static int kvm_vcpu_ioctl_x86_setup_mce(struct kvm_vcpu *vcpu,
> u64 mcg_cap)
> {
> - int r;
> unsigned bank_num = mcg_cap & 0xff, bank;
>
> - r = -EINVAL;
> + if (vcpu->kvm->arch.mce_injection_disallowed)
> + return -EINVAL;
Yet another flag because the copy & pasta orgy did not cover that
ioctl. What for?