Skip to content

Commit

Permalink
arm64: KVM: Define HYP offset masks
Browse files Browse the repository at this point in the history
Define the two possible HYP VA regions in terms of VA_BITS,
and keep HYP_PAGE_OFFSET_MASK as a temporary compatibility
definition.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
  • Loading branch information
Marc Zyngier authored and Christoffer Dall committed Jul 3, 2016
1 parent 853c3b2 commit d53d9bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/arm64/include/asm/kvm_mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@
* functionality is already mapped as part of the main kernel
* mappings, and none of this applies in that case.
*/
#define HYP_PAGE_OFFSET_SHIFT VA_BITS
#define HYP_PAGE_OFFSET_MASK ((UL(1) << HYP_PAGE_OFFSET_SHIFT) - 1)

#define HYP_PAGE_OFFSET_HIGH_MASK ((UL(1) << VA_BITS) - 1)
#define HYP_PAGE_OFFSET_LOW_MASK ((UL(1) << (VA_BITS - 1)) - 1)

/* Temporary compat define */
#define HYP_PAGE_OFFSET_MASK HYP_PAGE_OFFSET_HIGH_MASK

/*
* Our virtual mapping for the idmap-ed MMU-enable code. Must be
Expand Down

0 comments on commit d53d9bc

Please sign in to comment.