From: "Collin L. Walling" <walling@linux.vnet.ibm.com>
To: qemu-devel <qemu-devel@nongnu.org>, qemu-s390x@nongnu.org
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>,
Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>,
David Hildenbrand <david@redhat.com>
Subject: [Qemu-devel] Interactive Boot Menu: New Fields in IPLB
Date: Thu, 7 Dec 2017 18:56:16 -0500 [thread overview]
Message-ID: <49485e7e-f950-58c5-af56-b336b4d4f0e3@linux.vnet.ibm.com> (raw)
Hello,
I'd like to bring up a formal discussion regarding the utilization of
reserved space
in the IPL Parameter Blocks for s390x guests. Particularly the following:
* How should we approach "claiming" bytes so that we do not obstruct
future development?
* What would be "the best" location to store these new fields?
I've posted some relevant information regarding this feature below.
--- The Fields We Need To Store ---
Currently, we're utilizing 3 bytes out of a 77 byte reserved field in
the IPLB for
CCW and SCSI. We do this because need a way to pass the Qemu command
line options
for a boot menu (on/off and timeout) to the s390-ccw bios. We require
only two
fields in the IPLB, totaling 3 bytes:
* uint8_t boot_menu_flag
o determines if we should show the menu or not
* uint16_t boot_menu_timeout
o stored as milliseconds
o A max value of approx 65,000 gives us 65 seconds -- should be
plenty
o could potentially be reduced to one byte, and we store the value
as seconds instead
Note: these fields *only*have value in a QEMU environment.
--- The Data We Have In Place Already ---
The following can be found in qemu/hw/s390x/ipl.h: (a similar structure
exists
in qemu/pc-bios/s390-ccw/iplb.h)
struct IplBlockCcw {
uint64_t netboot_start_addr;
uint8_t reserved0[74]; // <--- previously a 77 reserved field
uint16_t boot_menu_timeout; // new
uint8_t boot_menu_flag; // new
uint8_t ssid;
uint16_t devno;
uint8_t vm_flags;
uint8_t reserved3[3];
uint32_t vm_parm_len;
uint8_t nss_name[8];
uint8_t vm_parm[64];
uint8_t reserved4[8];
} QEMU_PACKED;
typedef struct IplBlockCcw IplBlockCcw;
struct IplBlockFcp {
uint8_t reserved1[305 - 1];
uint8_t opt;
uint8_t reserved2[3];
uint16_t reserved3;
uint16_t devno;
uint8_t reserved4[4];
uint64_t wwpn;
uint64_t lun;
uint32_t bootprog;
uint8_t reserved5[12];
uint64_t br_lba;
uint32_t scp_data_len;
uint8_t reserved6[260];
uint8_t scp_data[];
} QEMU_PACKED;
typedef struct IplBlockFcp IplBlockFcp;
struct IplBlockQemuScsi {
uint32_t lun;
uint16_t target;
uint16_t channel;
uint8_t reserved0[74]; // <--- previously a 77 reserved field
uint16_t boot_menu_timeout; // new
uint8_t boot_menu_flag; // new
uint8_t ssid;
uint16_t devno;
} QEMU_PACKED;
typedef struct IplBlockQemuScsi IplBlockQemuScsi;
[...]
union IplParameterBlock {
struct {
uint32_t len;
uint8_t reserved0[3];
uint8_t version;
uint32_t blk0_len;
uint8_t pbt;
uint8_t flags;
uint16_t reserved01;
uint8_t loadparm[8];
union {
IplBlockCcw ccw;
IplBlockFcp fcp;
IplBlockQemuScsi scsi;
};
} QEMU_PACKED;
struct {
uint8_t reserved1[110];
uint16_t devno;
uint8_t reserved2[88];
uint8_t reserved_ext[4096 - 200];
} QEMU_PACKED;
} QEMU_PACKED;
typedef union IplParameterBlock IplParameterBlock;
-----------------------------
Thanks for your time,
- Collin L Walling
next reply other threads:[~2017-12-07 23:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 23:56 Collin L. Walling [this message]
2017-12-08 8:26 ` [Qemu-devel] Interactive Boot Menu: New Fields in IPLB Christian Borntraeger
2017-12-08 10:14 ` Cornelia Huck
2017-12-08 10:19 ` Cornelia Huck
2017-12-08 11:59 ` David Hildenbrand
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=49485e7e-f950-58c5-af56-b336b4d4f0e3@linux.vnet.ibm.com \
--to=walling@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=mihajlov@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.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 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).