[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e1a0bb6-cd73-70c7-0b94-4a52f5b04577@redhat.com>
Date: Wed, 23 Jun 2021 19:18:32 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Yu Zhang <yu.c.zhang@...ux.intel.com>,
Maxim Levitsky <mlevitsk@...hat.com>
Subject: Re: [PATCH 20/54] KVM: x86/mmu: Add struct and helpers to retrieve
MMU role bits from regs
On 22/06/21 19:57, Sean Christopherson wrote:
> +/*
> + * Yes, lot's of underscores. They're a hint that you probably shouldn't be
> + * reading from the role_regs. Once the mmu_role is constructed, it becomes
> + * the single source of truth for the MMU's state.
> + */
> +#define BUILD_MMU_ROLE_REGS_ACCESSOR(reg, name, flag) \
> +static inline bool ____is_##reg##_##name(struct kvm_mmu_role_regs *regs)\
> +{ \
> + return !!(regs->reg & flag); \
> +}
Ok, that's a decent reason to have these accessors in the first place. :)
Paolo
Powered by blists - more mailing lists