mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
KVM: arm64: Add KVM_PGTABLE_S2_AS_S1 flag
Plumb the MT_S2{,_FWB}_AS_S1 memory types into the KVM_S2_MEMATTR()
macro with a new KVM_PGTABLE_S2_AS_S1 flag.
Nobody selects it yet.
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260123191637.715429-3-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
This commit is contained in:
@@ -659,7 +659,19 @@ void kvm_tlb_flush_vmid_range(struct kvm_s2_mmu *mmu,
|
||||
}
|
||||
}
|
||||
|
||||
#define KVM_S2_MEMATTR(pgt, attr) PAGE_S2_MEMATTR(attr, stage2_has_fwb(pgt))
|
||||
#define KVM_S2_MEMATTR(pgt, attr) \
|
||||
({ \
|
||||
kvm_pte_t __attr; \
|
||||
\
|
||||
if ((pgt)->flags & KVM_PGTABLE_S2_AS_S1) \
|
||||
__attr = PAGE_S2_MEMATTR(AS_S1, \
|
||||
stage2_has_fwb(pgt)); \
|
||||
else \
|
||||
__attr = PAGE_S2_MEMATTR(attr, \
|
||||
stage2_has_fwb(pgt)); \
|
||||
\
|
||||
__attr; \
|
||||
})
|
||||
|
||||
static int stage2_set_xn_attr(enum kvm_pgtable_prot prot, kvm_pte_t *attr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user