Commit 92cc6bf0 authored by Srikar Dronamraju's avatar Srikar Dronamraju Committed by Michael Ellerman
Browse files

powerpc: Refactor is_kvm_guest() declaration to new header



Only code/declaration movement, in anticipation of doing a KVM-aware
vcpu_is_preempted(). No additional changes.

Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201202050456.164005-2-srikar@linux.vnet.ibm.com
parent bf13718b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -134,12 +134,6 @@ extern int ibm_nmi_interlock_token;

extern unsigned int __start___fw_ftr_fixup, __stop___fw_ftr_fixup;

#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_KVM_GUEST)
bool is_kvm_guest(void);
#else
static inline bool is_kvm_guest(void) { return false; }
#endif

#ifdef CONFIG_PPC_PSERIES
void pseries_probe_fw_features(void);
#else
+15 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2020 IBM Corporation
 */

#ifndef _ASM_POWERPC_KVM_GUEST_H_
#define _ASM_POWERPC_KVM_GUEST_H_

#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_KVM_GUEST)
bool is_kvm_guest(void);
#else
static inline bool is_kvm_guest(void) { return false; }
#endif

#endif /* _ASM_POWERPC_KVM_GUEST_H_ */
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
#ifndef __POWERPC_KVM_PARA_H__
#define __POWERPC_KVM_PARA_H__

#include <asm/firmware.h>
#include <asm/kvm_guest.h>

#include <uapi/asm/kvm_para.h>

+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <linux/of.h>

#include <asm/firmware.h>
#include <asm/kvm_guest.h>

#ifdef CONFIG_PPC64
unsigned long powerpc_firmware_features __read_mostly;
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
#include <asm/plpar_wrappers.h>
#include <asm/code-patching.h>
#include <asm/svm.h>
#include <asm/kvm_guest.h>

#include "pseries.h"