cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

paging.h (562B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/* Shadow paging constants/helpers that don't need to be #undef'd. */
      3#ifndef __KVM_X86_PAGING_H
      4#define __KVM_X86_PAGING_H
      5
      6#define GUEST_PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1))
      7#define PT64_LVL_ADDR_MASK(level) \
      8	(GUEST_PT64_BASE_ADDR_MASK & ~((1ULL << (PAGE_SHIFT + (((level) - 1) \
      9						* PT64_LEVEL_BITS))) - 1))
     10#define PT64_LVL_OFFSET_MASK(level) \
     11	(GUEST_PT64_BASE_ADDR_MASK & ((1ULL << (PAGE_SHIFT + (((level) - 1) \
     12						* PT64_LEVEL_BITS))) - 1))
     13#endif /* __KVM_X86_PAGING_H */
     14