linux/virt/kvm/pfncache.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Kernel-based Virtual Machine driver for Linux
 *
 * This module enables kernel and guest-mode vCPU access to guest physical
 * memory with suitable invalidation mechanisms.
 *
 * Copyright © 2021 Amazon.com, Inc. or its affiliates.
 *
 * Authors:
 *   David Woodhouse <[email protected]>
 */

#include <linux/kvm_host.h>
#include <linux/kvm.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <linux/errno.h>

#include "kvm_mm.h"

/*
 * MMU notifier 'invalidate_range_start' hook.
 */
void gfn_to_pfn_cache_invalidate_start(struct kvm *kvm, unsigned long start,
				       unsigned long end)
{}

static bool kvm_gpc_is_valid_len(gpa_t gpa, unsigned long uhva,
				 unsigned long len)
{}

bool kvm_gpc_check(struct gfn_to_pfn_cache *gpc, unsigned long len)
{}

static void *gpc_map(kvm_pfn_t pfn)
{}

static void gpc_unmap(kvm_pfn_t pfn, void *khva)
{}

static inline bool mmu_notifier_retry_cache(struct kvm *kvm, unsigned long mmu_seq)
{}

static kvm_pfn_t hva_to_pfn_retry(struct gfn_to_pfn_cache *gpc)
{}

static int __kvm_gpc_refresh(struct gfn_to_pfn_cache *gpc, gpa_t gpa, unsigned long uhva)
{}

int kvm_gpc_refresh(struct gfn_to_pfn_cache *gpc, unsigned long len)
{}

void kvm_gpc_init(struct gfn_to_pfn_cache *gpc, struct kvm *kvm)
{}

static int __kvm_gpc_activate(struct gfn_to_pfn_cache *gpc, gpa_t gpa, unsigned long uhva,
			      unsigned long len)
{}

int kvm_gpc_activate(struct gfn_to_pfn_cache *gpc, gpa_t gpa, unsigned long len)
{}

int kvm_gpc_activate_hva(struct gfn_to_pfn_cache *gpc, unsigned long uhva, unsigned long len)
{}

void kvm_gpc_deactivate(struct gfn_to_pfn_cache *gpc)
{}