lkml.org 
[lkml]   [2021]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 20/54] KVM: x86/mmu: Add struct and helpers to retrieve MMU role bits from regs
    From
    Date
    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

    \
     
     \ /
      Last update: 2021-06-23 19:19    [W:4.200 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site