[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH Risu 1/2] risu_ppc64: Fix Risu to run under qemu
From: |
joserz |
Subject: |
Re: [Qemu-devel] [PATCH Risu 1/2] risu_ppc64: Fix Risu to run under qemu linux user |
Date: |
Tue, 31 Jan 2017 20:09:08 -0200 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Mon, Jan 30, 2017 at 11:49:34AM +0000, Peter Maydell wrote:
> On 30 January 2017 at 02:47, Jose Ricardo Ziviani
> <address@hidden> wrote:
> > Qemu linux-user doesn't fill uc_mcontext completely like full emul. does.
> > For instance, uc->uc_mcontext.regs->nip is an invalid so this
> > commit replaces it by uc->uc_mcontext.gp_regs[PT_NIP]
>
> It's not clear to me from this commit message whether this is
> a bug in QEMU's userspace emulation which this is trying to work
> around (in which case we should just fix it in QEMU), or a
> bug in risu where we were incorrectly relying on something the
> kernel doesn't actually guarantee. Which is it?
>
> Also, looking at the kernel source and headers as far
> as I can see uc_context.regs is a pointer set up such that
> uc->uc_mcontext.regs->nip is pointing at the same bit of
> memory where uc->uc_mcontext.gp_regs[PT_NIP] is,
> and the QEMU code does similar, so I don't see how you can
> get two different values from the two things.
>
> (It is certainly the case that risu is quite good at exercising
> odd corner cases of the signal handling code in QEMU which most
> normal programs don't care about...)
Peter
I just sent a patch "linux-user: fill target sigcontext struct accordingly" to
fix it in QEMU. Please, forget this patchset, I'll reorganize it and send it
later.
Thank you
Ziviani