From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Date: Wed, 06 Feb 2008 19:30:43 +0000 Subject: Re: [kvm-ppc-devel] [PATCH] Fix signal handing line KVM PowerPC Message-Id: <1202326243.5546.3.camel@basalt> List-Id: References: <1201902484.15106.9.camel@thinkpad.austin.ibm.com> In-Reply-To: <1201902484.15106.9.camel@thinkpad.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On Mon, 2008-02-04 at 20:00 -0600, Hollis Blanchard wrote: > On Fri, 2008-02-01 at 15:48 -0600, Jerone Young wrote: > > Code was missing for our kernel code to properly handle signals, by > > setting the signal mask and saving off our current one, then restoring > > it at the end. This code does what x86 does and now keyboard input > > works. > > > > Signed-off-by: Jerone Young > > > > > > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > > --- a/arch/powerpc/kvm/powerpc.c > > +++ b/arch/powerpc/kvm/powerpc.c > > @@ -685,6 +688,10 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v > > int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) > > { > > int r; > > + sigset_t sigsaved; > > + > > + if (vcpu->sigset_active) > > + sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); > > > > if (vcpu->mmio_needed) { > > if (!vcpu->mmio_is_write) > > @@ -702,6 +709,10 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v > > > > r = __kvmppc_vcpu_run(run, vcpu); > > local_irq_enable(); /* XXX */ > > + > > + > > + if (vcpu->sigset_active) > > + sigprocmask(SIG_SETMASK, &sigsaved, NULL); > > > > return r; > > } > > Applied, thanks. Please watch your whitespace in the future though > (including in your mailer :). I had to revert this because it caused guest output to "pause" until a qemu keypress. -- Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel