linux/arch/x86/kernel/paravirt.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*  Paravirtualization interfaces
    Copyright (C) 2006 Rusty Russell IBM Corporation


    2007 - x86_64 support added by Glauber de Oliveira Costa, Red Hat Inc
*/

#include <linux/errno.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/efi.h>
#include <linux/bcd.h>
#include <linux/highmem.h>
#include <linux/kprobes.h>
#include <linux/pgtable.h>
#include <linux/static_call.h>

#include <asm/bug.h>
#include <asm/paravirt.h>
#include <asm/debugreg.h>
#include <asm/desc.h>
#include <asm/setup.h>
#include <asm/time.h>
#include <asm/pgalloc.h>
#include <asm/irq.h>
#include <asm/delay.h>
#include <asm/fixmap.h>
#include <asm/apic.h>
#include <asm/tlbflush.h>
#include <asm/timer.h>
#include <asm/special_insns.h>
#include <asm/tlb.h>
#include <asm/io_bitmap.h>
#include <asm/gsseg.h>

/* stub always returning 0. */
DEFINE_ASM_FUNC();

void __init default_banner(void)
{}

#ifdef CONFIG_PARAVIRT_XXL
DEFINE_ASM_FUNC();
DEFINE_ASM_FUNC();
DEFINE_ASM_FUNC();
DEFINE_ASM_FUNC();
DEFINE_ASM_FUNC();
#endif

DEFINE_STATIC_KEY_TRUE(virt_spin_lock_key);

void __init native_pv_lock_init(void)
{}

static void native_tlb_remove_table(struct mmu_gather *tlb, void *table)
{}

struct static_key paravirt_steal_enabled;
struct static_key paravirt_steal_rq_enabled;

static u64 native_steal_clock(int cpu)
{}

DEFINE_STATIC_CALL();
DEFINE_STATIC_CALL();

void paravirt_set_sched_clock(u64 (*func)(void))
{}

/* These are in entry.S */
static struct resource reserve_ioports =;

/*
 * Reserve the whole legacy IO space to prevent any legacy drivers
 * from wasting time probing for their hardware.  This is a fairly
 * brute-force approach to disabling all non-virtual drivers.
 *
 * Note that this must be called very early to have any effect.
 */
int paravirt_disable_iospace(void)
{}

#ifdef CONFIG_PARAVIRT_XXL
static noinstr void pv_native_write_cr2(unsigned long val)
{}

static noinstr unsigned long pv_native_get_debugreg(int regno)
{}

static noinstr void pv_native_set_debugreg(int regno, unsigned long val)
{}

noinstr void pv_native_wbinvd(void)
{}

static noinstr void pv_native_safe_halt(void)
{}
#endif

struct pv_info pv_info =;

/* 64-bit pagetable entries */
#define PTE_IDENT

struct paravirt_patch_template pv_ops =;

#ifdef CONFIG_PARAVIRT_XXL
NOKPROBE_SYMBOL(native_load_idt);
#endif

EXPORT_SYMBOL();
EXPORT_SYMBOL_GPL();