Re: [PATCH v2 6/8] KVM: x86: Fold 'enum kvm_ex_reg' definitions into 'enum kvm_reg'

From: Vitaly Kuznetsov
Date: Wed Oct 09 2019 - 07:27:47 EST


Paolo Bonzini <pbonzini@xxxxxxxxxx> writes:

> On 30/09/19 11:25, Vitaly Kuznetsov wrote:
>>> -enum kvm_reg_ex {
>>> VCPU_EXREG_PDPTR = NR_VCPU_REGS,
>> (Personally, I would've changed that to NR_VCPU_REGS + 1)
>>
>
> Why?
>

Just so every entry in the enum is different and NR_VCPU_REGS acts as a
guardian.

--
Vitaly