Re: [PATCH RFC 1/4] KVM: x86: Drop redundant KVM_MEM_SLOTS_NUM definition

Sean Christopherson
2021-01-15T16:48:31Z

On Fri, Jan 15, 2021, Vitaly Kuznetsov wrote:
> KVM_MEM_SLOTS_NUM is already defined in include/linux/kvm_host.h the
> exact same way.

I'm pretty sure you can remove the "#ifndef KVM_MEM_SLOTS_NUM" in
linux/kvm_host.h, looks like x86 is the only arch that was defining
KVM_MEM_SLOTS_NUM.

> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> arch/x86/include/asm/kvm_host.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index c27cbe3baccc..1bcf67d76753 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -43,7 +43,6 @@
> #define KVM_USER_MEM_SLOTS 509
> /* memory slots that are not exposed to userspace */
> #define KVM_PRIVATE_MEM_SLOTS 3
> -#define KVM_MEM_SLOTS_NUM (KVM_USER_MEM_SLOTS + KVM_PRIVATE_MEM_SLOTS)
>
> #define KVM_HALT_POLL_NS_DEFAULT 200000
>
> --
> 2.29.2
>