@@ -34,7 +34,6 @@ enum exception_type {
};
bool kvm_condition_valid32(const struct kvm_vcpu *vcpu);
-void kvm_skip_instr32(struct kvm_vcpu *vcpu);
void kvm_inject_undefined(struct kvm_vcpu *vcpu);
void kvm_inject_vabt(struct kvm_vcpu *vcpu);
@@ -10,6 +10,7 @@
* Author: Christoffer Dall <c.dall@virtualopensystems.com>
*/
+#include <hyp/skip_instr.h>
#include <linux/kvm_host.h>
#include <asm/kvm_emulate.h>
#include <asm/kvm_hyp.h>
@@ -10,7 +10,7 @@
* Author: Christoffer Dall <c.dall@virtualopensystems.com>
*/
-#include <hyp/adjust_pc.h>
+#include <hyp/skip_instr.h>
#include <linux/kvm_host.h>
#include <asm/kvm_emulate.h>
similarity index 90%
rename from arch/arm64/kvm/hyp/include/hyp/adjust_pc.h
rename to arch/arm64/kvm/hyp/include/hyp/skip_instr.h
@@ -7,12 +7,14 @@
* Author: Marc Zyngier <maz@kernel.org>
*/
-#ifndef __ARM64_KVM_HYP_ADJUST_PC_H__
-#define __ARM64_KVM_HYP_ADJUST_PC_H__
+#ifndef __ARM64_KVM_HYP_SKIP_INSTR_H__
+#define __ARM64_KVM_HYP_SKIP_INSTR_H__
#include <asm/kvm_emulate.h>
#include <asm/kvm_host.h>
+void kvm_skip_instr32(struct kvm_vcpu *vcpu);
+
static inline void kvm_skip_instr(struct kvm_vcpu *vcpu)
{
if (vcpu_mode_is_32bit(vcpu)) {
@@ -7,7 +7,7 @@
#ifndef __ARM64_KVM_HYP_SWITCH_H__
#define __ARM64_KVM_HYP_SWITCH_H__
-#include <hyp/adjust_pc.h>
+#include <hyp/skip_instr.h>
#include <linux/arm-smccc.h>
#include <linux/kvm_host.h>
@@ -4,7 +4,7 @@
* Author: Marc Zyngier <marc.zyngier@arm.com>
*/
-#include <hyp/adjust_pc.h>
+#include <hyp/skip_instr.h>
#include <linux/compiler.h>
#include <linux/irqchip/arm-gic.h>
@@ -4,7 +4,7 @@
* Author: Marc Zyngier <marc.zyngier@arm.com>
*/
-#include <hyp/adjust_pc.h>
+#include <hyp/skip_instr.h>
#include <linux/compiler.h>
#include <linux/irqchip/arm-gic-v3.h>
The function prototype kvm_skip_instr32() is used only by the hyp code, so it makes more sense to live in the hyp specific header file adjust_pc.h. Since __adjust_pc() has been moved to kvm_asm.h so it can be used by the generic code, rename adjust_pc.h -> skip_instr.h to avoid confusion and to better reflect the purpose of the remaining functions. Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> --- Based on git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-5.13-1 arch/arm64/include/asm/kvm_emulate.h | 1 - arch/arm64/kvm/hyp/aarch32.c | 1 + arch/arm64/kvm/hyp/exception.c | 2 +- .../arm64/kvm/hyp/include/hyp/{adjust_pc.h => skip_instr.h} | 6 ++++-- arch/arm64/kvm/hyp/include/hyp/switch.h | 2 +- arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c | 2 +- arch/arm64/kvm/hyp/vgic-v3-sr.c | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) rename arch/arm64/kvm/hyp/include/hyp/{adjust_pc.h => skip_instr.h} (90%)