cachepc-qemu

Fork of AMDESE/qemu with changes for cachepc side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-qemu
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

userfaultfd.h (1199B)


      1/*
      2 * Linux UFFD-WP support
      3 *
      4 * Copyright Virtuozzo GmbH, 2020
      5 *
      6 * Authors:
      7 *  Andrey Gruzdev   <andrey.gruzdev@virtuozzo.com>
      8 *
      9 * This work is licensed under the terms of the GNU GPL, version 2 or
     10 * later.  See the COPYING file in the top-level directory.
     11 */
     12
     13#ifndef USERFAULTFD_H
     14#define USERFAULTFD_H
     15
     16#include "qemu/osdep.h"
     17#include "exec/hwaddr.h"
     18#include <linux/userfaultfd.h>
     19
     20int uffd_query_features(uint64_t *features);
     21int uffd_create_fd(uint64_t features, bool non_blocking);
     22void uffd_close_fd(int uffd_fd);
     23int uffd_register_memory(int uffd_fd, void *addr, uint64_t length,
     24        uint64_t mode, uint64_t *ioctls);
     25int uffd_unregister_memory(int uffd_fd, void *addr, uint64_t length);
     26int uffd_change_protection(int uffd_fd, void *addr, uint64_t length,
     27        bool wp, bool dont_wake);
     28int uffd_copy_page(int uffd_fd, void *dst_addr, void *src_addr,
     29        uint64_t length, bool dont_wake);
     30int uffd_zero_page(int uffd_fd, void *addr, uint64_t length, bool dont_wake);
     31int uffd_wakeup(int uffd_fd, void *addr, uint64_t length);
     32int uffd_read_events(int uffd_fd, struct uffd_msg *msgs, int count);
     33bool uffd_poll_events(int uffd_fd, int tmo);
     34
     35#endif /* USERFAULTFD_H */