Commit d52fd3d3 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/64s/exception: Add GEN_KVM macro that uses INT_DEFINE parameters

No generated code change.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200225173541.1549955-4-npiggin@gmail.com
parent 7cb3a1a0
...@@ -204,6 +204,7 @@ END_FTR_SECTION_NESTED(ftr,ftr,943) ...@@ -204,6 +204,7 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
#define ISET_RI .L_ISET_RI_\name\() #define ISET_RI .L_ISET_RI_\name\()
#define IEARLY .L_IEARLY_\name\() #define IEARLY .L_IEARLY_\name\()
#define IMASK .L_IMASK_\name\() #define IMASK .L_IMASK_\name\()
#define IKVM_SKIP .L_IKVM_SKIP_\name\()
#define IKVM_REAL .L_IKVM_REAL_\name\() #define IKVM_REAL .L_IKVM_REAL_\name\()
#define IKVM_VIRT .L_IKVM_VIRT_\name\() #define IKVM_VIRT .L_IKVM_VIRT_\name\()
#define ISTACK .L_ISTACK_\name\() #define ISTACK .L_ISTACK_\name\()
...@@ -243,6 +244,9 @@ do_define_int n ...@@ -243,6 +244,9 @@ do_define_int n
.ifndef IMASK .ifndef IMASK
IMASK=0 IMASK=0
.endif .endif
.ifndef IKVM_SKIP
IKVM_SKIP=0
.endif
.ifndef IKVM_REAL .ifndef IKVM_REAL
IKVM_REAL=0 IKVM_REAL=0
.endif .endif
...@@ -265,6 +269,10 @@ do_define_int n ...@@ -265,6 +269,10 @@ do_define_int n
KVM_HANDLER \vec, \hsrr, \area, \skip KVM_HANDLER \vec, \hsrr, \area, \skip
.endm .endm
.macro GEN_KVM name
KVM_HANDLER IVEC, IHSRR, IAREA, IKVM_SKIP
.endm
#ifdef CONFIG_KVM_BOOK3S_64_HANDLER #ifdef CONFIG_KVM_BOOK3S_64_HANDLER
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
/* /*
...@@ -1226,6 +1234,7 @@ INT_DEFINE_BEGIN(data_access) ...@@ -1226,6 +1234,7 @@ INT_DEFINE_BEGIN(data_access)
IVEC=0x300 IVEC=0x300
IDAR=1 IDAR=1
IDSISR=1 IDSISR=1
IKVM_SKIP=1
IKVM_REAL=1 IKVM_REAL=1
INT_DEFINE_END(data_access) INT_DEFINE_END(data_access)
...@@ -1235,7 +1244,8 @@ EXC_REAL_END(data_access, 0x300, 0x80) ...@@ -1235,7 +1244,8 @@ EXC_REAL_END(data_access, 0x300, 0x80)
EXC_VIRT_BEGIN(data_access, 0x4300, 0x80) EXC_VIRT_BEGIN(data_access, 0x4300, 0x80)
GEN_INT_ENTRY data_access, virt=1 GEN_INT_ENTRY data_access, virt=1
EXC_VIRT_END(data_access, 0x4300, 0x80) EXC_VIRT_END(data_access, 0x4300, 0x80)
INT_KVM_HANDLER data_access, 0x300, EXC_STD, PACA_EXGEN, 1 TRAMP_KVM_BEGIN(data_access_kvm)
GEN_KVM data_access
EXC_COMMON_BEGIN(data_access_common) EXC_COMMON_BEGIN(data_access_common)
GEN_COMMON data_access GEN_COMMON data_access
ld r4,_DAR(r1) ld r4,_DAR(r1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment