qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Torbjorn Granlund <tg@gmplib.org>
To: Richard Henderson <rth@twiddle.net>
Cc: Bug 1156313 <1156313@bugs.launchpad.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1156313] [NEW] X86-64 flags handling broken
Date: Thu, 21 Mar 2013 15:33:36 +0100	[thread overview]
Message-ID: <86r4j8960v.fsf@shell.gmplib.org> (raw)
In-Reply-To: <5148ABBC.2090507@twiddle.net> (Richard Henderson's message of "Tue\, 19 Mar 2013 11\:17\:32 -0700")

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

Richard Henderson <rth@twiddle.net> writes:

  Patch at http://patchwork.ozlabs.org/patch/229139/
  
Thanks.  I can confirm that this fixes the bug triggered by my test case
(and yours).  However, the instability of Debian GNU/Linux x86_64 has
not improved.

The exact same Debian version (debian "testing") updated at the same
time runs well on hardware.

My qemu Debian system now got messed up, since I attempted an upgrade in
the buggy qemu, which segfaulted several times during the upgrade.  I
need to reinstall, and then rely on -snapshot.

There is a problem with denorms which is reproducible, but whether that
is a qemu bug, and whether it can actually cause the observed
instability, is questionable.  Here is a testcase for that problem:


[-- Attachment #2: qemu-denorm-problem.s --]
[-- Type: application/octet-stream, Size: 279 bytes --]

	.text
	.globl	main
	.type	main, @function
main:
	mov	$0x10000000000000, %rax		# DBL_MIN
	movq	%rax, %xmm0
	movabsq	$0x4000000000000000, %rax	# 2.0
	movq	%rax, %xmm1
	divsd	%xmm1, %xmm0
	xorpd	%xmm1, %xmm1

1:	ucomisd	%xmm0, %xmm1
	je	1b

	mov	$0, %eax
	ret

	.size	main, .-main

[-- Attachment #3: Type: text/plain, Size: 669 bytes --]


It should terminate.  The observed buggy behaviour is that it hangs.

The instability problem can be observed at gmplib.org/devel/tm-date.html.
hwl-deb.gmplib.org is Debian under qemu with -cpu Haswell,+adx.

Not that the exact same qemu runs FreeBSD flawlessly (hwl.gmplib.org).
It is neither instable nor does it run the denorms testcase poorly.

I fully realise this is a hopeless bug report, but I am sure you can
reproduce it, since it is far from GMP specific.  After all apt-get
update; apt-get upgrade triggered it.  Debugging it will be a nightmare.

Qemu version: main git repo from less than a week ago + Richard ADX
patch.

-- 
Torbjörn

  reply	other threads:[~2013-03-21 14:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 19:34 [Qemu-devel] [Bug 1156313] [NEW] X86-64 flags handling broken Torbjorn Granlund
2013-03-19 18:17 ` Richard Henderson
2013-03-21 14:33   ` Torbjorn Granlund [this message]
2013-03-25 14:06     ` Torbjorn Granlund
2013-03-25 14:08       ` Peter Maydell
2013-03-25 16:09         ` Torbjorn Granlund
2017-11-07 19:10 ` [Qemu-devel] [Bug 1156313] " Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86r4j8960v.fsf@shell.gmplib.org \
    --to=tg@gmplib.org \
    --cc=1156313@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).