lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ