Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-04 Thread Mark Cave-Ayland
On 04/04/17 07:12, Gerd Hoffmann wrote: > Hi, > >> -unsigned long align = 1 << (TARGET_PAGE_BITS + BITS_PER_LEVEL); >> +unsigned long align = 1UL << (TARGET_PAGE_BITS + BITS_PER_LEVEL); > >> There were 2 issues here: without the UL suffix on align I was getting >> incorrect first/last

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Gerd Hoffmann
On Mo, 2017-04-03 at 19:02 +0200, Paolo Bonzini wrote: > > On 03/04/2017 14:03, Gerd Hoffmann wrote: > > We might clear some more bits, but these are > > outsize the visible area so they should cause visible corruption (and if > > the visible area changes the display code needs to do a full refres

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Gerd Hoffmann
Hi, > -unsigned long align = 1 << (TARGET_PAGE_BITS + BITS_PER_LEVEL); > +unsigned long align = 1UL << (TARGET_PAGE_BITS + BITS_PER_LEVEL); > There were 2 issues here: without the UL suffix on align I was getting > incorrect first/last addresses since the high bits of align weren't > be

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Paolo Bonzini
On 03/04/2017 14:03, Gerd Hoffmann wrote: > We might clear some more bits, but these are > outsize the visible area so they should cause visible corruption (and if > the visible area changes the display code needs to do a full refresh > anyway). True, though this makes the snapshot abstraction a

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Mark Cave-Ayland
On 03/04/17 13:42, Gerd Hoffmann wrote: > On Mo, 2017-04-03 at 13:24 +0100, Mark Cave-Ayland wrote: >> On 03/04/17 13:03, Gerd Hoffmann wrote: >> >>> Hi, >>> I checked the branch, is bitmap_copy_and_clear_atomic correct when you have partial updates? Maybe you need to handle partial u

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Gerd Hoffmann
On Mo, 2017-04-03 at 13:24 +0100, Mark Cave-Ayland wrote: > On 03/04/17 13:03, Gerd Hoffmann wrote: > > > Hi, > > > >> I checked the branch, is bitmap_copy_and_clear_atomic correct when you > >> have partial updates? Maybe you need to handle partial updates of the > >> first and last word? > >

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Mark Cave-Ayland
On 03/04/17 13:03, Gerd Hoffmann wrote: > Hi, > >> I checked the branch, is bitmap_copy_and_clear_atomic correct when you >> have partial updates? Maybe you need to handle partial updates of the >> first and last word? > > Should not be a problem. We might clear some more bits, but these are

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Gerd Hoffmann
Hi, > I checked the branch, is bitmap_copy_and_clear_atomic correct when you > have partial updates? Maybe you need to handle partial updates of the > first and last word? Should not be a problem. We might clear some more bits, but these are outsize the visible area so they should cause visib

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Paolo Bonzini
On 30/03/2017 15:41, Gerd Hoffmann wrote: > Hi, > >> Excellent! I can help out with converting and/or testing the SPARC >> devices (cg3/tcx) if required. > > Sure, test results and patches are very welcome. > > I've touched dirty bitmap code for the first time, so I've sent out this > rfc fo

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Mark Cave-Ayland
On 03/04/17 09:44, Gerd Hoffmann wrote: > Hi, > >> I've spent a bit of time over the weekend attempting to convert the >> SPARC CG3/TCX framebuffers over to use your new code and pushed the >> result to my github branch here: >> https://github.com/mcayland/qemu/commits/vga-fixes-sparc. > > wor

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Gerd Hoffmann
Hi, > I've spent a bit of time over the weekend attempting to convert the > SPARC CG3/TCX framebuffers over to use your new code and pushed the > result to my github branch here: > https://github.com/mcayland/qemu/commits/vga-fixes-sparc. work/vga-fixes branch updated & rebased to latest master

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-02 Thread Mark Cave-Ayland
On 30/03/17 14:41, Gerd Hoffmann wrote: > Hi, > >> Excellent! I can help out with converting and/or testing the SPARC >> devices (cg3/tcx) if required. > > Sure, test results and patches are very welcome. I've spent a bit of time over the weekend attempting to convert the SPARC CG3/TCX frameb

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-03-30 Thread Gerd Hoffmann
Hi, > Excellent! I can help out with converting and/or testing the SPARC > devices (cg3/tcx) if required. Sure, test results and patches are very welcome. I've touched dirty bitmap code for the first time, so I've sent out this rfc for early feedback at the approach taken before going out conv

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-03-30 Thread Mark Cave-Ayland
On 30/03/17 07:55, Gerd Hoffmann wrote: > Hi, > > First attempt on making display updates thread-save for real. Most > interesting patches at this point are #2 (adds helper functions to > create and use a dirty bitmap copy) and #3 (updates vga code to use > them). > > Patch #1 fixes a bug I'v

[Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-03-29 Thread Gerd Hoffmann
Hi, First attempt on making display updates thread-save for real. Most interesting patches at this point are #2 (adds helper functions to create and use a dirty bitmap copy) and #3 (updates vga code to use them). Patch #1 fixes a bug I've noticed while wading through the vga code, and #4 remov