]> Pileus Git - ~andy/linux/blobdiff - arch/powerpc/include/asm/exception-64s.h
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[~andy/linux] / arch / powerpc / include / asm / exception-64s.h
index 402c1c466509df65244c4cfeb0aa970d4b88f6ca..894662a5d4d5c5aa25f43e30653609d80d901774 100644 (file)
@@ -198,6 +198,17 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
        cmpwi   r10,0;                                                  \
        bne     do_kvm_##n
 
+#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
+/*
+ * If hv is possible, interrupts come into to the hv version
+ * of the kvmppc_interrupt code, which then jumps to the PR handler,
+ * kvmppc_interrupt_pr, if the guest is a PR guest.
+ */
+#define kvmppc_interrupt kvmppc_interrupt_hv
+#else
+#define kvmppc_interrupt kvmppc_interrupt_pr
+#endif
+
 #define __KVM_HANDLER(area, h, n)                                      \
 do_kvm_##n:                                                            \
        BEGIN_FTR_SECTION_NESTED(947)                                   \
@@ -244,7 +255,7 @@ do_kvm_##n:                                                         \
 #define KVM_HANDLER_SKIP(area, h, n)
 #endif
 
-#ifdef CONFIG_KVM_BOOK3S_PR
+#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
 #define KVMTEST_PR(n)                  __KVMTEST(n)
 #define KVM_HANDLER_PR(area, h, n)     __KVM_HANDLER(area, h, n)
 #define KVM_HANDLER_PR_SKIP(area, h, n)        __KVM_HANDLER_SKIP(area, h, n)