qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: fix wait* syscall status returns


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] linux-user: fix wait* syscall status returns
Date: Wed, 23 Nov 2011 23:02:51 +0000

On 23 November 2011 23:00, Alexander Graf <address@hidden> wrote:
>
> On 23.11.2011, at 23:34, Peter Maydell wrote:
>
>> On 23 November 2011 22:03, Alexander Graf <address@hidden> wrote:
>>> Yes. Maybe we should add a check if input_state != output_state and
>>> only then do the conversion?
>>
>> I'm not sure this works (unless you go to the effort of implementing
>> target_to_host_waitstatus() which seems overkill to me) but I'm not
>> entirely sure what you're proposing to compare to what.
>
> It's an integer. If the number is the same before and after the wait
> syscall, we can safely assume that it's the same thing, so we don't
> have to convert it, no?

But you don't know whether it's the same before and after because
wait() didn't write to it [=> don't write to guest memory] or if
wait() did write to it but happened to write it as the same value
it had before [=> do write to guest memory].

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]