qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qemu-s390x] Interactive Boot Menu: New Fields in IPLB


From: Collin L. Walling
Subject: [qemu-s390x] Interactive Boot Menu: New Fields in IPLB
Date: Thu, 7 Dec 2017 18:56:16 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]