From: Sven Schnelle <svens@stackframe.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>,
qemu-devel@nongnu.org, deller@gmx.de,
BALATON Zoltan <balaton@eik.bme.hu>
Subject: Re: [PATCH v2] hw/scsi/lsi53c895a: add timer to scripts processing
Date: Mon, 04 Mar 2024 16:58:31 +0100 [thread overview]
Message-ID: <87frx6ugyg.fsf@t14.stackframe.org> (raw)
In-Reply-To: <CAFEAcA9NSNVkZdtqF=aw=eB=MpsHTFoH6Z1CQtiabn5mme092w@mail.gmail.com> (Peter Maydell's message of "Mon, 4 Mar 2024 15:08:37 +0000")
Peter Maydell <peter.maydell@linaro.org> writes:
> On Thu, 29 Feb 2024 at 20:44, Sven Schnelle <svens@stackframe.org> wrote:
>>
>> HP-UX 10.20 seems to make the lsi53c895a spinning on a memory location
>> under certain circumstances. As the SCSI controller and CPU are not
>> running at the same time this loop will never finish. After some
>> time, the check loop interrupts with a unexpected device disconnect.
>> This works, but is slow because the kernel resets the scsi controller.
>> Instead of signaling UDC, start a timer and exit the loop. Until the
>> timer fires, the CPU can process instructions which might changes the
>> memory location.
>>
>> The limit of instructions is also reduced because scripts running on
>> the SCSI processor are usually very short. This keeps the time until
>> the loop is exit short.
>
> "exited"
>
>>
>> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Sven Schnelle <svens@stackframe.org>
>> ---
>> Changes in v2:
>> - update comment in lsi_execute_script()
>> - reset waiting state and del timer in lsi_execute_script() to
>> handle the case where script processing is triggered via
>> register write, and not from the pending timer
>> - delete timer in lsi_scsi_exit()
>
> Other than the s/host/guest/ comment fix,
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> I don't suppose anybody has a setup with the Windows drivers
> to test this on? (commit ee4d919f30f13 suggests that at least
> Windows XP and 2003 had this problem.)
I have a Windows XP VM with lsi53c895a. I just fired it up and added
a qemu_log() in the timer path, and seen it trigger once while copying
a few files. It looks like Windows XP (or better the SCSI driver) also
works with this patch.
next prev parent reply other threads:[~2024-03-04 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 20:44 [PATCH v2] hw/scsi/lsi53c895a: add timer to scripts processing Sven Schnelle
2024-03-04 15:08 ` Peter Maydell
2024-03-04 15:58 ` Sven Schnelle [this message]
2024-03-04 16:07 ` Peter Maydell
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=87frx6ugyg.fsf@t14.stackframe.org \
--to=svens@stackframe.org \
--cc=balaton@eik.bme.hu \
--cc=deller@gmx.de \
--cc=fam@euphon.net \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 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).