[PATCH v3 0/6] nc53c710 rewrite

Helge Deller posted 6 patches 3 days, 4 hours ago
There is a newer version of this series
MAINTAINERS            |    1 +
hw/hppa/machine.c      |   10 +
hw/scsi/lasi_ncr710.c  |  129 +-
hw/scsi/lasi_ncr710.h  |   28 +-
hw/scsi/lsi53c895a.c   |   79 +-
hw/scsi/lsi_scsi.h     |   98 ++
hw/scsi/ncr53c710.c    | 2957 +++++++++++++++-------------------------
hw/scsi/ncr53c710.h    |  282 ++--
hw/scsi/scsi-disk.c    |   13 +
hw/scsi/trace-events   |   43 +-
include/hw/scsi/scsi.h |    1 +
11 files changed, 1426 insertions(+), 2215 deletions(-)
create mode 100644 hw/scsi/lsi_scsi.h
[PATCH v3 0/6] nc53c710 rewrite
Posted by Helge Deller 3 days, 4 hours ago
From: Helge Deller <deller@gmx.de>

This is the third attempt to replace the existing 53c710 driver by
a new driver based on the code of the lsi53c895a.c.
Patch #1 is not meant to be reviewed, as it basically just replaces
the existing driver by a new one.
But patch #2 implements the proposed changes to use a common header
for both drivers, as suggested by BALATON Zoltan.

Note that the ncr53c710 driver is currently only used by the HPPA 715 machine,
and this patch should not have any effect on any other platform or machine. On
the 715, this driver has been sucessfully tested with Linux, HP-UX and NetBSD.

Please review.
It would be great if this series can be included for qemu v11.2, as the current
driver does not work stable for any guest OS.

Keith Monahan (6):
  hw/scsi/ncr53c710: rewrite the 53C710 SCRIPTS engine
  hw/scsi: share NCR/LSI definitions in lsi_scsi.h
  hw/scsi/lasi_ncr710: map the full LASI SCSI module page
  hw/scsi/ncr53c710: move to COMMAND on CLEAR ACK after MESSAGE REJECT
  hw/scsi/scsi-disk: add quirk_mode_page_no_flexible_disk, use it on the
    715
  hw/scsi/ncr53c710: Comment cleanup, reduce verbosity, repetition

 MAINTAINERS            |    1 +
 hw/hppa/machine.c      |   10 +
 hw/scsi/lasi_ncr710.c  |  129 +-
 hw/scsi/lasi_ncr710.h  |   28 +-
 hw/scsi/lsi53c895a.c   |   79 +-
 hw/scsi/lsi_scsi.h     |   98 ++
 hw/scsi/ncr53c710.c    | 2957 +++++++++++++++-------------------------
 hw/scsi/ncr53c710.h    |  282 ++--
 hw/scsi/scsi-disk.c    |   13 +
 hw/scsi/trace-events   |   43 +-
 include/hw/scsi/scsi.h |    1 +
 11 files changed, 1426 insertions(+), 2215 deletions(-)
 create mode 100644 hw/scsi/lsi_scsi.h

-- 
2.54.0
Re: [PATCH v3 0/6] nc53c710 rewrite
Posted by Philippe Mathieu-Daudé 3 days, 4 hours ago
On 20/11/26 00:32, Helge Deller wrote:
> From: Helge Deller <deller@gmx.de>
> 
> This is the third attempt to replace the existing 53c710 driver by
> a new driver based on the code of the lsi53c895a.c.
> Patch #1 is not meant to be reviewed, as it basically just replaces
> the existing driver by a new one.

"Please do not review, simply accept".

  hw/scsi/ncr53c710.c   | 3042 +++++++++++++++++------------------------

> Please review.

.

> It would be great if this series can be included for qemu v11.2, as the current
> driver does not work stable for any guest OS.

  11 files changed, 1426 insertions(+), 2215 deletions(-)

IIUC even v11.1 driver "does not work stable for any guest OS", right?
Re: [PATCH v3 0/6] nc53c710 rewrite
Posted by Helge Deller 2 days, 19 hours ago
On 11/20/26 00:39, Philippe Mathieu-Daudé wrote:
> On 20/11/26 00:32, Helge Deller wrote:
>> From: Helge Deller <deller@gmx.de>
>>
>> This is the third attempt to replace the existing 53c710 driver by
>> a new driver based on the code of the lsi53c895a.c.
>> Patch #1 is not meant to be reviewed, as it basically just replaces
>> the existing driver by a new one.
> 
> "Please do not review, simply accept".

Well, I agree, it sounds quite rude, which was not my intention.
I basically wanted to say that it's a hard lift-and-shift patch which
makes no real sense to try to review, as it is huge and replaces
most of the code. 
>   hw/scsi/ncr53c710.c   | 3042 +++++++++++++++++------------------------
> 
>> Please review.
> 
> .
> 
>> It would be great if this series can be included for qemu v11.2, as the current
>> driver does not work stable for any guest OS.
> 
>   11 files changed, 1426 insertions(+), 2215 deletions(-)
> 
> IIUC even v11.1 driver "does not work stable for any guest OS", right?

Yes.

Helge
Re: [PATCH v3 0/6] nc53c710 rewrite
Posted by Mark Cave-Ayland 2 days, 18 hours ago
On 20/11/2026 08:25, Helge Deller wrote:

> On 11/20/26 00:39, Philippe Mathieu-Daudé wrote:
>> On 20/11/26 00:32, Helge Deller wrote:
>>> From: Helge Deller <deller@gmx.de>
>>>
>>> This is the third attempt to replace the existing 53c710 driver by
>>> a new driver based on the code of the lsi53c895a.c.
>>> Patch #1 is not meant to be reviewed, as it basically just replaces
>>> the existing driver by a new one.
>>
>> "Please do not review, simply accept".
> 
> Well, I agree, it sounds quite rude, which was not my intention.
> I basically wanted to say that it's a hard lift-and-shift patch which
> makes no real sense to try to review, as it is huge and replaces
> most of the code.
>>   hw/scsi/ncr53c710.c   | 3042 +++++++++++++++++------------------------
>>
>>> Please review.
>>
>> .
>>
>>> It would be great if this series can be included for qemu v11.2, as 
>>> the current
>>> driver does not work stable for any guest OS.
>>
>>   11 files changed, 1426 insertions(+), 2215 deletions(-)
>>
>> IIUC even v11.1 driver "does not work stable for any guest OS", right?
> 
> Yes.
> 
> Helge

As I mentioned in some of the earlier reviews, I have a lot of sympathy 
for the submitter here based upon my experience of doing the large 
rework of the ESP SCSI driver a while back. In particular when working 
on QEMU as a hobby, it can take much longer to find the time to complete 
any changes requested during upstream review.

My take on this is that we want to encourage more people to contribute 
to QEMU and unless you happen to be an LSI SCSI expert it's almost 
impossible to review a large rework like this - and this shouldn't be a 
barrier for contribution. It's clear from Keith and Helge's comments 
that this series solves real problems that users are currently 
experiencing with QEMU's HPPA emulation so I think we should aim for a 
more pragmatic approach:

- Aim for a basic code review based upon our existing coding standards 
to check that the device implements a reasonable object model

- Ask for proof that testing the supported guest OSs (Linux, HP-UX and 
NetBSD) doesn't trigger a sanitizer abort when built using '--cc=clang' 
'--cxx=clang++' '--enable-ubsan' '--enable-asan'

- Mark the device as not being included in the QEMU security boundary

- Update Kconfig so that the NCR710 device is only built when the HPPA 
target is selected

If these criteria are met, and given it only affects the HPPA target, 
then is there any reason why this series shouldn't be merged?


ATB,

Mark.


Re: [PATCH v3 0/6] nc53c710 rewrite
Posted by Philippe Mathieu-Daudé 2 days, 11 hours ago
On 2026-11-20 10:59, Mark Cave-Ayland wrote:
> On 20/11/2026 08:25, Helge Deller wrote:
> 
>> On 11/20/26 00:39, Philippe Mathieu-Daudé wrote:
>>> On 20/11/26 00:32, Helge Deller wrote:
>>>> From: Helge Deller <deller@gmx.de>
>>>>
>>>> This is the third attempt to replace the existing 53c710 driver by
>>>> a new driver based on the code of the lsi53c895a.c.
>>>> Patch #1 is not meant to be reviewed, as it basically just replaces
>>>> the existing driver by a new one.
>>>
>>> "Please do not review, simply accept".
>>
>> Well, I agree, it sounds quite rude, which was not my intention.
>> I basically wanted to say that it's a hard lift-and-shift patch which
>> makes no real sense to try to review, as it is huge and replaces
>> most of the code.
>>>   hw/scsi/ncr53c710.c   | 3042 +++++++++++++++++------------------------
>>>
>>>> Please review.
>>>
>>> .
>>>
>>>> It would be great if this series can be included for qemu v11.2, as 
>>>> the current
>>>> driver does not work stable for any guest OS.
>>>
>>>   11 files changed, 1426 insertions(+), 2215 deletions(-)
>>>
>>> IIUC even v11.1 driver "does not work stable for any guest OS", right?
>>
>> Yes.
>>
>> Helge
> 
> As I mentioned in some of the earlier reviews, I have a lot of sympathy 
> for the submitter here based upon my experience of doing the large 
> rework of the ESP SCSI driver a while back. In particular when working 
> on QEMU as a hobby, it can take much longer to find the time to complete 
> any changes requested during upstream review.
> 
> My take on this is that we want to encourage more people to contribute 
> to QEMU and unless you happen to be an LSI SCSI expert it's almost 
> impossible to review a large rework like this - and this shouldn't be a 
> barrier for contribution. It's clear from Keith and Helge's comments 
> that this series solves real problems that users are currently 
> experiencing with QEMU's HPPA emulation so I think we should aim for a 
> more pragmatic approach:
> 
> - Aim for a basic code review based upon our existing coding standards 
> to check that the device implements a reasonable object model
> 
> - Ask for proof that testing the supported guest OSs (Linux, HP-UX and 
> NetBSD) doesn't trigger a sanitizer abort when built using '--cc=clang' 
> '--cxx=clang++' '--enable-ubsan' '--enable-asan'
> 
> - Mark the device as not being included in the QEMU security boundary
> 
> - Update Kconfig so that the NCR710 device is only built when the HPPA 
> target is selected
> 
> If these criteria are met, and given it only affects the HPPA target, 
> then is there any reason why this series shouldn't be merged?
Sorry if I missed your comment on an earlier series, I was not Cc'ed and
try to not read all qemu-devel@ :)

I understand the hobbyist PoV and respect it, but that would settle a
precedent which I'd rather discuss with other maintainers or during
a community call.

I'll try to split this series using a LLM, since this appears to be
an acceptable use.

Re: [PATCH v3 0/6] nc53c710 rewrite
Posted by Mark Cave-Ayland 2 days, 11 hours ago
On 20/11/2026 16:34, Philippe Mathieu-Daudé wrote:

> On 2026-11-20 10:59, Mark Cave-Ayland wrote:
>> On 20/11/2026 08:25, Helge Deller wrote:
>>
>>> On 11/20/26 00:39, Philippe Mathieu-Daudé wrote:
>>>> On 20/11/26 00:32, Helge Deller wrote:
>>>>> From: Helge Deller <deller@gmx.de>
>>>>>
>>>>> This is the third attempt to replace the existing 53c710 driver by
>>>>> a new driver based on the code of the lsi53c895a.c.
>>>>> Patch #1 is not meant to be reviewed, as it basically just replaces
>>>>> the existing driver by a new one.
>>>>
>>>> "Please do not review, simply accept".
>>>
>>> Well, I agree, it sounds quite rude, which was not my intention.
>>> I basically wanted to say that it's a hard lift-and-shift patch which
>>> makes no real sense to try to review, as it is huge and replaces
>>> most of the code.
>>>>   hw/scsi/ncr53c710.c   | 3042 ++++++++++++++++ 
>>>> +------------------------
>>>>
>>>>> Please review.
>>>>
>>>> .
>>>>
>>>>> It would be great if this series can be included for qemu v11.2, as 
>>>>> the current
>>>>> driver does not work stable for any guest OS.
>>>>
>>>>   11 files changed, 1426 insertions(+), 2215 deletions(-)
>>>>
>>>> IIUC even v11.1 driver "does not work stable for any guest OS", right?
>>>
>>> Yes.
>>>
>>> Helge
>>
>> As I mentioned in some of the earlier reviews, I have a lot of 
>> sympathy for the submitter here based upon my experience of doing the 
>> large rework of the ESP SCSI driver a while back. In particular when 
>> working on QEMU as a hobby, it can take much longer to find the time 
>> to complete any changes requested during upstream review.
>>
>> My take on this is that we want to encourage more people to contribute 
>> to QEMU and unless you happen to be an LSI SCSI expert it's almost 
>> impossible to review a large rework like this - and this shouldn't be 
>> a barrier for contribution. It's clear from Keith and Helge's comments 
>> that this series solves real problems that users are currently 
>> experiencing with QEMU's HPPA emulation so I think we should aim for a 
>> more pragmatic approach:
>>
>> - Aim for a basic code review based upon our existing coding standards 
>> to check that the device implements a reasonable object model
>>
>> - Ask for proof that testing the supported guest OSs (Linux, HP-UX and 
>> NetBSD) doesn't trigger a sanitizer abort when built using '-- 
>> cc=clang' '--cxx=clang++' '--enable-ubsan' '--enable-asan'
>>
>> - Mark the device as not being included in the QEMU security boundary
>>
>> - Update Kconfig so that the NCR710 device is only built when the HPPA 
>> target is selected
>>
>> If these criteria are met, and given it only affects the HPPA target, 
>> then is there any reason why this series shouldn't be merged?
> Sorry if I missed your comment on an earlier series, I was not Cc'ed and
> try to not read all qemu-devel@ :)
> 
> I understand the hobbyist PoV and respect it, but that would settle a
> precedent which I'd rather discuss with other maintainers or during
> a community call.
> 
> I'll try to split this series using a LLM, since this appears to be
> an acceptable use.

Hi Phil,

I think this work is different from the ESP device in that when I did 
that rework (about 88 patches from memory) there were several guest OSs 
that I had to test on each commit to ensure the series was bisectible, 
and even then it wasn't possible to keep all guests OSs working for 
every commit.

The NCR53C710 is different here in that it only has one user which is 
the HPPA machine, and the submitter has clearly tested the set of guests 
they wish to support and has considerably improved on what is already there.

Based upon my previous experience above, no matter how you split the 
series there will always be at least one guest OS that won't work: by 
splitting the series it feels like the end result won't necessarily be 
any better for developer maintainability, and will delay the merge of 
some much-needed improvements.


ATB,

Mark.


Re: [PATCH v3 0/6] nc53c710 rewrite
Posted by Philippe Mathieu-Daudé 2 days, 10 hours ago
On 20/11/26 17:43, Mark Cave-Ayland wrote:
> On 20/11/2026 16:34, Philippe Mathieu-Daudé wrote:
> 
>> On 2026-11-20 10:59, Mark Cave-Ayland wrote:
>>> On 20/11/2026 08:25, Helge Deller wrote:
>>>
>>>> On 11/20/26 00:39, Philippe Mathieu-Daudé wrote:
>>>>> On 20/11/26 00:32, Helge Deller wrote:
>>>>>> From: Helge Deller <deller@gmx.de>
>>>>>>
>>>>>> This is the third attempt to replace the existing 53c710 driver by
>>>>>> a new driver based on the code of the lsi53c895a.c.
>>>>>> Patch #1 is not meant to be reviewed, as it basically just replaces
>>>>>> the existing driver by a new one.
>>>>>
>>>>> "Please do not review, simply accept".
>>>>
>>>> Well, I agree, it sounds quite rude, which was not my intention.
>>>> I basically wanted to say that it's a hard lift-and-shift patch which
>>>> makes no real sense to try to review, as it is huge and replaces
>>>> most of the code.
>>>>>   hw/scsi/ncr53c710.c   | 3042 ++++++++++++++++ 
>>>>> +------------------------
>>>>>
>>>>>> Please review.
>>>>>
>>>>> .
>>>>>
>>>>>> It would be great if this series can be included for qemu v11.2, 
>>>>>> as the current
>>>>>> driver does not work stable for any guest OS.
>>>>>
>>>>>   11 files changed, 1426 insertions(+), 2215 deletions(-)
>>>>>
>>>>> IIUC even v11.1 driver "does not work stable for any guest OS", right?
>>>>
>>>> Yes.
>>>>
>>>> Helge
>>>
>>> As I mentioned in some of the earlier reviews, I have a lot of 
>>> sympathy for the submitter here based upon my experience of doing the 
>>> large rework of the ESP SCSI driver a while back. In particular when 
>>> working on QEMU as a hobby, it can take much longer to find the time 
>>> to complete any changes requested during upstream review.
>>>
>>> My take on this is that we want to encourage more people to 
>>> contribute to QEMU and unless you happen to be an LSI SCSI expert 
>>> it's almost impossible to review a large rework like this - and this 
>>> shouldn't be a barrier for contribution. It's clear from Keith and 
>>> Helge's comments that this series solves real problems that users are 
>>> currently experiencing with QEMU's HPPA emulation so I think we 
>>> should aim for a more pragmatic approach:
>>>
>>> - Aim for a basic code review based upon our existing coding 
>>> standards to check that the device implements a reasonable object model
>>>
>>> - Ask for proof that testing the supported guest OSs (Linux, HP-UX 
>>> and NetBSD) doesn't trigger a sanitizer abort when built using '-- 
>>> cc=clang' '--cxx=clang++' '--enable-ubsan' '--enable-asan'
>>>
>>> - Mark the device as not being included in the QEMU security boundary
>>>
>>> - Update Kconfig so that the NCR710 device is only built when the 
>>> HPPA target is selected
>>>
>>> If these criteria are met, and given it only affects the HPPA target, 
>>> then is there any reason why this series shouldn't be merged?
>> Sorry if I missed your comment on an earlier series, I was not Cc'ed and
>> try to not read all qemu-devel@ :)
>>
>> I understand the hobbyist PoV and respect it, but that would settle a
>> precedent which I'd rather discuss with other maintainers or during
>> a community call.
>>
>> I'll try to split this series using a LLM, since this appears to be
>> an acceptable use.
> 
> Hi Phil,
> 
> I think this work is different from the ESP device in that when I did 
> that rework (about 88 patches from memory) there were several guest OSs 
> that I had to test on each commit to ensure the series was bisectible, 
> and even then it wasn't possible to keep all guests OSs working for 
> every commit.
> 
> The NCR53C710 is different here in that it only has one user which is 
> the HPPA machine, and the submitter has clearly tested the set of guests 
> they wish to support and has considerably improved on what is already 
> there.
> 
> Based upon my previous experience above, no matter how you split the 
> series there will always be at least one guest OS that won't work: by 
> splitting the series it feels like the end result won't necessarily be 
> any better for developer maintainability, and will delay the merge of 
> some much-needed improvements.

It was quick enough, already posted, no clue what it is worth:
https://lore.kernel.org/qemu-devel/20261120171235.61325-1-philmd@oss.qualcomm.com/

Re: [PATCH v3 0/6] nc53c710 rewrite
Posted by BALATON Zoltan 3 days, 3 hours ago
On Fri, 20 Nov 2026, Helge Deller wrote:
> From: Helge Deller <deller@gmx.de>
>
> This is the third attempt to replace the existing 53c710 driver by
> a new driver based on the code of the lsi53c895a.c.
> Patch #1 is not meant to be reviewed, as it basically just replaces
> the existing driver by a new one.
> But patch #2 implements the proposed changes to use a common header
> for both drivers, as suggested by BALATON Zoltan.
>
> Note that the ncr53c710 driver is currently only used by the HPPA 715 machine,
> and this patch should not have any effect on any other platform or machine. On
> the 715, this driver has been sucessfully tested with Linux, HP-UX and NetBSD.
>
> Please review.
> It would be great if this series can be included for qemu v11.2, as the current
> driver does not work stable for any guest OS.

The freeze is strictly for bug fixes but replacing a whole device model 
with a new one is hard to justify as just a bug fix. I had the same before 
that something I wanted to include was ready too late and I had to wait 
until the next release to upstream it. It may be frustrating but please 
accept that this has likely missed the release so you now have more time 
to clean this up. I've never seen execptions made during hard freeze but 
I'm not the maintainer of this area so I'm not the one deciding just 
telling that in my previous experience this happened to me too a few 
times. If you don't want to wait until the next release maybe this could 
be submitted early in the next cycle with backporting to stable as a fix 
then could be available in 11.2.1. This series as it is is not the best 
way to do this and I think your intent was maybe to have one patch at the 
beginning that could be included without the rest but if that won't happen 
anyway you could redo it the right way that was suggested and merge it in 
next devel cycle.

Regards,
BALATON Zoltan

> Keith Monahan (6):
>  hw/scsi/ncr53c710: rewrite the 53C710 SCRIPTS engine
>  hw/scsi: share NCR/LSI definitions in lsi_scsi.h
>  hw/scsi/lasi_ncr710: map the full LASI SCSI module page
>  hw/scsi/ncr53c710: move to COMMAND on CLEAR ACK after MESSAGE REJECT
>  hw/scsi/scsi-disk: add quirk_mode_page_no_flexible_disk, use it on the
>    715
>  hw/scsi/ncr53c710: Comment cleanup, reduce verbosity, repetition
>
> MAINTAINERS            |    1 +
> hw/hppa/machine.c      |   10 +
> hw/scsi/lasi_ncr710.c  |  129 +-
> hw/scsi/lasi_ncr710.h  |   28 +-
> hw/scsi/lsi53c895a.c   |   79 +-
> hw/scsi/lsi_scsi.h     |   98 ++
> hw/scsi/ncr53c710.c    | 2957 +++++++++++++++-------------------------
> hw/scsi/ncr53c710.h    |  282 ++--
> hw/scsi/scsi-disk.c    |   13 +
> hw/scsi/trace-events   |   43 +-
> include/hw/scsi/scsi.h |    1 +
> 11 files changed, 1426 insertions(+), 2215 deletions(-)
> create mode 100644 hw/scsi/lsi_scsi.h
>
>