qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] 4/5: Adjustment needed for (some?) amd64 guests on i386 hosts
@ 2008-10-01 18:40 Juergen Lock
  2008-10-01 20:20 ` Thiemo Seufer
  0 siblings, 1 reply; 6+ messages in thread
From: Juergen Lock @ 2008-10-01 18:40 UTC (permalink / raw)
  To: qemu-devel

Index: qemu/exec-all.h
@@ -30,7 +30,7 @@
 struct TranslationBlock;
 
 /* XXX: make safe guess about sizes */
-#define MAX_OP_PER_INSTR 64
+#define MAX_OP_PER_INSTR 128 /* 64 */
 /* A Call op needs up to 6 + 2N parameters (N = number of arguments).  */
 #define MAX_OPC_PARAM 10
 #define OPC_BUF_SIZE 512

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] 4/5: Adjustment needed for (some?) amd64 guests on i386 hosts
  2008-10-01 18:40 [Qemu-devel] [PATCH] 4/5: Adjustment needed for (some?) amd64 guests on i386 hosts Juergen Lock
@ 2008-10-01 20:20 ` Thiemo Seufer
  2008-10-01 21:18   ` [Qemu-devel] Documentation/tools on debuging dyngen code? Bruce Beare (bbeare)
  2008-10-02 18:47   ` [Qemu-devel] [PATCH] 4/5: Adjustment needed for (some?) amd64 guests on i386 hosts Juergen Lock
  0 siblings, 2 replies; 6+ messages in thread
From: Thiemo Seufer @ 2008-10-01 20:20 UTC (permalink / raw)
  To: Juergen Lock; +Cc: qemu-devel

Juergen Lock wrote:
> Index: qemu/exec-all.h
> @@ -30,7 +30,7 @@
>  struct TranslationBlock;
>  
>  /* XXX: make safe guess about sizes */
> -#define MAX_OP_PER_INSTR 64
> +#define MAX_OP_PER_INSTR 128 /* 64 */

Is this still needed? AFAIR a similiar problem was fixed a while ago.


Thiemo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Documentation/tools on debuging dyngen code?
  2008-10-01 20:20 ` Thiemo Seufer
@ 2008-10-01 21:18   ` Bruce Beare (bbeare)
  2008-10-02 14:51     ` Mulyadi Santosa
  2008-10-03 23:38     ` andrzej zaborowski
  2008-10-02 18:47   ` [Qemu-devel] [PATCH] 4/5: Adjustment needed for (some?) amd64 guests on i386 hosts Juergen Lock
  1 sibling, 2 replies; 6+ messages in thread
From: Bruce Beare (bbeare) @ 2008-10-01 21:18 UTC (permalink / raw)
  To: qemu-devel

I'm working on a 2.6.24 Linux port built for ARCH=powerpc and configured
for the PReP machine. I have the port booting using an unmodified 0.9.1
version (actually, head from the SVN repo) of qemu-system-ppc but
sometimes find that QEMU "hangs". Analysis of the hang reveals:

  o C-A C-X does not respond
  o QEMU is sucking up 100% cpu time of one processor
  o GDB to the kernel debug port (qemu option -s -p 1234) is non
responsive
  o ltrace, strace show no system or library calls in progress
  o GDB on QEMU shows that it is executing apparently valid code in the
0x4xxxxxxx
    range.

My conclusion is that QEMU is looping while executing the dynamically
generated code. I'd like to debug this further... and am looking for
some pointers on how to do so. Is there a built-in debugger? Is there a
particular probe point that I should set a GDB breakpoint on? What is
the general procedure for doing this level of debug?

Thanks for any help...
Bruce


bbeare@bbeare-lnx:/nobackup/bbeare/ppcroot$ pstack 21406
#0  0x0000000041c1bc23 in ?? ()
#1  0x0000000000000007 in ?? ()
#2  0x0000000000000000 in ?? ()
bbeare@bbeare-lnx:/nobackup/bbeare/ppcroot$ pstack 21406
#0  0x0000000041c1bc81 in ?? ()
#1  0x0000000000000000 in ?? ()
bbeare@bbeare-lnx:/nobackup/bbeare/ppcroot$ pstack 21406
#0  0x0000000041c1bc23 in ?? ()
#1  0x0000000000000007 in ?? ()
#2  0x0000000000000000 in ?? ()
bbeare@bbeare-lnx:/nobackup/bbeare/ppcroot$ pstack 21406
#0  0x0000000041c1bc30 in ?? ()
#1  0x0000000000000000 in ?? ()
bbeare@bbeare-lnx:/nobackup/bbeare/ppcroot$ pstack 21406
#0  0x0000000041c1bb6f in ?? ()
#1  0x0000000000000000 in ?? ()
bbeare@bbeare-lnx:/nobackup/bbeare/ppcroot$ pstack 21406
#0  0x0000000041c1bb71 in ?? ()
#1  0x0000000000000000 in ?? ()
bbeare@bbeare-lnx:/nobackup/bbeare/ppcroot$ pstack 21406
#0  0x0000000041c1bbf2 in ?? ()
#1  0x0000000000000007 in ?? ()
#2  0x0000000000000000 in ?? ()
bbeare@bbeare-lnx:/nobackup/bbeare/ppcroot$ pstack 21406
#0  0x0000000041c1bb53 in ?? ()
#1  0x0000000000000000 in ?? ()

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Documentation/tools on debuging dyngen code?
  2008-10-01 21:18   ` [Qemu-devel] Documentation/tools on debuging dyngen code? Bruce Beare (bbeare)
@ 2008-10-02 14:51     ` Mulyadi Santosa
  2008-10-03 23:38     ` andrzej zaborowski
  1 sibling, 0 replies; 6+ messages in thread
From: Mulyadi Santosa @ 2008-10-02 14:51 UTC (permalink / raw)
  To: qemu-devel

On 10/2/08, Bruce Beare (bbeare) <bbeare@cisco.com> wrote:
> I'm working on a 2.6.24 Linux port built for ARCH=powerpc and configured
> for the PReP machine. I have the port booting using an unmodified 0.9.1
> version (actually, head from the SVN repo) of qemu-system-ppc but
> sometimes find that QEMU "hangs". Analysis of the hang reveals:
>
>   o C-A C-X does not respond
>   o QEMU is sucking up 100% cpu time of one processor
>   o GDB to the kernel debug port (qemu option -s -p 1234) is non
> responsive
>   o ltrace, strace show no system or library calls in progress
>   o GDB on QEMU shows that it is executing apparently valid code in the
> 0x4xxxxxxx
>     range.
>
> My conclusion is that QEMU is looping while executing the dynamically
> generated code. I'd like to debug this further... and am looking for
> some pointers on how to do so. Is there a built-in debugger? Is there a
> particular probe point that I should set a GDB breakpoint on? What is
> the general procedure for doing this level of debug?

I suggest to observe the generated code first. Explore the -d option
of qemu. For complete list of what you can log, use "qemu -d ?".

regards,

Mulyadi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] 4/5: Adjustment needed for (some?) amd64 guests on i386 hosts
  2008-10-01 20:20 ` Thiemo Seufer
  2008-10-01 21:18   ` [Qemu-devel] Documentation/tools on debuging dyngen code? Bruce Beare (bbeare)
@ 2008-10-02 18:47   ` Juergen Lock
  1 sibling, 0 replies; 6+ messages in thread
From: Juergen Lock @ 2008-10-02 18:47 UTC (permalink / raw)
  To: Thiemo Seufer; +Cc: qemu-devel

On Wed, Oct 01, 2008 at 10:20:09PM +0200, Thiemo Seufer wrote:
> Juergen Lock wrote:
> > Index: qemu/exec-all.h
> > @@ -30,7 +30,7 @@
> >  struct TranslationBlock;
> >  
> >  /* XXX: make safe guess about sizes */
> > -#define MAX_OP_PER_INSTR 64
> > +#define MAX_OP_PER_INSTR 128 /* 64 */
> 
> Is this still needed? AFAIR a similiar problem was fixed a while ago.

Still needed.  Tested with FreeBSD 7.0-RELEASE-amd64-livefs.iso, qemu
still crashes in the old way without this patch.

 Regards,
	Juergen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Documentation/tools on debuging dyngen code?
  2008-10-01 21:18   ` [Qemu-devel] Documentation/tools on debuging dyngen code? Bruce Beare (bbeare)
  2008-10-02 14:51     ` Mulyadi Santosa
@ 2008-10-03 23:38     ` andrzej zaborowski
  1 sibling, 0 replies; 6+ messages in thread
From: andrzej zaborowski @ 2008-10-03 23:38 UTC (permalink / raw)
  To: qemu-devel

2008/10/1 Bruce Beare (bbeare) <bbeare@cisco.com>:
> I'm working on a 2.6.24 Linux port built for ARCH=powerpc and configured
> for the PReP machine. I have the port booting using an unmodified 0.9.1
> version (actually, head from the SVN repo) of qemu-system-ppc but
> sometimes find that QEMU "hangs". Analysis of the hang reveals:
>
>  o C-A C-X does not respond
>  o QEMU is sucking up 100% cpu time of one processor
>  o GDB to the kernel debug port (qemu option -s -p 1234) is non
> responsive
>  o ltrace, strace show no system or library calls in progress
>  o GDB on QEMU shows that it is executing apparently valid code in the
> 0x4xxxxxxx
>    range.
>
> My conclusion is that QEMU is looping while executing the dynamically
> generated code. I'd like to debug this further... and am looking for
> some pointers on how to do so. Is there a built-in debugger? Is there a

I'm seeing a similar lock-up since around the time of the conversion
to TCG.  It's caused by an interrupt being lost for some reason (a
signal not causing an exit from cpu loop properly).  I've hit it on an
ARM target and Daniel Jacobowitz reproduced it on an x86 target).  If
what you see is the same problem, adding -clock unix manages to work
around it because it means that signals will keep coming even if one
is lost and eventually the cpu loop will end, but this isn't a proper
fix.

Cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-03 23:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01 18:40 [Qemu-devel] [PATCH] 4/5: Adjustment needed for (some?) amd64 guests on i386 hosts Juergen Lock
2008-10-01 20:20 ` Thiemo Seufer
2008-10-01 21:18   ` [Qemu-devel] Documentation/tools on debuging dyngen code? Bruce Beare (bbeare)
2008-10-02 14:51     ` Mulyadi Santosa
2008-10-03 23:38     ` andrzej zaborowski
2008-10-02 18:47   ` [Qemu-devel] [PATCH] 4/5: Adjustment needed for (some?) amd64 guests on i386 hosts Juergen Lock

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).