* [Qemu-devel] [Bug 1693649] [NEW] x86 pause misbehaves with -cpu haswell
@ 2017-05-26 0:44 Paul Goyette
2017-05-26 4:40 ` [Qemu-devel] [Bug 1693649] " Paul Goyette
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Paul Goyette @ 2017-05-26 0:44 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
Using qemu-2.9.0
When booting NetBSD using '-cpu haswell -smp 4', the system fails to
initialize the additional CPUs. It appears as though the "application
processor" enters routine x86_pause() but never returns.
x86_pause() is simply two assembler instructions: 'pause; ret;'
Replacing the routine with 'nop; nop; ret;' allows the system to
proceed, of course without the benefit of the pause instruction on spin-
loops!
Additionally, booting with '-cpu phenom -smp 4' also works, although the
system does seem confused about the type of CPU being used.
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1693649
Title:
x86 pause misbehaves with -cpu haswell
Status in QEMU:
New
Bug description:
Using qemu-2.9.0
When booting NetBSD using '-cpu haswell -smp 4', the system fails to
initialize the additional CPUs. It appears as though the "application
processor" enters routine x86_pause() but never returns.
x86_pause() is simply two assembler instructions: 'pause; ret;'
Replacing the routine with 'nop; nop; ret;' allows the system to
proceed, of course without the benefit of the pause instruction on
spin-loops!
Additionally, booting with '-cpu phenom -smp 4' also works, although
the system does seem confused about the type of CPU being used.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1693649/+subscriptions
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [Bug 1693649] Re: x86 pause misbehaves with -cpu haswell
2017-05-26 0:44 [Qemu-devel] [Bug 1693649] [NEW] x86 pause misbehaves with -cpu haswell Paul Goyette
@ 2017-05-26 4:40 ` Paul Goyette
2020-05-22 5:19 ` Thomas Huth
2020-05-22 19:25 ` Thomas Huth
2 siblings, 0 replies; 5+ messages in thread
From: Paul Goyette @ 2017-05-26 4:40 UTC (permalink / raw)
To: qemu-devel
Further investigation shows that pause may be working, but very very
slowly.
The "use-case" in NetBSD is for "hatching" application CPUs. The target
CPU runs a loop that does
while (flag_1 not set)
for (i = 0; i < 10000; i++)
x86_pause(); /* which is assembly code: "pause; ret;" */
...
set flag_2;
return;
The boot CPU executes the following code for each application CPU:
set flag_1;
for (i = 0; i < 100000 && flag_2 not set; i++)
i8254_delay(10); /* this should be 10usec per iteration, 1.0 sec total */
if (flag_2 not set)
panic(cpu did not hatch);
....
So, the 10k executions of x86_pause are taking in excess of 1 sec to
complete. Indeed, reducing that constant value from 10k to only 100
results in the same failure. So it would seem that the pause
instruction is taking an extremely long time to complete. (Further
reducing the interation count to only 50 results in success, although it
"feels" very sluggish.)
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1693649
Title:
x86 pause misbehaves with -cpu haswell
Status in QEMU:
New
Bug description:
Using qemu-2.9.0
When booting NetBSD using '-cpu haswell -smp 4', the system fails to
initialize the additional CPUs. It appears as though the "application
processor" enters routine x86_pause() but never returns.
x86_pause() is simply two assembler instructions: 'pause; ret;'
Replacing the routine with 'nop; nop; ret;' allows the system to
proceed, of course without the benefit of the pause instruction on
spin-loops!
Additionally, booting with '-cpu phenom -smp 4' also works, although
the system does seem confused about the type of CPU being used.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1693649/+subscriptions
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 1693649] Re: x86 pause misbehaves with -cpu haswell
2017-05-26 0:44 [Qemu-devel] [Bug 1693649] [NEW] x86 pause misbehaves with -cpu haswell Paul Goyette
2017-05-26 4:40 ` [Qemu-devel] [Bug 1693649] " Paul Goyette
@ 2020-05-22 5:19 ` Thomas Huth
2020-05-22 12:51 ` Paul Goyette
2020-05-22 19:25 ` Thomas Huth
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2020-05-22 5:19 UTC (permalink / raw)
To: qemu-devel
Can you still reproduce this issue with the latest version of QEMU
(currently 5.0)?
** Changed in: qemu
Status: New => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1693649
Title:
x86 pause misbehaves with -cpu haswell
Status in QEMU:
Incomplete
Bug description:
Using qemu-2.9.0
When booting NetBSD using '-cpu haswell -smp 4', the system fails to
initialize the additional CPUs. It appears as though the "application
processor" enters routine x86_pause() but never returns.
x86_pause() is simply two assembler instructions: 'pause; ret;'
Replacing the routine with 'nop; nop; ret;' allows the system to
proceed, of course without the benefit of the pause instruction on
spin-loops!
Additionally, booting with '-cpu phenom -smp 4' also works, although
the system does seem confused about the type of CPU being used.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1693649/+subscriptions
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bug 1693649] Re: x86 pause misbehaves with -cpu haswell
2020-05-22 5:19 ` Thomas Huth
@ 2020-05-22 12:51 ` Paul Goyette
0 siblings, 0 replies; 5+ messages in thread
From: Paul Goyette @ 2020-05-22 12:51 UTC (permalink / raw)
To: qemu-devel
Seems ok now.
On Fri, 22 May 2020, Thomas Huth wrote:
> Can you still reproduce this issue with the latest version of QEMU
> (currently 5.0)?
>
> ** Changed in: qemu
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1693649
>
> Title:
> x86 pause misbehaves with -cpu haswell
>
> Status in QEMU:
> Incomplete
>
> Bug description:
> Using qemu-2.9.0
>
> When booting NetBSD using '-cpu haswell -smp 4', the system fails to
> initialize the additional CPUs. It appears as though the "application
> processor" enters routine x86_pause() but never returns.
>
> x86_pause() is simply two assembler instructions: 'pause; ret;'
>
> Replacing the routine with 'nop; nop; ret;' allows the system to
> proceed, of course without the benefit of the pause instruction on
> spin-loops!
>
> Additionally, booting with '-cpu phenom -smp 4' also works, although
> the system does seem confused about the type of CPU being used.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qemu/+bug/1693649/+subscriptions
>
> !DSPAM:5ec7625658281532840571!
>
>
+--------------------+--------------------------+-----------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org |
+--------------------+--------------------------+-----------------------+
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1693649
Title:
x86 pause misbehaves with -cpu haswell
Status in QEMU:
Incomplete
Bug description:
Using qemu-2.9.0
When booting NetBSD using '-cpu haswell -smp 4', the system fails to
initialize the additional CPUs. It appears as though the "application
processor" enters routine x86_pause() but never returns.
x86_pause() is simply two assembler instructions: 'pause; ret;'
Replacing the routine with 'nop; nop; ret;' allows the system to
proceed, of course without the benefit of the pause instruction on
spin-loops!
Additionally, booting with '-cpu phenom -smp 4' also works, although
the system does seem confused about the type of CPU being used.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1693649/+subscriptions
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 1693649] Re: x86 pause misbehaves with -cpu haswell
2017-05-26 0:44 [Qemu-devel] [Bug 1693649] [NEW] x86 pause misbehaves with -cpu haswell Paul Goyette
2017-05-26 4:40 ` [Qemu-devel] [Bug 1693649] " Paul Goyette
2020-05-22 5:19 ` Thomas Huth
@ 2020-05-22 19:25 ` Thomas Huth
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2020-05-22 19:25 UTC (permalink / raw)
To: qemu-devel
Ok, thanks for checking again! So I'm closing this ticket now.
** Changed in: qemu
Status: Incomplete => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1693649
Title:
x86 pause misbehaves with -cpu haswell
Status in QEMU:
Fix Released
Bug description:
Using qemu-2.9.0
When booting NetBSD using '-cpu haswell -smp 4', the system fails to
initialize the additional CPUs. It appears as though the "application
processor" enters routine x86_pause() but never returns.
x86_pause() is simply two assembler instructions: 'pause; ret;'
Replacing the routine with 'nop; nop; ret;' allows the system to
proceed, of course without the benefit of the pause instruction on
spin-loops!
Additionally, booting with '-cpu phenom -smp 4' also works, although
the system does seem confused about the type of CPU being used.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1693649/+subscriptions
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-22 19:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 0:44 [Qemu-devel] [Bug 1693649] [NEW] x86 pause misbehaves with -cpu haswell Paul Goyette
2017-05-26 4:40 ` [Qemu-devel] [Bug 1693649] " Paul Goyette
2020-05-22 5:19 ` Thomas Huth
2020-05-22 12:51 ` Paul Goyette
2020-05-22 19:25 ` Thomas Huth
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).