All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jared Rossi <jrossi@linux.ibm.com>
To: Eric Farman <farman@linux.ibm.com>,
	qemu-devel@nongnu.org, qemu-s390x@nongnu.org, cohuck@redhat.com
Cc: jjherne@linux.ibm.com, mjrosato@linux.ibm.com, zycai@linux.ibm.com
Subject: Re: [PATCH 4/6] s390x: Introduce PCI SCSI IPLB and boot type
Date: Tue, 12 May 2026 12:13:00 -0400	[thread overview]
Message-ID: <1035a8d9-ce65-486d-845d-6a3b1d714ab0@linux.ibm.com> (raw)
In-Reply-To: <60502b8ce770a418bd8c66f3b236e15bcbda6892.camel@linux.ibm.com>



On 5/8/26 9:16 PM, Eric Farman wrote:
> On Mon, 2026-05-04 at 18:16 -0400, jrossi@linux.ibm.com wrote:
>> From: Jared Rossi <jrossi@linux.ibm.com>
>>
>> Define a new IPLB format for SCSI PCI devices and add cases to handle it.
>>
>> Signed-off-by: Jared Rossi <jrossi@linux.ibm.com>
>> ---
>>   include/hw/s390x/ipl/qipl.h    | 15 +++++++++++++++
>>   pc-bios/s390-ccw/main.c        | 11 ++++++++++-
>>   pc-bios/s390-ccw/virtio-pci.c  | 29 +++++++++++++++++++++++++++++
>>   pc-bios/s390-ccw/virtio-scsi.c | 14 +++++++++++++-
>>   pc-bios/s390-ccw/virtio.c      |  5 +++++
>>   5 files changed, 72 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/hw/s390x/ipl/qipl.h b/include/hw/s390x/ipl/qipl.h
>> index 67db54c964..951c5e2d8e 100644
>> --- a/include/hw/s390x/ipl/qipl.h
>> +++ b/include/hw/s390x/ipl/qipl.h
>> @@ -25,6 +25,7 @@ enum S390IplType {
>>       S390_IPL_TYPE_CCW = 0x02,
>>       S390_IPL_TYPE_PCI = 0x04,
>>       S390_IPL_TYPE_PV = 0x05,
>> +    S390_IPL_TYPE_PCI_SCSI = 0xfe,
>>       S390_IPL_TYPE_CCW_SCSI = 0xff
>>   };
>>   typedef enum S390IplType S390IplType;
>> @@ -117,6 +118,19 @@ struct IplBlockPci {
>>   } QEMU_PACKED;
>>   typedef struct IplBlockPci IplBlockPci;
>>   
>> +struct IplBlockPciScsi {
>> +    uint32_t lun;
>> +    uint16_t target;
>> +    uint16_t channel;
>> +    uint8_t  reserved0[74];
>> +    uint8_t  opt;
>> +    uint8_t  reserved1[3];
>> +    uint32_t fid;
>> +    uint8_t  ssid;
>> +    uint16_t devno;
>> +} QEMU_PACKED;
>> +typedef struct IplBlockPciScsi IplBlockPciScsi;
> Now that I get to the point where I see why you renamed the ...QemuScsi struct in patch one, I'm
> struggling.
>
> This combines the PCI stuff in IplBlockPci, with the CCW (!) and SCSI stuff in IplBlockCcwScsi (nee
> IplBlockQemuScsi). Some of the stuff (ssid, devno) isn't needed for PCI, and I find myself wondering
> what the "right" struct should look like...
The ssid and devno should be removed from the PCI version, it was just an
oversight to leave them there.
> Can we add the PCI stuff to a (generalized) struct that's just "IplBlockScsi" and have fields that
> are specific to -ccw or -pci? That's basically what IplBlockPciScsi is, even though it's not used
> that way.
Yes, it is possible.  At first I did not think it was the proper 
approach, but
thinking about it again now I can see the benefit.  I will reconsider it.

> Or is it better that there's overlap between Ccw/CcwScsi (e.g., offsetof(Ccw.ssid) ==
> offsetof(CcwScsi.ssid)) and Pci/PciScsi? If the latter, there's quite a bit of difference in their
> layouts, e.g., the location of the opt and fid fields. That worries me...
You are correct that the offsets are wrong. At minimum I will fix the 
offsets to
match, otherwise I will rework it into a combined IPLB as described above.

Thanks for catching this error.

Regards,
Jared Rossi


  reply	other threads:[~2026-05-12 16:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 22:16 [PATCH 0/6] s390x: Add support for virtio-scsi-pci boot device jrossi
2026-05-04 22:16 ` [PATCH 1/6] s390x: Rename SCSI IPL type to indicate CCW bus jrossi
2026-05-08 16:53   ` Eric Farman
2026-05-04 22:16 ` [PATCH 2/5] pc-bios/s390-ccw: Add per-queue notification offset for multi-queue virtio configurations jrossi
2026-05-06 18:20   ` Zhuoying Cai
2026-05-07 13:26     ` Jared Rossi
2026-05-08 17:23   ` Eric Farman
2026-05-12 16:21     ` Jared Rossi
2026-05-04 22:16 ` [PATCH 3/6] pc-bios/s390-ccw: Rename Virtio CCW run function for generic use jrossi
2026-05-08 17:26   ` Eric Farman
2026-05-04 22:16 ` [PATCH 4/6] s390x: Introduce PCI SCSI IPLB and boot type jrossi
2026-05-09  1:16   ` Eric Farman
2026-05-12 16:13     ` Jared Rossi [this message]
2026-05-04 22:16 ` [PATCH 5/6] s390x: Enable IPL from Virtio PCI SCSI devices jrossi
2026-05-04 22:16 ` [PATCH 6/6] tests/qtest: Add s390x PCI SCSI fallback test to cdrom-test.c jrossi

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=1035a8d9-ce65-486d-845d-6a3b1d714ab0@linux.ibm.com \
    --to=jrossi@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=jjherne@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=zycai@linux.ibm.com \
    /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.