Re: [PATCH v3 36/36] KVM: arm64: Rename PKVM_PAGE_STATE_MASK
From: Fuad Tabba <tabba@google.com>
Date: 2026-03-11 10:26:51
Also in:
kvmarm
On Thu, 5 Mar 2026 at 14:46, Will Deacon [off-list ref] wrote:
Rename PKVM_PAGE_STATE_MASK to PKVM_PAGE_STATE_VMEMMAP_MASK to make it clear that the mask applies to the page state recorded in the entries of the 'hyp_vmemmap', rather than page states stored elsewhere (e.g. in the ptes). Suggested-by: Alexandru Elisei <redacted> Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com> Cheers, /fuad
quoted hunk ↗ jump to hunk
--- arch/arm64/kvm/hyp/include/nvhe/memory.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)diff --git a/arch/arm64/kvm/hyp/include/nvhe/memory.h b/arch/arm64/kvm/hyp/include/nvhe/memory.h index 4cedb720c75d..b50712d47f6d 100644 --- a/arch/arm64/kvm/hyp/include/nvhe/memory.h +++ b/arch/arm64/kvm/hyp/include/nvhe/memory.h@@ -37,7 +37,7 @@ enum pkvm_page_state { */ PKVM_POISON = BIT(2), }; -#define PKVM_PAGE_STATE_MASK (BIT(0) | BIT(1)) +#define PKVM_PAGE_STATE_VMEMMAP_MASK (BIT(0) | BIT(1)) #define PKVM_PAGE_STATE_PROT_MASK (KVM_PGTABLE_PROT_SW0 | KVM_PGTABLE_PROT_SW1) static inline enum kvm_pgtable_prot pkvm_mkstate(enum kvm_pgtable_prot prot,@@ -114,12 +114,12 @@ static inline void set_host_state(struct hyp_page *p, enum pkvm_page_state state static inline enum pkvm_page_state get_hyp_state(struct hyp_page *p) { - return p->__hyp_state_comp ^ PKVM_PAGE_STATE_MASK; + return p->__hyp_state_comp ^ PKVM_PAGE_STATE_VMEMMAP_MASK; } static inline void set_hyp_state(struct hyp_page *p, enum pkvm_page_state state) { - p->__hyp_state_comp = state ^ PKVM_PAGE_STATE_MASK; + p->__hyp_state_comp = state ^ PKVM_PAGE_STATE_VMEMMAP_MASK; } /* --2.53.0.473.g4a7958ca14-goog