From: Thomas Huth <thuth@redhat.com>
To: jrossi@linux.ibm.com, qemu-devel@nongnu.org, qemu-s390x@nongnu.org
Cc: frankja@linux.ibm.com, nsg@linux.ibm.com
Subject: Re: [PATCH 3/5] s390x: Build IPLB chain for multiple boot devices
Date: Mon, 3 Jun 2024 21:03:51 +0200 [thread overview]
Message-ID: <3af8ce36-8010-4aac-a786-a072bed74b99@redhat.com> (raw)
In-Reply-To: <20240529154311.734548-4-jrossi@linux.ibm.com>
On 29/05/2024 17.43, jrossi@linux.ibm.com wrote:
> From: Jared Rossi <jrossi@linux.ibm.com>
>
> Write a chain of IPLBs into memory for future use.
>
> The IPLB chain is placed immediately before the BIOS in memory at the highest
> unused page boundary providing sufficient space to fit the chain. Because this
> is not a fixed address, the location of the next IPLB and number of remaining
> boot devices is stored in the QIPL global variable for later access.
>
> At this stage the IPLB chain is not accessed by the guest during IPL.
>
> Signed-off-by: Jared Rossi <jrossi@linux.ibm.com>
> ---
...
> @@ -422,54 +440,51 @@ void s390_ipl_set_loadparm(char *ascii_lp, uint8_t *ebcdic_lp)
> }
> }
>
> -static bool s390_gen_initial_iplb(S390IPLState *ipl)
> +static bool s390_build_iplb(DeviceState *dev_st, IplParameterBlock *iplb)
> {
> - DeviceState *dev_st;
> + S390IPLState *ipl = get_ipl_device();
> CcwDevice *ccw_dev = NULL;
> SCSIDevice *sd;
> int devtype;
> uint8_t *lp;
>
> - dev_st = get_boot_device(0);
> - if (dev_st) {
> - ccw_dev = s390_get_ccw_device(dev_st, &devtype);
> - }
> -
> /*
> * Currently allow IPL only from CCW devices.
> */
> + ccw_dev = s390_get_ccw_device(dev_st, &devtype);
> if (ccw_dev) {
> lp = ccw_dev->loadparm;
>
> - switch (devtype) {
> - case CCW_DEVTYPE_SCSI:
> + switch (devtype) {
> + case CCW_DEVTYPE_SCSI:
Bad indentation?
> sd = SCSI_DEVICE(dev_st);
> - ipl->iplb.len = cpu_to_be32(S390_IPLB_MIN_QEMU_SCSI_LEN);
> - ipl->iplb.blk0_len =
> + iplb->len = cpu_to_be32(S390_IPLB_MIN_QEMU_SCSI_LEN);
> + iplb->blk0_len =
> cpu_to_be32(S390_IPLB_MIN_QEMU_SCSI_LEN - S390_IPLB_HEADER_LEN);
> - ipl->iplb.pbt = S390_IPL_TYPE_QEMU_SCSI;
> - ipl->iplb.scsi.lun = cpu_to_be32(sd->lun);
> - ipl->iplb.scsi.target = cpu_to_be16(sd->id);
> - ipl->iplb.scsi.channel = cpu_to_be16(sd->channel);
> - ipl->iplb.scsi.devno = cpu_to_be16(ccw_dev->sch->devno);
> - ipl->iplb.scsi.ssid = ccw_dev->sch->ssid & 3;
> + iplb->pbt = S390_IPL_TYPE_QEMU_SCSI;
> + iplb->scsi.lun = cpu_to_be32(sd->lun);
> + iplb->scsi.target = cpu_to_be16(sd->id);
> + iplb->scsi.channel = cpu_to_be16(sd->channel);
> + iplb->scsi.devno = cpu_to_be16(ccw_dev->sch->devno);
> + iplb->scsi.ssid = ccw_dev->sch->ssid & 3;
> break;
> case CCW_DEVTYPE_VFIO:
> - ipl->iplb.len = cpu_to_be32(S390_IPLB_MIN_CCW_LEN);
> - ipl->iplb.pbt = S390_IPL_TYPE_CCW;
> - ipl->iplb.ccw.devno = cpu_to_be16(ccw_dev->sch->devno);
> - ipl->iplb.ccw.ssid = ccw_dev->sch->ssid & 3;
> + iplb->len = cpu_to_be32(S390_IPLB_MIN_CCW_LEN);
> + iplb->pbt = S390_IPL_TYPE_CCW;
> + iplb->ccw.devno = cpu_to_be16(ccw_dev->sch->devno);
> + iplb->ccw.ssid = ccw_dev->sch->ssid & 3;
> break;
> case CCW_DEVTYPE_VIRTIO_NET:
> + /* The S390IPLState netboot is ture if ANY IPLB may use netboot */
Typo: ture --> true
Thomas
next prev parent reply other threads:[~2024-06-03 19:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 15:43 [PATCH 0/5] s390x: Add Full Boot Order Support jrossi
2024-05-29 15:43 ` [PATCH 1/5] s390x: Create include files for s390x IPL definitions jrossi
2024-06-03 18:51 ` Thomas Huth
2024-05-29 15:43 ` [PATCH 2/5] s390x: Add loadparm to CcwDevice jrossi
2024-06-04 14:27 ` Thomas Huth
2024-06-04 16:27 ` Jared Rossi
2024-06-04 16:59 ` Thomas Huth
2024-06-05 7:49 ` Thomas Huth
2024-05-29 15:43 ` [PATCH 3/5] s390x: Build IPLB chain for multiple boot devices jrossi
2024-06-03 19:03 ` Thomas Huth [this message]
2024-06-04 18:26 ` Thomas Huth
2024-06-05 20:01 ` Jared Rossi
2024-06-07 6:11 ` Thomas Huth
2024-05-29 15:43 ` [PATCH 4/5] s390x: Add boot device fallback infrastructure jrossi
2024-06-05 8:20 ` Thomas Huth
2024-06-05 12:13 ` Thomas Huth
2024-05-29 15:43 ` [PATCH 5/5] s390x: Enable and document boot device fallback on panic jrossi
2024-06-05 13:37 ` Thomas Huth
2024-06-05 14:48 ` Jared Rossi
2024-06-07 5:57 ` Thomas Huth
2024-06-16 23:44 ` Jared Rossi
2024-06-20 8:10 ` Thomas Huth
2024-06-17 14:49 ` Christian Borntraeger
2024-06-20 8:14 ` Thomas Huth
2024-06-04 18:35 ` [PATCH 0/5] s390x: Add Full Boot Order Support Thomas Huth
2024-06-05 8:02 ` Thomas Huth
2024-06-06 19:22 ` Jared Rossi
2024-06-07 6:19 ` Thomas Huth
2024-06-10 3:58 ` Jared Rossi
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=3af8ce36-8010-4aac-a786-a072bed74b99@redhat.com \
--to=thuth@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=jrossi@linux.ibm.com \
--cc=nsg@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@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).