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

coco.h (501B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef _ASM_X86_COCO_H
      3#define _ASM_X86_COCO_H
      4
      5#include <asm/types.h>
      6
      7enum cc_vendor {
      8	CC_VENDOR_NONE,
      9	CC_VENDOR_AMD,
     10	CC_VENDOR_HYPERV,
     11	CC_VENDOR_INTEL,
     12};
     13
     14void cc_set_vendor(enum cc_vendor v);
     15void cc_set_mask(u64 mask);
     16
     17#ifdef CONFIG_ARCH_HAS_CC_PLATFORM
     18u64 cc_mkenc(u64 val);
     19u64 cc_mkdec(u64 val);
     20#else
     21static inline u64 cc_mkenc(u64 val)
     22{
     23	return val;
     24}
     25
     26static inline u64 cc_mkdec(u64 val)
     27{
     28	return val;
     29}
     30#endif
     31
     32#endif /* _ASM_X86_COCO_H */