kernel
This commit is contained in:
parent
b59f84ee36
commit
cfab1d3ce7
83468 changed files with 37938688 additions and 0 deletions
linux-6.8.1/include/linux
43
linux-6.8.1/include/linux/hypervisor.h
Normal file
43
linux-6.8.1/include/linux/hypervisor.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
/* 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 */
|
||||
|
||||
static inline bool hypervisor_isolated_pci_functions(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_S390))
|
||||
return true;
|
||||
|
||||
return jailhouse_paravirt();
|
||||
}
|
||||
|
||||
#endif /* __LINUX_HYPEVISOR_H */
|
Loading…
Add table
Add a link
Reference in a new issue