next round of s390x patches
The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)
are available in the Git repository at:
git://github.com/cohuck/qemu tags/s390x-20180619
for you to fetch changes up to 49b67e9440892179c016a7afd33725a50d995ba6:
Merge tag 'tags/s390x-2018-06-18' into staging (2018-06-18 17:05:39 +0200)
----------------------------------------------------------------
- cleanup in virtio-ccw
- accommodate guests using vfio-ccw without specifying unlimited prefetch, but actually working fine
- add cpu model for the z14 Model ZR1
- add support for pxelinux.cfg-style network booting to the s390x firmware
----------------------------------------------------------------
Christian Borntraeger (2):
s390x/ipl: Try to detect Linux vs non Linux for initial IPL PSW s390x/cpumodels: add z14 Model ZR1
Collin Walling (1):
pc-bios/s390-ccw: define loadparm length
Halil Pasic (3):
virtio-ccw: clean up notify
vfio-ccw: add force unlimited prefetch property
vfio-ccw: remove orb.c64 (64 bit data addresses) check
Thomas Huth (6):
roms: Update SLOF submodule to current status pc-bios/s390-ccw/net: Update code for the latest changes in SLOF pc-bios/s390-ccw/net: Add support for pxelinux-style config files pc-bios/s390-ccw/net: Try to load pxelinux.cfg file accoring to the
UUID
pc-bios/s390-ccw: Optimize the s390-netboot.img for size pc-bios/s390-ccw: Update the s390-netboot.img binary
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 01/12] virtio-ccw: clean up notify
From: Halil Pasic <[email protected]>
Coverity recently started complaining about virtio_ccw_notify(). Turns out, there is a couple of things that can be cleaned up. Let's clean!
Message-Id: <[email protected]>
--- hw/s390x/virtio-ccw.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
hw/s390x/virtio-ccw.c +9 -4
@@ -1001,10 +1001,15 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector)SubchDev *sch = ccw_dev->sch;uint64_t indicators; -/* queue indicators + secondary indicators */ -if (vector >=VIRTIO_QUEUE_MAX +64 ) { +if (vector ==VIRTIO_NO_VECTOR ) {return ; } +/* +* vector < VIRTIO_QUEUE_MAX: notification for a virtqueue +* vector == VIRTIO_QUEUE_MAX: configuration change notification +* bits beyond that are unused and should never be notified for +*/ +assert (vector <=VIRTIO_QUEUE_MAX );if (vector <VIRTIO_QUEUE_MAX ) {if (!dev->indicators) {
@@ -1027,6 +1032,7 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector)css_adapter_interrupt (CSS_IO_ADAPTER_VIRTIO , dev->thinint_isc); } }else { +assert (vector <NR_CLASSIC_INDICATOR_BITS ); indicators = address_space_ldq(&address_space_memory, dev->indicators->addr, MEMTXATTRS_UNSPECIFIED,
@@ -1040,12 +1046,11 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector)if (!dev->indicators2) {return ; } - vector =0 ; indicators =address_space_ldq (&address_space_memory, dev->indicators2->addr,MEMTXATTRS_UNSPECIFIED ,NULL ); - indicators |=1ULL << vector; + indicators |=1ULL ;address_space_stq (&address_space_memory, dev->indicators2->addr, indicators,MEMTXATTRS_UNSPECIFIED ,NULL );css_conditional_io_interrupt (sch);
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 03/12] vfio-ccw: remove orb.c64 (64 bit data addresses) check
In reply to Cornelia HuckFrom: Halil Pasic <[email protected]>
The vfio-ccw module does the check too, and there is actually no technical obstacle for supporting fmt 1 idaws. Let us be ready for the beautiful day when fmt 1 idaws become supported by the vfio-ccw kernel module. QEMU does not have to do a thing for that, except not insisting on this check.
Message-Id: <[email protected]>
--- hw/s390x/css.c | 11 ----------- 1 file changed, 11 deletions(-)
hw/s390x/css.c +0 -11
@@ -1199,17 +1199,6 @@ static IOInstEnding sch_handle_start_func_passthrough(SubchDev *sch)assert (orb !=NULL ); p->intparm = orb->intparm; } - -/* -* Only support prefetch enable mode. -* Only support 64bit addressing idal. -*/ -if (!(orb->ctrl0 &ORB_CTRL0_MASK_C64 )) { -warn_report ("vfio-ccw requires PFCH and C64 flags set" ); -sch_gen_unit_exception (sch); -css_inject_io_interrupt (sch); -return IOINST_CC_EXPECTED ; - }return s390_ccw_cmd_request (sch); }
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 02/12] vfio-ccw: add force unlimited prefetch property
In reply to Cornelia HuckFrom: Halil Pasic <[email protected]>
There is at least one guest (OS) such that although it does not rely on the guarantees provided by ORB 1 word 9 bit (aka unlimited prefetch, aka P bit) not being set, it fails to tell this to the machine.
Usually this ain't a big deal, as the original purpose of the P bit is to allow for performance optimizations. vfio-ccw however can not provide the guarantees required if the bit is not set.
It is not possible to implement support for the P bit not set without transitioning to lower level protocols for vfio-ccw. So let's give the user the opportunity to force setting the P bit, if the user knows this is safe. For self modifying channel programs forcing the P bit is not safe. If the P bit is forced for a self modifying channel program things are expected to break in strange ways.
Let's also avoid warning multiple about P bit not set in the ORB in case P bit is not told to be forced, and designate the affected vfio-ccw device.
Message-Id: <[email protected]>
--- hw/s390x/css.c | 3 +-- hw/vfio/ccw.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-)
hw/s390x/css.c +1 -2
@@ -1204,8 +1204,7 @@ static IOInstEnding sch_handle_start_func_passthrough(SubchDev *sch)* Only support prefetch enable mode. * Only support 64bit addressing idal. */ -if (!(orb->ctrl0 &ORB_CTRL0_MASK_PFCH ) || - !(orb->ctrl0 &ORB_CTRL0_MASK_C64 )) { +if (!(orb->ctrl0 &ORB_CTRL0_MASK_C64 )) {warn_report ("vfio-ccw requires PFCH and C64 flags set" );sch_gen_unit_exception (sch);css_inject_io_interrupt (sch);
hw/vfio/ccw.c +35 -0
@@ -33,8 +33,30 @@ typedef struct VFIOCCWDevice {uint64_t io_region_offset;struct ccw_io_region *io_region;EventNotifier io_notifier; +bool force_orb_pfch; +bool warned_orb_pfch; } VFIOCCWDevice; +static inline void warn_once (bool *warned,const char *fmt, ...) +{ +va_list ap; + +if (!warned || *warned) { +return ; + } + *warned = true; +va_start (ap, fmt); +warn_vreport (fmt, ap); +va_end (ap); +} + +static inline void warn_once_pfch (VFIOCCWDevice *vcdev,SubchDev *sch, +const char *msg) +{ +warn_once (&vcdev->warned_orb_pfch,"vfio-ccw (devno %x.%x.%04x): %s" , + sch->cssid, sch->ssid, sch->devno, msg); +} +static void vfio_ccw_compute_needs_reset (VFIODevice *vdev) { vdev->needs_reset = false;
@@ -55,6 +77,18 @@ static IOInstEnding vfio_ccw_handle_request(SubchDev *sch)struct ccw_io_region *region = vcdev->io_region;int ret; +if (!(sch->orb.ctrl0 &ORB_CTRL0_MASK_PFCH )) { +if (!(vcdev->force_orb_pfch)) { +warn_once_pfch (vcdev, sch,"requires PFCH flag set" ); +sch_gen_unit_exception (sch); +css_inject_io_interrupt (sch); +return IOINST_CC_EXPECTED ; + }else { + sch->orb.ctrl0 |=ORB_CTRL0_MASK_PFCH ; +warn_once_pfch (vcdev, sch,"PFCH flag forced" ); + } + } +QEMU_BUILD_BUG_ON (sizeof (region->orb_area) !=sizeof (ORB ));QEMU_BUILD_BUG_ON (sizeof (region->scsw_area) !=sizeof (SCSW ));QEMU_BUILD_BUG_ON (sizeof (region->irb_area) !=sizeof (IRB ));
@@ -430,6 +464,7 @@ static void vfio_ccw_unrealize(DeviceState *dev, Error **errp)static Property vfio_ccw_properties[] = {DEFINE_PROP_STRING ("sysfsdev" , VFIOCCWDevice, vdev.sysfsdev), +DEFINE_PROP_BOOL ("force-orb-pfch" , VFIOCCWDevice, force_orb_pfch, false),DEFINE_PROP_END_OF_LIST (), };
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 04/12] s390x/ipl: Try to detect Linux vs non Linux for initial IPL PSW
In reply to Cornelia HuckFrom: Christian Borntraeger <[email protected]>
Right now the IPL device always starts from address 0x10000 (the usual Linux entry point). To run other guests (e.g. test programs) it is useful to use the IPL PSW from address 0. We can use the Linux magic at 0x10008 to decide.
Message-Id: <[email protected]>
--- hw/s390x/ipl.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-)
hw/s390x/ipl.c +22 -5
@@ -29,6 +29,7 @@#include "exec/exec-all.h" #define KERN_IMAGE_START 0x010000UL +#define LINUX_MAGIC_ADDR 0x010008UL#define KERN_PARM_AREA 0x010480UL#define INITRD_START 0x800000UL#define INITRD_PARM_START 0x010408UL
@@ -105,7 +106,9 @@ static uint64_t bios_translate_addr(void *opaque, uint64_t srcaddr)static void s390_ipl_realize (DeviceState *dev,Error **errp) {S390IPLState *ipl =S390_IPL (dev); -uint64_t pentry =KERN_IMAGE_START ; +uint32_t *ipl_psw; +uint64_t pentry; +char *magic;int kernel_size;Error *err =NULL ;
@@ -157,10 +160,24 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp) NULL, 1, EM_S390, 0, 0);if (kernel_size <0 ) { kernel_size =load_image_targphys (ipl->kernel,0 , ram_size); - } -if (kernel_size <0 ) { -error_setg (&err,"could not load kernel '%s'" , ipl->kernel); - goto error; +if (kernel_size <0 ) { +error_setg (&err,"could not load kernel '%s'" , ipl->kernel); + goto error; + } +/* if this is Linux use KERN_IMAGE_START */ + magic =rom_ptr (LINUX_MAGIC_ADDR ); +if (magic && !memcmp (magic,"S390EP" ,6 )) { + pentry =KERN_IMAGE_START ; + }else { +/* if not Linux load the address of the (short) IPL PSW */ + ipl_psw =rom_ptr (4 ); +if (ipl_psw) { + pentry =be32_to_cpu (*ipl_psw) &0x7fffffffUL ; + }else { +error_setg (&err,"Could not get IPL PSW" ); + goto error; + } + } }/* * Is it a Linux kernel (starting at 0x10000)? If yes, we fill in the
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 05/12] s390x/cpumodels: add z14 Model ZR1
In reply to Cornelia HuckFrom: Christian Borntraeger <[email protected]>
Introduce the new z14 Model ZR1 cpu model. Mostly identical to z14, only the cpu type differs (3906 vs. 3907)
Message-Id: <[email protected]>
--- target/s390x/cpu_models.c | 1 + 1 file changed, 1 insertion(+)
target/s390x/cpu_models.c +1 -0
@@ -79,6 +79,7 @@ static S390CPUDef s390_cpu_defs[] = {CPUDEF_INIT (0x2964 ,13 ,2 ,47 ,0x08000000U ,"z13.2" ,"IBM z13 GA2" ),CPUDEF_INIT (0x2965 ,13 ,2 ,47 ,0x08000000U ,"z13s" ,"IBM z13s GA1" ),CPUDEF_INIT (0x3906 ,14 ,1 ,47 ,0x08000000U ,"z14" ,"IBM z14 GA1" ), + CPUDEF_INIT(0x3907, 14, 1, 47, 0x08000000U, "z14ZR1", "IBM z14 Model ZR1 GA1"), };#define QEMU_MAX_CPU_TYPE 0x2827
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 07/12] roms: Update SLOF submodule to current status
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
We need the latest version of SLOF's libnet for adding pxelinux.cfg support in the s390-ccw bios, too.
--- roms/SLOF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
roms/SLOF +1 -1
@@ -1 +1 @@ -Subproject commit fa981320a1e0968d6fc1b8de319723ff8212b337 +Subproject commit 2317427ce76006723f7ae103a6998ab41dd79c68
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 06/12] pc-bios/s390-ccw: define loadparm length
In reply to Cornelia HuckFrom: Collin Walling <[email protected]>
Loadparm is defined by the s390 architecture to be 8 bytes in length. Let's define this size in the s390-ccw bios.
--- pc-bios/s390-ccw/iplb.h | 4 +++- pc-bios/s390-ccw/main.c | 8 ++++---- pc-bios/s390-ccw/sclp.c | 2 +- pc-bios/s390-ccw/sclp.h | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-)
pc-bios/s390-ccw/iplb.h +3 -1
@@ -12,6 +12,8 @@ #ifndef IPLB_H #define IPLB_H +#define LOADPARM_LEN 8 + struct IplBlockCcw { uint8_t reserved0[85]; uint8_t ssid;
@@ -61,7 +63,7 @@ struct IplParameterBlock {uint8_t pbt;uint8_t flags;uint16_t reserved01; -uint8_t loadparm[8 ]; +uint8_t loadparm[LOADPARM_LEN ];union {IplBlockCcw ccw;IplBlockFcp fcp;
pc-bios/s390-ccw/main.c +4 -4
@@ -15,7 +15,7 @@ char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));static SubChannelId blk_schid = { .one =1 }; IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE))); -static char loadparm_str[9 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; +static char loadparm_str[LOADPARM_LEN +1 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };QemuIplParameters qipl;#define LOADPARM_PROMPT "PROMPT "
@@ -80,13 +80,13 @@ static bool find_dev(Schib *schib, int dev_no)static void menu_setup (void ) { -if (memcmp (loadparm_str,LOADPARM_PROMPT ,8 ) ==0 ) { +if (memcmp (loadparm_str,LOADPARM_PROMPT ,LOADPARM_LEN ) ==0 ) {menu_set_parms (QIPL_FLAG_BM_OPTS_CMD ,0 );return ; }/* If loadparm was set to any other value, then do not enable menu */ -if (memcmp (loadparm_str,LOADPARM_EMPTY ,8 ) !=0 ) { +if (memcmp (loadparm_str,LOADPARM_EMPTY ,LOADPARM_LEN ) !=0 ) {return ; }
@@ -117,7 +117,7 @@ static void virtio_setup(void)enable_mss_facility ();sclp_get_loadparm_ascii (loadparm_str); -memcpy (ldp +10 , loadparm_str,8 ); +memcpy (ldp +10 , loadparm_str,LOADPARM_LEN );sclp_print (ldp);memcpy (&qipl, early_qipl,sizeof (QemuIplParameters));
pc-bios/s390-ccw/sclp.c +1 -1
@@ -114,7 +114,7 @@ void sclp_get_loadparm_ascii(char *loadparm)memset ((char *)_sccb,0 ,sizeof (ReadInfo)); sccb->h.length =sizeof (ReadInfo);if (!sclp_service_call (SCLP_CMDW_READ_SCP_INFO , sccb)) { -ebcdic_to_ascii ((char *) sccb->loadparm, loadparm,8 ); +ebcdic_to_ascii ((char *) sccb->loadparm, loadparm,LOADPARM_LEN ); } }
pc-bios/s390-ccw/sclp.h +1 -1
@@ -56,7 +56,7 @@ typedef struct ReadInfo {uint16_t rnmax;uint8_t rnsize;uint8_t reserved[13 ]; -uint8_t loadparm[8 ]; +uint8_t loadparm[LOADPARM_LEN ]; } __attribute__((packed)) ReadInfo; typedef struct SCCB {
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 09/12] pc-bios/s390-ccw/net: Add support for pxelinux-style config files
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
Since it is quite cumbersome to manually create a combined kernel with initrd image for network booting, we now support loading via pxelinux configuration files, too. In these files, the kernel, initrd and command line parameters can be specified seperately, and the firmware then takes care of glueing everything together in memory after the files have been downloaded. See this URL for details about the config file layout:
https://www.syslinux.org/wiki/index.php?title=PXELINUX
The user can either specify a config file directly as bootfile via DHCP (but in this case, the file has to start either with "default" or a "#" comment so we can distinguish it from binary kernels), or a folder (i.e. the bootfile name must end with "/") where the firmware should look for the typical pxelinux.cfg file names, e.g. based on MAC or IP address. We also support the pxelinux.cfg DHCP options 209 and 210 from RFC 5071.
--- pc-bios/s390-ccw/netboot.mak | 7 ++-- pc-bios/s390-ccw/netmain.c | 86 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 4 deletions(-)
pc-bios/s390-ccw/netboot.mak +4 -3
@@ -25,8 +25,9 @@ CTYPE_OBJS = isdigit.o isxdigit.o toupper.o %.o : $(SLOF_DIR)/lib/libc/ctype/%.c $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") -STRING_OBJS = strcat.o strchr.o strcmp.o strcpy.o strlen.o strncmp.o strncpy.o \ - strstr.o memset.o memcpy.o memmove.o memcmp.o +STRING_OBJS = strcat.o strchr.o strrchr.o strcpy.o strlen.o strncpy.o \ + strcmp.o strncmp.o strcasecmp.o strncasecmp.o strstr.o \ + memset.o memcpy.o memmove.o memcmp.o %.o : $(SLOF_DIR)/lib/libc/string/%.c $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
@@ -50,7 +51,7 @@ libc.a: $(LIBCOBJS) # libnet files: LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \ - dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o + dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o LIBNETCFLAGS := $(QEMU_CFLAGS) -DDHCPARCH=0x1F $(LIBC_INC) $(LIBNET_INC) %.o : $(SLOF_DIR)/lib/libnet/%.c
pc-bios/s390-ccw/netmain.c +85 -1
128 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 08/12] pc-bios/s390-ccw/net: Update code for the latest changes in SLOF
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The ip_version information now has to be stored in the filename_ip_t structure, and there is now a common function called tftp_get_error_info() which can be used to get the error string for a TFTP error code. We can also get rid of some superfluous "(char *)" casts now.
--- pc-bios/s390-ccw/netboot.mak | 2 +- pc-bios/s390-ccw/netmain.c | 86 +++++++++----------------------------------- 2 files changed, 18 insertions(+), 70 deletions(-)
pc-bios/s390-ccw/netboot.mak +1 -1
@@ -34,7 +34,7 @@ STDLIB_OBJS = atoi.o atol.o strtoul.o strtol.o rand.o malloc.o free.o %.o : $(SLOF_DIR)/lib/libc/stdlib/%.c $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") -STDIO_OBJS = sprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \ +STDIO_OBJS = sprintf.o snprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \ printf.o putc.o puts.o putchar.o stdchnls.o fileno.o %.o : $(SLOF_DIR)/lib/libc/stdio/%.c $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
pc-bios/s390-ccw/netmain.c +17 -69
159 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 10/12] pc-bios/s390-ccw/net: Try to load pxelinux.cfg file accoring to the UUID
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
With the STSI instruction, we can get the UUID of the current VM instance, so we can support loading pxelinux config files via UUID in the file name, too.
--- pc-bios/s390-ccw/netmain.c | 56 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/netmain.c +55 -1
@@ -44,6 +44,9 @@ extern char _start[];#define KERNEL_MAX_SIZE ((long)_start)#define ARCH_COMMAND_LINE_SIZE 896/* Taken from Linux kernel */ +/* STSI 3.2.2 offset of first vmdb + offset of uuid inside vmdb */ +#define STSI322_VMDB_UUID_OFFSET ((8 + 12) * 4) + char stack[PAGE_SIZE * 8] __attribute__((aligned(PAGE_SIZE))); IplParameterBlock iplb __attribute__((aligned(PAGE_SIZE)));static char cfgbuf[2048 ];
@@ -235,6 +238,56 @@ static void net_release(filename_ip_t *fn_ip) } } +/** +* Retrieve the Universally Unique Identifier of the VM. +* @return UUID string, or NULL in case of errors +*/ +static const char *get_uuid (void ) +{ + registerint r0 asm("0" ); + registerint r1 asm("1" ); +uint8_t *mem, *buf, uuid[16 ]; +int i, cc, chk =0 ; +static char uuid_str[37 ]; + + mem =malloc (2 *PAGE_SIZE ); +if (!mem) { +puts ("Out of memory ... can not get UUID." ); +return NULL ; + } + buf = (uint8_t *)(((uint64_t )mem +PAGE_SIZE -1 ) & ~(PAGE_SIZE -1 )); +memset (buf,0 ,PAGE_SIZE ); + +/* Get SYSIB 3.2.2 */ + r0 = (3 <<28 ) |2 ; + r1 =2 ; + asmvolatile (" stsi 0(%[addr])\n" +" ipm %[cc]\n" +" srl %[cc],28\n" + : [cc]"=d" (cc) + :"d" (r0),"d" (r1), [addr]"a" (buf) + :"cc" ,"memory" ); +if (cc) { +return NULL ; + } + +for (i =0 ; i <16 ; i++) { + uuid[i] = buf[STSI322_VMDB_UUID_OFFSET + i]; + chk |= uuid[i]; + } +free (mem); +if (!chk) { +return NULL ; + } + +sprintf (uuid_str,"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-" +"%02x%02x%02x%02x%02x%02x" , uuid[0 ], uuid[1 ], uuid[2 ], uuid[3 ], + uuid[4 ], uuid[5 ], uuid[6 ], uuid[7 ], uuid[8 ], uuid[9 ], uuid[10 ], + uuid[11 ], uuid[12 ], uuid[13 ], uuid[14 ], uuid[15 ]); + +return uuid_str; +} +/** * Load a kernel with initrd (i.e. with the information that we've got from * a pxelinux.cfg config file)
@@ -285,7 +338,8 @@ static int net_try_pxelinux_cfg(filename_ip_t *fn_ip)struct pl_cfg_entry entries[MAX_PXELINUX_ENTRIES ];int num_ent, def_ent =0 ; - num_ent =pxelinux_load_parse_cfg (fn_ip, mac,NULL ,DEFAULT_TFTP_RETRIES , + num_ent =pxelinux_load_parse_cfg (fn_ip, mac,get_uuid (), +DEFAULT_TFTP_RETRIES , cfgbuf,sizeof (cfgbuf), entries,MAX_PXELINUX_ENTRIES , &def_ent);if (num_ent >0 ) {
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 11/12] pc-bios/s390-ccw: Optimize the s390-netboot.img for size
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The -O2 optimization flag is passed via CFLAGS to the firmware Makefile, but in netbook.mak, we've got some rules that only use QEMU_CFLAGS for compiling the libc and libnet from SLOF, so these files get compiled without optimization so far. Use CFLAGS here, too, to create faster and smaller code.
We can additionally save some more bytes in the firmware images by compi- ling the code with -fno-asynchronous-unwind-tables. This will omit some ELF sections (used for stack unwinding for example) from the image that we do not need in the firmware.
--- pc-bios/s390-ccw/Makefile | 1 + pc-bios/s390-ccw/netboot.mak | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
pc-bios/s390-ccw/Makefile +1 -0
@@ -15,6 +15,7 @@ OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \ QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing +QEMU_CFLAGS += -fno-asynchronous-unwind-tables QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) LDFLAGS += -Wl,-pie -nostdlib
pc-bios/s390-ccw/netboot.mak +2 -2
@@ -19,7 +19,7 @@ s390-netboot.img: s390-netboot.elf # libc files: -LIBC_CFLAGS := $(QEMU_CFLAGS) $(LIBC_INC) $(LIBNET_INC) +LIBC_CFLAGS := $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) CTYPE_OBJS = isdigit.o isxdigit.o toupper.o %.o : $(SLOF_DIR)/lib/libc/ctype/%.c
@@ -52,7 +52,7 @@ libc.a: $(LIBCOBJS) LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \ dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o -LIBNETCFLAGS := $(QEMU_CFLAGS) -DDHCPARCH=0x1F $(LIBC_INC) $(LIBNET_INC) +LIBNETCFLAGS := $(QEMU_CFLAGS) $(CFLAGS) -DDHCPARCH=0x1F $(LIBC_INC) $(LIBNET_INC) %.o : $(SLOF_DIR)/lib/libnet/%.c $(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 12/12] pc-bios/s390-ccw: Update the s390-netboot.img binary
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
This binary now contains the support for pxelinux.cfg-style network booting.
--- pc-bios/s390-netboot.img | Bin 87872 -> 54944 bytes 1 file changed, 0 insertions(+), 0 deletions(-)
pc-bios/s390-netboot.img binary +0 -0
Signature · 1 line
2.14.4
Peter Maydell
AppliedQuoted 20 lines · Cornelia Huck
The following changes since commit
2ef2f16781af9dee6ba6517755e9073ba5799fa2:Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)
are available in the Git repository at:
git://github.com/cohuck/qemutags/s390x-20180619for you to fetch changes up to
49b67e9440892179c016a7afd33725a50d995ba6:Merge tag 'tags/s390x-2018-06-18' into staging (2018-06-18 17:05:39 +0200)
----------------------------------------------------------------
- cleanup in virtio-ccw
- accommodate guests using vfio-ccw without specifying unlimited prefetch, but actually working fine
- add cpu model for the z14 Model ZR1
- add support for pxelinux.cfg-style network booting to the s390x firmware
Quoted 1 line
----------------------------------------------------------------
Applied, thanks.
-- PMM