All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...
@ 2009-01-18 23:14 Juergen Lock
  2009-01-20 14:19 ` Jędrzej Kalinowski
  2009-01-24 11:55 ` [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Blue Swirl
  0 siblings, 2 replies; 13+ messages in thread
From: Juergen Lock @ 2009-01-18 23:14 UTC (permalink / raw)
  To: qemu-devel, freebsd-emulation

Hi!

 I've made another experimental FreeBSD qemu-devel port update,
	http://people.freebsd.org/~nox/qemu/qemu-devel-20090118.patch
and of the few things I've tested so far I only found vmmouse and -vga vmware
broken now, vmmouse leaves the mouse cursor stuck in the top left corner,
and -vga vmware causes a broken display at least with xorg's vmware driver.
(both of these worked at least with the r6082, 2008-12-18 snapshot as
posted in
	http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg01417.html
)

 virtio and hpet still seem to work, and slirp indeed seems to finally work
on amd64 hosts.

 FreeBSD has a #define sigev_signo	__sigev_u.__sigev_signo
in <sys/signal.h> so I've had to patch it to something different in
the posix-aio-compat code:

Index: qemu/posix-aio-compat.h
@@ -29,7 +29,7 @@
     int aio_fildes;
     void *aio_buf;
     size_t aio_nbytes;
-    int sigev_signo;
+    int ev_signo;
     off_t aio_offset;
 
     /* private */
Index: qemu/posix-aio-compat.c
@@ -94,7 +94,7 @@
         idle_threads++;
         pthread_mutex_unlock(&lock);
 
-        kill(getpid(), aiocb->sigev_signo);
+        kill(getpid(), aiocb->ev_signo);
     }
 
     idle_threads--;
Index: qemu/block-raw-posix.c
@@ -579,7 +579,7 @@
     if (!acb)
         return NULL;
     acb->aiocb.aio_fildes = s->fd;
-    acb->aiocb.sigev_signo = SIGUSR2;
+    acb->aiocb.ev_signo = SIGUSR2;
     acb->aiocb.aio_buf = buf;
     if (nb_sectors < 0)
         acb->aiocb.aio_nbytes = -nb_sectors;

 More tests welcome...

 Enjoy,
	Juergen

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

* Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo;  vmmouse, -vga vmware broken, slirp...
  2009-01-18 23:14 [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Juergen Lock
@ 2009-01-20 14:19 ` Jędrzej Kalinowski
  2009-01-20 19:31   ` Matt
  2009-01-20 23:12   ` More displaystate fallout? (was: Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...) Juergen Lock
  2009-01-24 11:55 ` [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Blue Swirl
  1 sibling, 2 replies; 13+ messages in thread
From: Jędrzej Kalinowski @ 2009-01-20 14:19 UTC (permalink / raw)
  To: qemu-devel, freebsd-emulation


On Mon, 19 Jan 2009 00:14:36 +0100, Juergen Lock <nox@jelal.kn-bremen.de>
wrote:
> Hi!
> 
>  I've made another experimental FreeBSD qemu-devel port update,
> 	http://people.freebsd.org/~nox/qemu/qemu-devel-20090118.patch
> and of the few things I've tested so far I only found vmmouse and -vga
> vmware
> broken now, vmmouse leaves the mouse cursor stuck in the top left corner,
> and -vga vmware causes a broken display at least with xorg's vmware
driver.
> (both of these worked at least with the r6082, 2008-12-18 snapshot as
> posted in
> 	http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg01417.html
> )
> 
>  virtio and hpet still seem to work, and slirp indeed seems to finally
work
> on amd64 hosts.
> 
> 
>  More tests welcome...
> 

Hello, I succesfully built it on CURRENT, however i get a segmentation
fault, when trying
to enter qemu monitor or serial console (left Alt+2,3). 

Can you reproduce this behaviour? The problem does not appear on your
previous snapshot from 2008-12-18.

>  Enjoy,
> 	Juergen


Regards, 
Jedrzej Kalinowski


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

* Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...
  2009-01-20 14:19 ` Jędrzej Kalinowski
@ 2009-01-20 19:31   ` Matt
  2009-01-20 23:12   ` More displaystate fallout? (was: Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...) Juergen Lock
  1 sibling, 0 replies; 13+ messages in thread
From: Matt @ 2009-01-20 19:31 UTC (permalink / raw)
  To: qemu-devel, freebsd-emulation

On Tue, Jan 20, 2009 at 8:19 AM, Jędrzej Kalinowski
<kalinoj1@iem.pw.edu.pl> wrote:
>
> On Mon, 19 Jan 2009 00:14:36 +0100, Juergen Lock <nox@jelal.kn-bremen.de>
> wrote:
>> Hi!
>>
>>  I've made another experimental FreeBSD qemu-devel port update,
>>       http://people.freebsd.org/~nox/qemu/qemu-devel-20090118.patch
>> and of the few things I've tested so far I only found vmmouse and -vga
>> vmware
>> broken now, vmmouse leaves the mouse cursor stuck in the top left corner,
>> and -vga vmware causes a broken display at least with xorg's vmware
> driver.
>> (both of these worked at least with the r6082, 2008-12-18 snapshot as
>> posted in
>>       http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg01417.html
>> )
>>
>>  virtio and hpet still seem to work, and slirp indeed seems to finally
> work
>> on amd64 hosts.
>>
>>
>>  More tests welcome...
>>
>
> Hello, I succesfully built it on CURRENT, however i get a segmentation
> fault, when trying
> to enter qemu monitor or serial console (left Alt+2,3).

This snapshot is working well for me on an amd64 host (with
kqemu-kmod) running -CURRENT from 1/8/2009 with WinXP guests.

> Can you reproduce this behaviour? The problem does not appear on your
> previous snapshot from 2008-12-18.

I can't reproduce this problem, but I'm running in headless mode only
and accessing the monitor and console via VNC so that might be a
difference.

Matt

>>  Enjoy,
>>       Juergen
>
>
> Regards,
> Jedrzej Kalinowski
>
>
> _______________________________________________
> freebsd-emulation@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
> To unsubscribe, send any mail to "freebsd-emulation-unsubscribe@freebsd.org"
>

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

* More displaystate fallout? (was: Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...)
  2009-01-20 14:19 ` Jędrzej Kalinowski
  2009-01-20 19:31   ` Matt
@ 2009-01-20 23:12   ` Juergen Lock
  2009-01-21 11:15     ` [Qemu-devel] Re: More displaystate fallout? (was: Re: [Qemu- devel] testing qemu svn r6367 on FreeB SD - sigev_signo; vmmouse, -vga vmware broken , slirp...) Jędrzej Kalinowski
  1 sibling, 1 reply; 13+ messages in thread
From: Juergen Lock @ 2009-01-20 23:12 UTC (permalink / raw)
  To: J??drzej Kalinowski; +Cc: freebsd-emulation, qemu-devel

On Tue, Jan 20, 2009 at 03:19:45PM +0100, J??drzej Kalinowski wrote:
> On Mon, 19 Jan 2009 00:14:36 +0100, Juergen Lock <nox@jelal.kn-bremen.de>
> wrote:
> > Hi!
> > 
> >  I've made another experimental FreeBSD qemu-devel port update,
> > 	http://people.freebsd.org/~nox/qemu/qemu-devel-20090118.patch
> > and of the few things I've tested so far I only found vmmouse and -vga
> > vmware
> > broken now, vmmouse leaves the mouse cursor stuck in the top left corner,
> > and -vga vmware causes a broken display at least with xorg's vmware
> driver.
> > (both of these worked at least with the r6082, 2008-12-18 snapshot as
> > posted in
> > 	http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg01417.html
> > )
> > 
> >  virtio and hpet still seem to work, and slirp indeed seems to finally
> work
> > on amd64 hosts.
> > 
> > 
> >  More tests welcome...
> > 
> 
> Hello, I succesfully built it on CURRENT, however i get a segmentation
> fault, when trying
> to enter qemu monitor or serial console (left Alt+2,3). 
> 
Btw here it's ctrl-alt-2 to get to the monitor at least with sdl.

> Can you reproduce this behaviour? The problem does not appear on your
> previous snapshot from 2008-12-18.

 No I cannot reproduce that (at least on 6.3/i386 and an older
7-stable/amd64), can you get a backtrace?  (do something like:
	gdb /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2009-01-18_18/i386-softmmu/qemu qemu.core
and then in gdb do `bt' - that qemu executable below the work/ dir should
still have debug symbols so you'll get a more meaningful backtrace than
with the installed executable from below /usr/local/bin.)

 I do notice tho that the monitor output on vc is slow now, almost as if
coming over a 1200 bps serial line or so... :)  So definitely _something_
has changed.  (now that I look for it, the guest's vga textconsole might
have been faster before as well, tho its not _as_ slow as the monitor.)

 Oh and if I put the monitor on qemu's tty (-monitor stdio) its also
not slow.

 Cheers,
	Juergen

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

* [Qemu-devel] Re: More displaystate fallout? (was: Re: [Qemu-   devel] testing qemu svn  r6367 on FreeB   SD - sigev_signo; vmmouse, -vga vmware broken  , slirp...)
  2009-01-20 23:12   ` More displaystate fallout? (was: Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...) Juergen Lock
@ 2009-01-21 11:15     ` Jędrzej Kalinowski
  2009-01-21 12:28       ` [Qemu-devel] Re: More displaystate fallout? Stefano Stabellini
  0 siblings, 1 reply; 13+ messages in thread
From: Jędrzej Kalinowski @ 2009-01-21 11:15 UTC (permalink / raw)
  To: qemu-devel, freebsd-emulation


On Wed, 21 Jan 2009 00:12:48 +0100, Juergen Lock <nox@jelal.kn-bremen.de>
wrote:
> On Tue, Jan 20, 2009 at 03:19:45PM +0100, J??drzej Kalinowski wrote:
> Btw here it's ctrl-alt-2 to get to the monitor at least with sdl.
> 

I wasn't specific, sorry - I use: -curses option, as qemu is beeing run in
ssh session.

 
>  No I cannot reproduce that (at least on 6.3/i386 and an older
> 7-stable/amd64), can you get a backtrace?  (do something like:
> 	gdb
>
	/usr/ports/emulators/qemu-devel/work/qemu-snapshot-2009-01-18_18/i386-softmmu/qemu
> 	qemu.core
> and then in gdb do `bt' - that qemu executable below the work/ dir should
> still have debug symbols so you'll get a more meaningful backtrace than
> with the installed executable from below /usr/local/bin.)
> 

Thanks for your tip - I get this trace:

#0  0x000000080121179c in free () from /lib/libc.so.7
#1  0x0000000801082d1e in _nc_freewin () from /lib/libncurses.so.7
#2  0x000000000048219a in curses_calc_pad () at curses.c:72
#3  0x0000000000463c16 in console_select (index=Variable "index" is not
available.
) at console.h:162
#4  0x00000000004828e9 in curses_refresh (ds=0x80220e140) at curses.c:227
#5  0x00000000004081e6 in gui_update (opaque=0x80d254300) at console.h:180
#6  0x00000000004072ac in qemu_run_timers (ptimer_head=0xa591b0,
current_time=330803229) at
/tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:1222
#7  0x0000000000409547 in main_loop_wait (timeout=Variable "timeout" is not
available.
) at /tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:3702
#8  0x000000000040cb3f in main (argc=5, argv=0x7fffffffeaa8, envp=Variable
"envp" is not available.
) at /tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:3851

So it's somewhat related to ncurses - but my older snapshot still works
fine, and doesn't crash in monitor/serial view.


>  I do notice tho that the monitor output on vc is slow now, almost as if
> coming over a 1200 bps serial line or so... :)  So definitely _something_
> has changed.  (now that I look for it, the guest's vga textconsole might
> have been faster before as well, tho its not _as_ slow as the monitor.)
> 
>  Oh and if I put the monitor on qemu's tty (-monitor stdio) its also
> not slow.
> 
>  Cheers,
> 	Juergen

Thanks for your help,
Jedrzej Kalinowski

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

* Re: [Qemu-devel] Re: More displaystate fallout?
  2009-01-21 11:15     ` [Qemu-devel] Re: More displaystate fallout? (was: Re: [Qemu- devel] testing qemu svn r6367 on FreeB SD - sigev_signo; vmmouse, -vga vmware broken , slirp...) Jędrzej Kalinowski
@ 2009-01-21 12:28       ` Stefano Stabellini
  2009-01-21 17:46         ` Stefan Weil
  0 siblings, 1 reply; 13+ messages in thread
From: Stefano Stabellini @ 2009-01-21 12:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: freebsd-emulation

Jędrzej Kalinowski wrote:

> Thanks for your tip - I get this trace:
> 
> #0  0x000000080121179c in free () from /lib/libc.so.7
> #1  0x0000000801082d1e in _nc_freewin () from /lib/libncurses.so.7
> #2  0x000000000048219a in curses_calc_pad () at curses.c:72
> #3  0x0000000000463c16 in console_select (index=Variable "index" is not
> available.
> ) at console.h:162
> #4  0x00000000004828e9 in curses_refresh (ds=0x80220e140) at curses.c:227
> #5  0x00000000004081e6 in gui_update (opaque=0x80d254300) at console.h:180
> #6  0x00000000004072ac in qemu_run_timers (ptimer_head=0xa591b0,
> current_time=330803229) at
> /tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:1222
> #7  0x0000000000409547 in main_loop_wait (timeout=Variable "timeout" is not
> available.
> ) at /tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:3702
> #8  0x000000000040cb3f in main (argc=5, argv=0x7fffffffeaa8, envp=Variable
> "envp" is not available.
> ) at /tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:3851
> 
> So it's somewhat related to ncurses - but my older snapshot still works
> fine, and doesn't crash in monitor/serial view.
> 

I am able to reproce this bug, I am on it.

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

* Re: [Qemu-devel] Re: More displaystate fallout?
  2009-01-21 12:28       ` [Qemu-devel] Re: More displaystate fallout? Stefano Stabellini
@ 2009-01-21 17:46         ` Stefan Weil
  2009-01-21 18:15           ` Stefano Stabellini
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Weil @ 2009-01-21 17:46 UTC (permalink / raw)
  To: qemu-devel

Stefano Stabellini schrieb:
> Jędrzej Kalinowski wrote:
>
>   
>> Thanks for your tip - I get this trace:
>>
>> #0  0x000000080121179c in free () from /lib/libc.so.7
>> #1  0x0000000801082d1e in _nc_freewin () from /lib/libncurses.so.7
>> #2  0x000000000048219a in curses_calc_pad () at curses.c:72
>> #3  0x0000000000463c16 in console_select (index=Variable "index" is not
>> available.
>> ) at console.h:162
>> #4  0x00000000004828e9 in curses_refresh (ds=0x80220e140) at curses.c:227
>> #5  0x00000000004081e6 in gui_update (opaque=0x80d254300) at console.h:180
>> #6  0x00000000004072ac in qemu_run_timers (ptimer_head=0xa591b0,
>> current_time=330803229) at
>> /tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:1222
>> #7  0x0000000000409547 in main_loop_wait (timeout=Variable "timeout" is not
>> available.
>> ) at /tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:3702
>> #8  0x000000000040cb3f in main (argc=5, argv=0x7fffffffeaa8, envp=Variable
>> "envp" is not available.
>> ) at /tmp/ports/qemu-devel/qemu-snapshot-2009-01-18_18/vl.c:3851
>>
>> So it's somewhat related to ncurses - but my older snapshot still works
>> fine, and doesn't crash in monitor/serial view.
>>
>>     
>
> I am able to reproce this bug, I am on it.
>
>
>
>   


Hi,

maybe the bug is related to a similar one I got:

Emulation of a system without VGA will crash while switching from
serial console to monitor. I got this crash with SDL and VNC displays.

The crash is caused by a surface which is too small: your patch for
dumb terminals assumes 640 x 480 pixels, but the monitor is much
larger. So the allocated display data is too small.

Regards
Stefan

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

* Re: [Qemu-devel] Re: More displaystate fallout?
  2009-01-21 17:46         ` Stefan Weil
@ 2009-01-21 18:15           ` Stefano Stabellini
  2009-01-21 21:34             ` Stefan Weil
  0 siblings, 1 reply; 13+ messages in thread
From: Stefano Stabellini @ 2009-01-21 18:15 UTC (permalink / raw)
  To: qemu-devel

Stefan Weil wrote:

> Hi,
> 
> maybe the bug is related to a similar one I got:
> 
> Emulation of a system without VGA will crash while switching from
> serial console to monitor. I got this crash with SDL and VNC displays.


I don't think that the problem you are seeing is related to this one.
I assume that you have manually applied this patch:

http://lists.gnu.org/archive/html/qemu-devel/2009-01/msg01304.html

because it has not been committed yet.

 
> The crash is caused by a surface which is too small: your patch for
> dumb terminals assumes 640 x 480 pixels, but the monitor is much
> larger. So the allocated display data is too small.
> 


I tried to reproduce the issue but so far I didn't get any crash: I am
starting a VM with -vga none and switching from the monitor to the
serial and back.
So far is working correctly for me.

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

* Re: [Qemu-devel] Re: More displaystate fallout?
  2009-01-21 18:15           ` Stefano Stabellini
@ 2009-01-21 21:34             ` Stefan Weil
  2009-01-22 14:11               ` Stefano Stabellini
  2009-01-29 14:55               ` Stefano Stabellini
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Weil @ 2009-01-21 21:34 UTC (permalink / raw)
  To: qemu-devel

Stefano Stabellini schrieb:
> Stefan Weil wrote:
>
>   
>> Hi,
>>
>> maybe the bug is related to a similar one I got:
>>
>> Emulation of a system without VGA will crash while switching from
>> serial console to monitor. I got this crash with SDL and VNC displays.
>>     
>
>
> I don't think that the problem you are seeing is related to this one.
> I assume that you have manually applied this patch:
>
> http://lists.gnu.org/archive/html/qemu-devel/2009-01/msg01304.html
>
> because it has not been committed yet.
>
>  
>   

Not exactly :-)

I had made the same change before you published your patch.
Because it worked only partially, I did not publish my change.


>> The crash is caused by a surface which is too small: your patch for
>> dumb terminals assumes 640 x 480 pixels, but the monitor is much
>> larger. So the allocated display data is too small.
>>
>>     
>
>
> I tried to reproduce the issue but so far I didn't get any crash: I am
> starting a VM with -vga none and switching from the monitor to the
> serial and back.
> So far is working correctly for me.
>
>
>
>
>   

To reproduce it, the 1st console window must be larger than 640 x 480
(or the surface of dumb terminal smaller than this).

Systems without VGA start with the monitor console which is larger.
Qemu (SDL or VNC) will crash when switching from 1st to 2nd console
and then back to 1st (which will never show again).

See stack trace below. Maybe you must add a simple assertion to console.c
to see the access violation.

A simple (but crude) fix is to increase the size of the surface.

Regards
Stefan Weil


qemu-system-mipsel: /home/stefan/src/qemu/trunk/console.c:456:
vga_putcharxy: Assertion `d < ds->surface->data + ds->surface->linesize
* ds->surface->height' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fbd8b6b26e0 (LWP 15733)]
0x00007fbd89d04ed5 in raise () from /lib/libc.so.6
(gdb) i s
#0  0x00007fbd89d04ed5 in raise () from /lib/libc.so.6
#1  0x00007fbd89d063f3 in abort () from /lib/libc.so.6
#2  0x00007fbd89cfddc9 in __assert_fail () from /lib/libc.so.6
#3  0x0000000000487481 in vga_putcharxy (ds=0xf5d6e0, x=0, y=30, ch=32,
t_attrib=0x12a28d9) at ~/src/qemu/trunk/console.c:456
#4  0x0000000000487dc4 in console_refresh (s=0x1011b60) at
~/src/qemu/trunk/console.c:640
#5  0x00000000004892f4 in text_console_invalidate (opaque=0x1011b60) at
~/src/qemu/trunk/console.c:1202
#6  0x0000000000486e69 in vga_hw_invalidate () at
~/src/qemu/trunk/console.c:173
#7  0x0000000000488e02 in console_select (index=0) at
~/src/qemu/trunk/console.c:1081
#8  0x00000000004aab61 in sdl_refresh (ds=0xf5d6e0) at
~/src/qemu/trunk/sdl.c:391
#9  0x000000000040b2d3 in dpy_refresh (s=0xf5d6e0) at
~/src/qemu/trunk/console.h:180
#10 0x000000000040b240 in gui_update (opaque=0xf5d6e0) at
~/src/qemu/trunk/vl.c:3409
#11 0x00000000004074ef in qemu_run_timers (ptimer_head=0xb8f900,
current_time=11851244) at ~/src/qemu/trunk/vl.c:1211
#12 0x000000000040bbba in main_loop_wait (timeout=0) at
~/src/qemu/trunk/vl.c:3721
#13 0x000000000040c001 in main_loop () at ~/src/qemu/trunk/vl.c:3870
#14 0x000000000040ebf7 in main (argc=13, argv=0x7fff936d8a78,
envp=0x7fff936d8ae8) at ~/src/qemu/trunk/vl.c:5749
(gdb) up
#1  0x00007fbd89d063f3 in abort () from /lib/libc.so.6
(gdb)
#2  0x00007fbd89cfddc9 in __assert_fail () from /lib/libc.so.6
(gdb)
#3  0x0000000000487481 in vga_putcharxy (ds=0xf5d6e0, x=0, y=30, ch=32,
t_attrib=0x12a28d9) at ~/src/qemu/trunk/console.c:456
456         assert(d < ds->surface->data + ds->surface->linesize *
ds->surface->height);
(gdb) p *ds->surface
$1 = {flags = 2 '\002', width = 640, height = 480, linesize = 2560, data
= 0x115bc10 "", pf = {bits_per_pixel = 32 ' ',
    bytes_per_pixel = 4 '\004', depth = 24 '\030', rmask = 16711680,
gmask = 65280, bmask = 255, amask = 0, rshift = 16 '\020',
    gshift = 8 '\b', bshift = 0 '\0', ashift = 0 '\0', rmax = 255 '?',
gmax = 255 '?', bmax = 255 '?', amax = 0 '\0'}}

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

* Re: [Qemu-devel] Re: More displaystate fallout?
  2009-01-21 21:34             ` Stefan Weil
@ 2009-01-22 14:11               ` Stefano Stabellini
  2009-01-27 14:23                 ` Stefano Stabellini
  2009-01-29 14:55               ` Stefano Stabellini
  1 sibling, 1 reply; 13+ messages in thread
From: Stefano Stabellini @ 2009-01-22 14:11 UTC (permalink / raw)
  To: qemu-devel

Stefan Weil wrote:

> To reproduce it, the 1st console window must be larger than 640 x 480
> (or the surface of dumb terminal smaller than this).
> 
> Systems without VGA start with the monitor console which is larger.
> Qemu (SDL or VNC) will crash when switching from 1st to 2nd console
> and then back to 1st (which will never show again).
> 
> See stack trace below. Maybe you must add a simple assertion to console.c
> to see the access violation.
> 
> A simple (but crude) fix is to increase the size of the surface.
> 



I am still unable to get a crash but I was able to get few rendering
problems.
However I think I understand the issue: if the is no graphic card and
the first console has a fixed size, the size of the display surface may
be wrong.

Does this patch fixes the problem for you?

---

diff --git a/console.c b/console.c
index dbb3b70..e02cf63 100644
--- a/console.c
+++ b/console.c
@@ -1419,13 +1419,22 @@ CharDriverState *text_console_init(const char *p)
 void text_consoles_set_display(DisplayState *ds)
 {
     int i;
+    TextConsole *s;
 
     for (i = 0; i < n_text_consoles; i++) {
         text_console_do_init(text_consoles[i], ds, text_console_strs[i]);
         qemu_free(text_console_strs[i]);
     }
-
     n_text_consoles = 0;
+
+    /* If there are no graphic cards and the first console has a fixed
+     * size we need to resize the screen surface according to the size
+     * of the first console */
+    s = consoles[0];
+    if (s && s->console_type == TEXT_CONSOLE_FIXED_SIZE) {
+        ds->surface = qemu_resize_displaysurface(ds->surface, s->g_width, s->g_height, 32, 4 * s->g_width);
+        dpy_resize(ds);
+    }
 }
 
 void qemu_console_resize(DisplayState *ds, int width, int height)

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

* Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...
  2009-01-18 23:14 [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Juergen Lock
  2009-01-20 14:19 ` Jędrzej Kalinowski
@ 2009-01-24 11:55 ` Blue Swirl
  1 sibling, 0 replies; 13+ messages in thread
From: Blue Swirl @ 2009-01-24 11:55 UTC (permalink / raw)
  To: qemu-devel, freebsd-emulation

On 1/19/09, Juergen Lock <nox@jelal.kn-bremen.de> wrote:
> Hi!
>
>   I've made another experimental FreeBSD qemu-devel port update,
>         http://people.freebsd.org/~nox/qemu/qemu-devel-20090118.patch
>  and of the few things I've tested so far I only found vmmouse and -vga vmware
>  broken now, vmmouse leaves the mouse cursor stuck in the top left corner,
>  and -vga vmware causes a broken display at least with xorg's vmware driver.
>  (both of these worked at least with the r6082, 2008-12-18 snapshot as
>  posted in
>         http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg01417.html
>  )
>
>   virtio and hpet still seem to work, and slirp indeed seems to finally work
>  on amd64 hosts.
>
>   FreeBSD has a #define sigev_signo      __sigev_u.__sigev_signo
>  in <sys/signal.h> so I've had to patch it to something different in
>  the posix-aio-compat code:
>
>  Index: qemu/posix-aio-compat.h
>  @@ -29,7 +29,7 @@
>      int aio_fildes;
>      void *aio_buf;
>      size_t aio_nbytes;
>  -    int sigev_signo;
>  +    int ev_signo;
>      off_t aio_offset;
>
>      /* private */
>  Index: qemu/posix-aio-compat.c
>  @@ -94,7 +94,7 @@
>          idle_threads++;
>          pthread_mutex_unlock(&lock);
>
>  -        kill(getpid(), aiocb->sigev_signo);
>  +        kill(getpid(), aiocb->ev_signo);
>      }
>
>      idle_threads--;
>  Index: qemu/block-raw-posix.c
>  @@ -579,7 +579,7 @@
>      if (!acb)
>          return NULL;
>      acb->aiocb.aio_fildes = s->fd;
>  -    acb->aiocb.sigev_signo = SIGUSR2;
>  +    acb->aiocb.ev_signo = SIGUSR2;
>      acb->aiocb.aio_buf = buf;
>      if (nb_sectors < 0)
>          acb->aiocb.aio_nbytes = -nb_sectors;
>
>   More tests welcome...

Thanks, applied.

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

* Re: [Qemu-devel] Re: More displaystate fallout?
  2009-01-22 14:11               ` Stefano Stabellini
@ 2009-01-27 14:23                 ` Stefano Stabellini
  0 siblings, 0 replies; 13+ messages in thread
From: Stefano Stabellini @ 2009-01-27 14:23 UTC (permalink / raw)
  To: qemu-devel

Any update on this?

Stefano Stabellini wrote:

> Stefan Weil wrote:
> 
>> To reproduce it, the 1st console window must be larger than 640 x 480
>> (or the surface of dumb terminal smaller than this).
>>
>> Systems without VGA start with the monitor console which is larger.
>> Qemu (SDL or VNC) will crash when switching from 1st to 2nd console
>> and then back to 1st (which will never show again).
>>
>> See stack trace below. Maybe you must add a simple assertion to console.c
>> to see the access violation.
>>
>> A simple (but crude) fix is to increase the size of the surface.
>>
> 
> 
> 
> I am still unable to get a crash but I was able to get few rendering
> problems.
> However I think I understand the issue: if the is no graphic card and
> the first console has a fixed size, the size of the display surface may
> be wrong.
> 
> Does this patch fixes the problem for you?
> 
> ---
> 
> diff --git a/console.c b/console.c
> index dbb3b70..e02cf63 100644
> --- a/console.c
> +++ b/console.c
> @@ -1419,13 +1419,22 @@ CharDriverState *text_console_init(const char *p)
>  void text_consoles_set_display(DisplayState *ds)
>  {
>      int i;
> +    TextConsole *s;
>  
>      for (i = 0; i < n_text_consoles; i++) {
>          text_console_do_init(text_consoles[i], ds, text_console_strs[i]);
>          qemu_free(text_console_strs[i]);
>      }
> -
>      n_text_consoles = 0;
> +
> +    /* If there are no graphic cards and the first console has a fixed
> +     * size we need to resize the screen surface according to the size
> +     * of the first console */
> +    s = consoles[0];
> +    if (s && s->console_type == TEXT_CONSOLE_FIXED_SIZE) {
> +        ds->surface = qemu_resize_displaysurface(ds->surface, s->g_width, s->g_height, 32, 4 * s->g_width);
> +        dpy_resize(ds);
> +    }
>  }
>  
>  void qemu_console_resize(DisplayState *ds, int width, int height)
> 
> 
> 

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

* Re: [Qemu-devel] Re: More displaystate fallout?
  2009-01-21 21:34             ` Stefan Weil
  2009-01-22 14:11               ` Stefano Stabellini
@ 2009-01-29 14:55               ` Stefano Stabellini
  1 sibling, 0 replies; 13+ messages in thread
From: Stefano Stabellini @ 2009-01-29 14:55 UTC (permalink / raw)
  To: qemu-devel

I did not receive any input on this but since I believe this patch fixes
a real problem I am going to send it to the list anyway.

This patch fixes an initialization issue in case there is no graphic
card (-vga none) and the first console has a fixed size, bigger than
640x480 (-monitor 800x600).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

---

diff --git a/console.c b/console.c
index dbb3b70..e02cf63 100644
--- a/console.c
+++ b/console.c
@@ -1419,13 +1419,22 @@ CharDriverState *text_console_init(const char *p)
 void text_consoles_set_display(DisplayState *ds)
 {
     int i;
+    TextConsole *s;
 
     for (i = 0; i < n_text_consoles; i++) {
         text_console_do_init(text_consoles[i], ds, text_console_strs[i]);
         qemu_free(text_console_strs[i]);
     }
-
     n_text_consoles = 0;
+
+    /* If there are no graphic cards and the first console has a fixed
+     * size we need to resize the screen surface according to the size
+     * of the first console */
+    s = consoles[0];
+    if (s && s->console_type == TEXT_CONSOLE_FIXED_SIZE) {
+        ds->surface = qemu_resize_displaysurface(ds->surface, s->g_width, s->g_height, 32, 4 * s->g_width);
+        dpy_resize(ds);
+    }
 }
 
 void qemu_console_resize(DisplayState *ds, int width, int height)

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

end of thread, other threads:[~2009-01-29 15:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-18 23:14 [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Juergen Lock
2009-01-20 14:19 ` Jędrzej Kalinowski
2009-01-20 19:31   ` Matt
2009-01-20 23:12   ` More displaystate fallout? (was: Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...) Juergen Lock
2009-01-21 11:15     ` [Qemu-devel] Re: More displaystate fallout? (was: Re: [Qemu- devel] testing qemu svn r6367 on FreeB SD - sigev_signo; vmmouse, -vga vmware broken , slirp...) Jędrzej Kalinowski
2009-01-21 12:28       ` [Qemu-devel] Re: More displaystate fallout? Stefano Stabellini
2009-01-21 17:46         ` Stefan Weil
2009-01-21 18:15           ` Stefano Stabellini
2009-01-21 21:34             ` Stefan Weil
2009-01-22 14:11               ` Stefano Stabellini
2009-01-27 14:23                 ` Stefano Stabellini
2009-01-29 14:55               ` Stefano Stabellini
2009-01-24 11:55 ` [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.