diff for duplicates of <1542164943.17117.0.camel@gmail.com> diff --git a/a/1.txt b/N1/1.txt index a276056..4667f8f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -6,9 +6,9 @@ On Thu, 2018-11-08 at 21:27 -0600, Michael Roth wrote: > ret0 = kvmppc_pseries_do_hcall() > ret1 = kvmhv_enter_nested_guest() > ret2 = kvmhv_run_single_vcpu() -> if (ret2 = -EINTR) +> if (ret2 == -EINTR) > return H_INTERRUPT -> if (ret1 = H_INTERRUPT) +> if (ret1 == H_INTERRUPT) > kvmppc_set_gpr(vcpu, 3, 0) > return -EINTR > /* skipped: */ @@ -16,7 +16,7 @@ On Thu, 2018-11-08 at 21:27 -0600, Michael Roth wrote: > vcpu->arch.hcall_needed = 0 > return RESUME_GUEST > -> which causes an exit to L0 userspace with ret0 = -EINTR. +> which causes an exit to L0 userspace with ret0 == -EINTR. > > The intention seems to be to set the hcall return value to 0 (via > VCPU r3) so that L1 will see a successful return from H_ENTER_NESTED @@ -33,7 +33,7 @@ On Thu, 2018-11-08 at 21:27 -0600, Michael Roth wrote: > kvmppc_set_gpr(vcpu, 4 + i, run->papr_hcall.args[i]); > vcpu->arch.hcall_needed = 0; > -> since vcpu->arch.hcall_needed = 1 indicates that userspace should +> since vcpu->arch.hcall_needed == 1 indicates that userspace should > have handled the hcall and stored the return value in > run->papr_hcall.ret. Since that's not the case here, we can get an > unexpected value in VCPU r3, which can result in @@ -64,7 +64,8 @@ On Thu, 2018-11-08 at 21:27 -0600, Michael Roth wrote: > [ 350.613765] srr0 = 0000772f954dd48c srr1 = 800000000280f033 > [ 350.613808] sprg0 = 0000000000000000 sprg1 = c000000001b00000 > [ 350.613859] sprg2 = 0000772f9565a280 sprg3 = 0000000000000000 -> [ 350.613911] cr = 88002848 xer = 0000000020040000 dsisr > 42000000 +> [ 350.613911] cr = 88002848 xer = 0000000020040000 dsisr = +> 42000000 > [ 350.613962] dar = 0000772f95390000 > [ 350.614031] fault dar = c000000244b278c0 dsisr = 00000000 > [ 350.614073] SLB (0 entries): @@ -139,7 +140,7 @@ Reviewed-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> > @@ -983,6 +983,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu > *vcpu) > ret = kvmhv_enter_nested_guest(vcpu); -> if (ret = H_INTERRUPT) { +> if (ret == H_INTERRUPT) { > kvmppc_set_gpr(vcpu, 3, 0); > + vcpu->arch.hcall_needed = 0; > return -EINTR; diff --git a/a/content_digest b/N1/content_digest index efda511..f3b3906 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020181109032723.16394-1-mdroth@linux.vnet.ibm.com\0" "From\0Suraj Jitindar Singh <sjitindarsingh@gmail.com>\0" "Subject\0Re: [PATCH] KVM: PPC: Book3S HV: fix handling for interrupted H_ENTER_NESTED\0" - "Date\0Wed, 14 Nov 2018 03:09:03 +0000\0" + "Date\0Wed, 14 Nov 2018 14:09:03 +1100\0" "To\0Michael Roth <mdroth@linux.vnet.ibm.com>" " kvm@vger.kernel.org\0" "Cc\0linuxppc-dev@ozlabs.org" @@ -17,9 +17,9 @@ "> ret0 = kvmppc_pseries_do_hcall()\n" "> ret1 = kvmhv_enter_nested_guest()\n" "> ret2 = kvmhv_run_single_vcpu()\n" - "> if (ret2 = -EINTR)\n" + "> if (ret2 == -EINTR)\n" "> return H_INTERRUPT\n" - "> if (ret1 = H_INTERRUPT)\n" + "> if (ret1 == H_INTERRUPT)\n" "> kvmppc_set_gpr(vcpu, 3, 0)\n" "> return -EINTR\n" "> /* skipped: */\n" @@ -27,7 +27,7 @@ "> vcpu->arch.hcall_needed = 0\n" "> return RESUME_GUEST\n" "> \n" - "> which causes an exit to L0 userspace with ret0 = -EINTR.\n" + "> which causes an exit to L0 userspace with ret0 == -EINTR.\n" "> \n" "> The intention seems to be to set the hcall return value to 0 (via\n" "> VCPU r3) so that L1 will see a successful return from H_ENTER_NESTED\n" @@ -44,7 +44,7 @@ "> kvmppc_set_gpr(vcpu, 4 + i, run->papr_hcall.args[i]);\n" "> vcpu->arch.hcall_needed = 0;\n" "> \n" - "> since vcpu->arch.hcall_needed = 1 indicates that userspace should\n" + "> since vcpu->arch.hcall_needed == 1 indicates that userspace should\n" "> have handled the hcall and stored the return value in\n" "> run->papr_hcall.ret. Since that's not the case here, we can get an\n" "> unexpected value in VCPU r3, which can result in\n" @@ -75,7 +75,8 @@ "> [ 350.613765] srr0 = 0000772f954dd48c srr1 = 800000000280f033\n" "> [ 350.613808] sprg0 = 0000000000000000 sprg1 = c000000001b00000\n" "> [ 350.613859] sprg2 = 0000772f9565a280 sprg3 = 0000000000000000\n" - "> [ 350.613911] cr = 88002848 xer = 0000000020040000 dsisr > 42000000\n" + "> [ 350.613911] cr = 88002848 xer = 0000000020040000 dsisr =\n" + "> 42000000\n" "> [ 350.613962] dar = 0000772f95390000\n" "> [ 350.614031] fault dar = c000000244b278c0 dsisr = 00000000\n" "> [ 350.614073] SLB (0 entries):\n" @@ -150,11 +151,11 @@ "> @@ -983,6 +983,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu\n" "> *vcpu)\n" "> \t\tret = kvmhv_enter_nested_guest(vcpu);\n" - "> \t\tif (ret = H_INTERRUPT) {\n" + "> \t\tif (ret == H_INTERRUPT) {\n" "> \t\t\tkvmppc_set_gpr(vcpu, 3, 0);\n" "> +\t\t\tvcpu->arch.hcall_needed = 0;\n" "> \t\t\treturn -EINTR;\n" "> \t\t}\n" "> \t\tbreak;" -ec0bdee4ddfec1f7e0c3be2495d776db35a6fa86c0f3a421b039d6b70efc3088 +0a31a29e5e19dafff1795f732cf7ac943007f83b978a14f4d20105944ec4abe7
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.