Re: Bug: fstenv is wrongly implemented

2021-04-06 Thread Ziqiao Kong
Hi! I checked that bug and list discussion and it indeed was the bug I referred to. It seems that the patch should be quite straightforward but no idea why the review of the patch was stalled at that time. I would try to draft an updated patch these days. Ziqiao On Fri, Apr 2, 2021 at 6:49 PM Pe

Re: Bug: fstenv is wrongly implemented

2021-04-02 Thread Peter Maydell
On Fri, 2 Apr 2021 at 09:47, Paolo Bonzini wrote: > > On 02/04/21 10:29, Ziqiao Kong wrote: > > > > According to git blame, this bug is introduced about 13 years ago: > > https://github.com/qemu/qemu/blame/633decd71119a4293e5e53e6059026c517a8bef0/target-i386/fpu_helper.c#L997. > > > > We also had

Re: Bug: fstenv is wrongly implemented

2021-04-02 Thread Paolo Bonzini
On 02/04/21 10:56, Ziqiao Kong wrote: Hi! Thanks for your reply. I read the IA32 manual just now and indeed the patch is not correct. Is there any related patch for this bug? No, there isn't. Paolo

Re: Bug: fstenv is wrongly implemented

2021-04-02 Thread Ziqiao Kong
Hi! Thanks for your reply. I read the IA32 manual just now and indeed the patch is not correct. Is there any related patch for this bug? Ziqiao On Fri, Apr 2, 2021 at 4:45 PM Paolo Bonzini wrote: > > On 02/04/21 10:29, Ziqiao Kong wrote: > > > > According to git blame, this bug is introduced a

Re: Bug: fstenv is wrongly implemented

2021-04-02 Thread Paolo Bonzini
On 02/04/21 10:29, Ziqiao Kong wrote: According to git blame, this bug is introduced about 13 years ago: https://github.com/qemu/qemu/blame/633decd71119a4293e5e53e6059026c517a8bef0/target-i386/fpu_helper.c#L997. We also had a patch for this bug: https://github.com/unicorn-engine/unicorn/commit/

Bug: fstenv is wrongly implemented

2021-04-02 Thread Ziqiao Kong
Hello everyone, I am an active maintainer of Unicorn engine (https://github.com/unicorn-engine). During my development, I found that the fstenv implementation in qemu upstream is incorrect. Below is the code snippet from target/i386/tcg/fpu_helper.c (https://github.com/qemu/qemu/blob/266469947161