mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 19:23:01 +09:00
commit f72e38e8ec upstream.
Instead of x86_hyper being either NULL on bare metal or a pointer to a
struct hypervisor_x86 in case of the kernel running as a guest merge
the struct into x86_platform and x86_init.
This will remove the need for wrappers making it hard to find out what
is being called. With dummy functions added for all callbacks testing
for a NULL function pointer can be removed, too.
Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: akataria@vmware.com
Cc: boris.ostrovsky@oracle.com
Cc: devel@linuxdriverproject.org
Cc: haiyangz@microsoft.com
Cc: kvm@vger.kernel.org
Cc: kys@microsoft.com
Cc: pbonzini@redhat.com
Cc: rkrcmar@redhat.com
Cc: rusty@rustcorp.com.au
Cc: sthemmin@microsoft.com
Cc: virtualization@lists.linux-foundation.org
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/20171109132739.23465-2-jgross@suse.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 lines
400 B
C
23 lines
400 B
C
/* 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/x86_init.h>
|
|
static inline void hypervisor_pin_vcpu(int cpu)
|
|
{
|
|
x86_platform.hyper.pin_vcpu(cpu);
|
|
}
|
|
#else
|
|
static inline void hypervisor_pin_vcpu(int cpu)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* __LINUX_HYPEVISOR_H */
|