Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-30 Thread Avi Kivity
On 05/12/2010 09:11 PM, Stefano Stabellini wrote: On Wed, 12 May 2010, Jamie Lokier wrote: Stefano Stabellini wrote: On Wed, 12 May 2010, Avi Kivity wrote: It's useful if you have a one-line horizontal pattern you want to propagate all over. It might be useful all

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-28 Thread Michael Tokarev
12.05.2010 22:11, Stefano Stabellini wrote: On Wed, 12 May 2010, Jamie Lokier wrote: Stefano Stabellini wrote: On Wed, 12 May 2010, Avi Kivity wrote: It's useful if you have a one-line horizontal pattern you want to propagate all over. It might be useful all right, but it is not entirely cle

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-13 Thread Stefano Stabellini
On Thu, 13 May 2010, Michael Tokarev wrote: > Stefano Stabellini wrote: > [] > > diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c > > index 9f61a01..81c443b 100644 > > --- a/hw/cirrus_vga.c > > +++ b/hw/cirrus_vga.c > > The same as with previous patch: Yellow screen > (instead of crashing), and two

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-13 Thread Jamie Lokier
Stefano Stabellini wrote: > > I think we need to consider only dstpitch for a full invalidate. We > > might be copying an offscreen bitmap into the screen, and srcpitch is > > likely to be the bitmap width instead of the screen pitch. > > Agreed. Even when copying on-screen (or partially on-sc

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-13 Thread Michael Tokarev
Stefano Stabellini wrote: [] > diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c > index 9f61a01..81c443b 100644 > --- a/hw/cirrus_vga.c > +++ b/hw/cirrus_vga.c The same as with previous patch: Yellow screen (instead of crashing), and two lines on the stderr: BUG: kvm_dirty_pages_log_enable_slot: in

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-13 Thread Stefano Stabellini
On Thu, 13 May 2010, Avi Kivity wrote: > > /* extra x, y */ > > -sx = (src % ABS(s->cirrus_blt_srcpitch)) / depth; > > -sy = (src / ABS(s->cirrus_blt_srcpitch)); > > +sx = (src % line_offset) / depth; > > +sy = (src / line_offset); > > > > Does anything prevent the guest

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-13 Thread Avi Kivity
On 05/12/2010 09:11 PM, Stefano Stabellini wrote: On Wed, 12 May 2010, Jamie Lokier wrote: Stefano Stabellini wrote: On Wed, 12 May 2010, Avi Kivity wrote: It's useful if you have a one-line horizontal pattern you want to propagate all over. It might be useful all

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-13 Thread Paolo Bonzini
On 05/12/2010 05:57 PM, Stefano Stabellini wrote: I guess even a src blt pitch of 0 could be useful there, however in practice I think the only rop function that was written with this case in mind has: dstpitch -= bltwidth; srcpitch -= bltwidth; if (dstpitch< 0 || srcpitch< 0) { /* is 0

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Michael Tokarev
12.05.2010 22:11, Stefano Stabellini wrote: On Wed, 12 May 2010, Jamie Lokier wrote: Stefano Stabellini wrote: On Wed, 12 May 2010, Avi Kivity wrote: It's useful if you have a one-line horizontal pattern you want to propagate all over. It might be useful all right, but it is not entirely cle

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Stefano Stabellini
On Wed, 12 May 2010, Jamie Lokier wrote: > Stefano Stabellini wrote: > > On Wed, 12 May 2010, Avi Kivity wrote: > > > It's useful if you have a one-line horizontal pattern you want to > > > propagate all over. > > > > It might be useful all right, but it is not entirely clear what the > > hardwa

Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Jamie Lokier
Stefano Stabellini wrote: > On Wed, 12 May 2010, Avi Kivity wrote: > > It's useful if you have a one-line horizontal pattern you want to > > propagate all over. > > It might be useful all right, but it is not entirely clear what the > hardware should do in this situation from the documentation w

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Avi Kivity
On 05/12/2010 07:55 PM, Stefano Stabellini wrote: 3CEh index 26h W(R/W): BLT Source Pitch (5426 +) bit 0-11 (5426-28) Number of bytes in a scanline at the source. 0-12 (5429 +) do if the source BLT is supposed to be the number of bytes in a scanline at th

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Stefano Stabellini
On Wed, 12 May 2010, Avi Kivity wrote: > > I guess even a src blt pitch of 0 could be useful there, however in > > practice I think the only rop function that was written with this case in > > mind has: > > > > dstpitch -= bltwidth; > > srcpitch -= bltwidth; > > > > if (dstpitch< 0 || srcpitch< 0

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Avi Kivity
On 05/12/2010 06:57 PM, Stefano Stabellini wrote: On Wed, 12 May 2010, Avi Kivity wrote: I suggest to start using the display pitch (with the proper sign) instead of cirrus_blt_srcpitch in cirrus_do_copy at least when cirrus_blt_srcpitch doesn't have a proper value. Why switch from

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Stefano Stabellini
On Wed, 12 May 2010, Avi Kivity wrote: > > I suggest to start using the display pitch (with the proper sign) > > instead of cirrus_blt_srcpitch in cirrus_do_copy at least when > > cirrus_blt_srcpitch doesn't have a proper value. > > > > Why switch from one bug to the other? > > It's perfectly

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Avi Kivity
On 05/12/2010 04:45 PM, Stefano Stabellini wrote: Note it's just during mode changes. During normal operation I'm sure the pitches are equal. The source blt pitch as set by the driver is always equal to the display pitch (apart from the case reported above). However cirrus_blt_srcp

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Stefano Stabellini
On Wed, 12 May 2010, Avi Kivity wrote: > On 05/12/2010 03:20 PM, Stefano Stabellini wrote: > > On Mon, 10 May 2010, Avi Kivity wrote: > > > >> On 05/10/2010 10:41 AM, Avi Kivity wrote: > >> > >>> On 05/06/2010 11:07 PM, Michael Tokarev wrote: > >>> > There was a bug recently

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Avi Kivity
On 05/12/2010 03:20 PM, Stefano Stabellini wrote: On Mon, 10 May 2010, Avi Kivity wrote: On 05/10/2010 10:41 AM, Avi Kivity wrote: On 05/06/2010 11:07 PM, Michael Tokarev wrote: There was a bug recently fixed in vnc code. Apparently there's something similar in the cirrus em

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-12 Thread Stefano Stabellini
On Mon, 10 May 2010, Avi Kivity wrote: > On 05/10/2010 10:41 AM, Avi Kivity wrote: > > On 05/06/2010 11:07 PM, Michael Tokarev wrote: > >> There was a bug recently fixed in vnc code. Apparently > >> there's something similar in the cirrus emulation as well. > >> Here it triggers _always_ (includin

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-10 Thread Avi Kivity
On 05/10/2010 10:41 AM, Avi Kivity wrote: On 05/06/2010 11:07 PM, Michael Tokarev wrote: There was a bug recently fixed in vnc code. Apparently there's something similar in the cirrus emulation as well. Here it triggers _always_ (including old versions of kvm) when running windows NT and hittin

[Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-10 Thread Avi Kivity
On 05/06/2010 11:07 PM, Michael Tokarev wrote: There was a bug recently fixed in vnc code. Apparently there's something similar in the cirrus emulation as well. Here it triggers _always_ (including old versions of kvm) when running windows NT and hitting "test" button in its display resolution d