On Thu, 29 Feb 2024 at 16:54, Sven Schnelle <sv...@stackframe.org> wrote:
>
> Peter Maydell <peter.mayd...@linaro.org> writes:
>
> > On Wed, 28 Feb 2024 at 21:12, Sven Schnelle <sv...@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 via email to