qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Interactive Boot Menu: New Fields in IPLB
@ 2017-12-07 23:56 Collin L. Walling
  2017-12-08  8:26 ` Christian Borntraeger
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Collin L. Walling @ 2017-12-07 23:56 UTC (permalink / raw)
  To: qemu-devel, qemu-s390x
  Cc: Christian Borntraeger, Viktor Mihajlovski, Thomas Huth,
	Cornelia Huck, David Hildenbrand

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-08 11:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07 23:56 [Qemu-devel] Interactive Boot Menu: New Fields in IPLB Collin L. Walling
2017-12-08  8:26 ` Christian Borntraeger
2017-12-08 10:14 ` Cornelia Huck
2017-12-08 10:19 ` Cornelia Huck
2017-12-08 11:59 ` David Hildenbrand

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).