All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Sven Schnelle <svens@stackframe.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>,
	qemu-devel@nongnu.org, deller@gmx.de
Subject: Re: [PATCH] hw/scsi/lsi53c895a: add hack to prevent scsi timeouts in HP-UX 10.20
Date: Thu, 29 Feb 2024 17:26:53 +0000	[thread overview]
Message-ID: <CAFEAcA8tbtrtoZSO2MmLHr+7+mcys63z15qFEVYm=nAO4cUMmQ@mail.gmail.com> (raw)
In-Reply-To: <87r0gvxlce.fsf@t14.stackframe.org>

On Thu, 29 Feb 2024 at 16:54, Sven Schnelle <svens@stackframe.org> wrote:
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
> > On Wed, 28 Feb 2024 at 21:12, 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, add an option 'hpux-spin-workaround' which
> >> emulates a INTERRUPT 2 script instruction. This instruction tells the
> >> kernel that the request was fulfilled. With this change, SCSI speeds
> >> improves significantly.
> >> [..]
> > I see we already have a hacky workaround for other OSes
> > that do something similar. The ideal fix for both of these
> > I think would be for lsi_execute_script() to, instead of stopping,
> > arrange to defer executing more script instructions until
> > after the guest has had a chance to run a bit more.
> > I think setting a timer that calls lsi_resume_script() after
> > a while would have that effect.
>
> Thanks, good idea. So something like this?

Yeah, something like that I think. (You probably want to delete
the timer on reset, and you need to handle migration -- you can
either put the timer state in a new vmstate section, or else
in post-load if the state is 'LSI_WAIT_SCRIPTS' arm the timer.)

Does it work? :-)

-- PMM


  reply	other threads:[~2024-02-29 17:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 21:11 [PATCH] hw/scsi/lsi53c895a: add hack to prevent scsi timeouts in HP-UX 10.20 Sven Schnelle
2024-02-29  9:36 ` Peter Maydell
2024-02-29 16:54   ` Sven Schnelle
2024-02-29 17:26     ` Peter Maydell [this message]
2024-02-29 18:01       ` Sven Schnelle

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='CAFEAcA8tbtrtoZSO2MmLHr+7+mcys63z15qFEVYm=nAO4cUMmQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=deller@gmx.de \
    --cc=fam@euphon.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=svens@stackframe.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 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.