All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: "Alex Bennée" <alex.bennee@linaro.org>,
	"BALATON Zoltan" <balaton@eik.bme.hu>
Cc: jan.kiszka@siemens.com, qemu-devel <qemu-devel@nongnu.org>,
	cota@braap.org, "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	bobby.prani@gmail.com, fred.konrad@greensocs.com,
	rth@twiddle.net
Subject: Re: [Qemu-devel] [Qemu-ppc] qemu-system-ppc video artifacts since "tcg: drop global lock during TCG code execution"
Date: Tue, 14 Mar 2017 15:52:42 +0000	[thread overview]
Message-ID: <b9006aa4-b606-61d5-6896-8c76a6a6f8f3@ilande.co.uk> (raw)
In-Reply-To: <87shmfq31b.fsf@linaro.org>

On 14/03/17 15:41, Alex Bennée wrote:

> BALATON Zoltan <balaton@eik.bme.hu> writes:
> 
>> On Tue, 14 Mar 2017, Mark Cave-Ayland wrote:
>>> On 14/03/17 10:00, Alex Bennée wrote:
>>>> Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> writes:
>>>>
>>>>> I've recently noticed some video artifacts appearing in the form of
>>>>> horizontal lines whilst testing OpenBIOS boot on some qemu-system-ppc
>>>>> images (see https://www.ilande.co.uk/tmp/qemu/macos9-stripe.png for an
>>>>> example) which I've finally bisected down to this commit.
>>>>
>>>> Interesting. Is the video hardware in this case a simple framebuffer or
>>>> is there some sort of GPU involved?
>>>
>>> For the mac99 machine it's just the normal QEMU PCI std-vga card, so
>>> nothing special. Having run tests across SPARC which uses its own
>>> framebuffer, there have been no obvious artifacts that I've spotted
>>> there to date.
>>>
>>>>> The horizontal lines tend to appear at different positions with
>>>>> different lengths, although it seems to be more common that a complete
>>>>> scanline is affected. Reproducing the issue is fairly easy with a MacOS
>>>>> 9.2.1 ISO and the command line below:
>>>>>
>>>>> ./qemu-system-ppc -cdrom MacOS921.iso -boot d -m 512 -M mac99
>>>>>
>>>>> Could it be that this patch is still missing a lock somewhere which
>>>>> causes these artifacts to appear?
>>>>
>>>> It depends. If the hardware is accessed via MMIO then the BQL is taken
>>>> automatically (unless the area is explicitly marked as doing its own
>>>> locking see: mr->global_locking).
>>>>
>>>> Is the artefact temporary or permanent? Could it be a change in
>>>> synchronisation between the emulator updating the framebuffer and
>>>> whatever backend updating its display?
>>>
>>> AFAICT they are temporary in that they appear randomly on the display,
>>> but the next time that particular area of the display is updated by the
>>> guest then they tend to either change/disappear.
>>
>> I've also noticed artifacts when testing the SM501 changes with
>> MorphOS on recent QEMU so it may not be related to just the std vga.
>> It's shown as bands (larger number of adjacent scanlines) not updating
>> when the client first wrote to the framebuffer but then they
>> disappeared during the next refresh. I'm guessing it may be related to
>> dirty checking of the framebuffer memory which is used to decide when
>> a scan line needs update?
> 
> Interesting. I guess if the corrupted scan lines are in blocks of
> PAGE_SIZE that might make sense.
> 
> Commit (b0706b716769494f321a0d2bfd9fa9893992f995) made
> tlb_reset_dirty_range update the SoftMMU addr_write entry atomically.
> Now I don't see how that could race in single threaded TCG mode but it
> could explain things.
> 
> I notice that tlb_set_dirty/tlb_set_dirty1 should maybe do the same. The
> currently assume they are only called from the CPU's context. If you
> enable #define DEBUG_TLB in cputlb.c does the assert fire?

Not in a quick local test here. However this does ring a bell - one of
Ben's PPC optimisations was to batch TLB flushes so they only occur at
certain times - see commit cd0c6f473532bfaf20a095bc90a18e45162981b5 for
more detail.

Could it be that these underlying assumptions have now changed?


ATB,

Mark.

  reply	other threads:[~2017-03-14 15:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <36e41adf-b0b3-3efa-51c4-f1a70cd05b98@ilande.co.uk>
2017-03-13 21:28 ` [Qemu-devel] qemu-system-ppc video artifacts since "tcg: drop global lock during TCG code execution" Mark Cave-Ayland
     [not found] ` <87wpbsp49a.fsf@linaro.org>
2017-03-14 11:12   ` Mark Cave-Ayland
2017-03-14 13:56     ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2017-03-14 15:02       ` luigi burdo
2017-03-14 15:41       ` Alex Bennée
2017-03-14 15:52         ` Mark Cave-Ayland [this message]
2017-03-14 16:48           ` Alex Bennée
2017-03-14 17:34             ` BALATON Zoltan
2017-03-14 17:53               ` luigi burdo
2017-03-15 11:14               ` Alex Bennée
2017-03-15 13:26                 ` Mark Cave-Ayland
2017-03-15 14:19                   ` Alex Bennée
2017-03-16  6:39               ` Paolo Bonzini
2017-03-16  7:51                 ` Alex Bennée
2017-03-16  8:34                   ` Paolo Bonzini
2017-03-16 15:34                     ` Gerd Hoffmann
2017-03-16 17:00                       ` Paolo Bonzini
2017-03-28 13:40                         ` Gerd Hoffmann
2017-03-28 14:13                           ` Paolo Bonzini
2017-03-15 14:16           ` Alex Bennée
2017-03-15 15:25             ` Gerd Hoffmann
2017-03-15 16:20               ` Alex Bennée
2017-03-16  7:35                 ` Gerd Hoffmann
2017-03-16  7:56                   ` Alex Bennée
2017-03-16 14:22                   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9006aa4-b606-61d5-6896-8c76a6a6f8f3@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=alex.bennee@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=bobby.prani@gmail.com \
    --cc=cota@braap.org \
    --cc=fred.konrad@greensocs.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.