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

swiotlb-xen.h (431B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef _ASM_ARM_SWIOTLB_XEN_H
      3#define _ASM_ARM_SWIOTLB_XEN_H
      4
      5#include <xen/features.h>
      6#include <xen/xen.h>
      7
      8static inline int xen_swiotlb_detect(void)
      9{
     10	if (!xen_domain())
     11		return 0;
     12	if (xen_feature(XENFEAT_direct_mapped))
     13		return 1;
     14	/* legacy case */
     15	if (!xen_feature(XENFEAT_not_direct_mapped) && xen_initial_domain())
     16		return 1;
     17	return 0;
     18}
     19
     20#endif /* _ASM_ARM_SWIOTLB_XEN_H */