https://github.com/torvalds/linux
Raw File
Tip revision: 5f9e832c137075045d15cd6899ab0505cfb2ca4b authored by Linus Torvalds on 21 July 2019, 21:05:38 UTC
Linus 5.3-rc1
Tip revision: 5f9e832
hypervisor.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_HYPEVISOR_H
#define __LINUX_HYPEVISOR_H

/*
 *	Generic Hypervisor support
 *		Juergen Gross <jgross@suse.com>
 */

#ifdef CONFIG_X86

#include <asm/jailhouse_para.h>
#include <asm/x86_init.h>

static inline void hypervisor_pin_vcpu(int cpu)
{
	x86_platform.hyper.pin_vcpu(cpu);
}

#else /* !CONFIG_X86 */

#include <linux/of.h>

static inline void hypervisor_pin_vcpu(int cpu)
{
}

static inline bool jailhouse_paravirt(void)
{
	return of_find_compatible_node(NULL, NULL, "jailhouse,cell");
}

#endif /* !CONFIG_X86 */

#endif /* __LINUX_HYPEVISOR_H */
back to top