Context |
Check |
Description |
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/merge (112f47a1484ddca610b70cbe4a99f0d0f1701daf)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/next (b73c8cccd72ac28beaf262fd6ef4b91411fc8335)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch linus/master (97e5bf604b7a0d6e1b3e00fe31d5fd4b9bffeaae)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/fixes (d72500f992849d31ebae8f821a023660ddd0dcc2)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch linux-next (1434a3127887a7e708be5f4edd5e36d64d8622f8)
|
snowpatch_ozlabs/apply_patch |
fail
|
Failed to apply to any branch
|
@@ -1457,13 +1457,23 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,
* Guest userspace executed sc 1. This can only be
* reached by the P9 path because the old path
* handles this case in realmode hcall handlers.
- *
- * Radix guests can not run PR KVM or nested HV hash
- * guests which might run PR KVM, so this is always
- * a privilege fault. Send a program check to guest
- * kernel.
*/
- kvmppc_core_queue_program(vcpu, SRR1_PROGPRIV);
+ if (!kvmhv_vcpu_is_radix(vcpu)) {
+ /*
+ * A guest could be running PR KVM, so this
+ * may be a PR KVM hcall. It must be reflected
+ * to the guest kernel as a sc interrupt.
+ */
+ kvmppc_core_queue_syscall(vcpu);
+ } else {
+ /*
+ * Radix guests can not run PR KVM or nested HV
+ * hash guests which might run PR KVM, so this
+ * is always a privilege fault. Send a program
+ * check to guest kernel.
+ */
+ kvmppc_core_queue_program(vcpu, SRR1_PROGPRIV);
+ }
r = RESUME_GUEST;
break;
}
The reflection of sc 1 interrupts from guest PR=1 to the guest kernel is required to support a hash guest running PR KVM where its guest is making hcalls with sc 1. In preparation for hash guest support, add this hcall reflection to the P9 path. The P7/8 path does this in its realmode hcall handler (sc_1_fast_return). Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/powerpc/kvm/book3s_hv.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)