From: Farhan Ali <alifm@linux.vnet.ibm.com>
To: Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Alexander Graf <agraf@suse.de>,
David Hildenbrand <david@redhat.com>,
Jens Freimann <jfreiman@redhat.com>,
Eric Farman <farman@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS
Date: Tue, 27 Jun 2017 12:50:01 -0400 [thread overview]
Message-ID: <cd6a24ee-ddfd-f6f1-a20d-2ec1323ffd3e@linux.vnet.ibm.com> (raw)
In-Reply-To: <1498564100-10045-1-git-send-email-thuth@redhat.com>
Hi Thomas,
This is really interesting :)
On 06/27/2017 07:48 AM, Thomas Huth wrote:
> It's already possible to do a network boot of an s390x guest with an
> external netboot image (based on a Linux installation), but it would
> be much more convenient if the s390-ccw firmware supported network
> booting right out of the box, without the need to assemble such an
> external image first.
>
> This patch series now introduces network booting via DHCP and TFTP
> directly into the s390-ccw firmware by re-using the networking stack
> from the SLOF firmware (see https://github.com/aik/SLOF/ for details),
> and adds a driver for virtio-net-ccw devices.
>
> Once the patches have been applied, you can download an .INS file
> via TFTP which contains the information about the further files
> that have to be loaded - kernel, initrd, etc. For example, you can
> use the built-in TFTP and DHCP server of QEMU for this by starting
> QEMU with:
>
> qemu-system-s390x ... -device virtio-net,netdev=n1,bootindex=1 \
> -netdev user,id=n1,tftp=/path/to/tftp,bootfile=generic.ins
>
> The .INS file has to use the same syntax as the .INS files that can
> already be found on s390x Linux distribution installation CD-ROMs.
>
> The patches are still in a rough shape, but before I continue here,
> I though I'd get some feedback first. Specifically:
>
> - This adds a lot of additional code to the s390-ccw firmware (and
> the binary is afterwards three times as big as before, 75k instead
> of 25k) ... is that still acceptable?
IMHO 75k is not that huge compared to the Linux based netboot image.
>
> - Is it OK to require loading an .INS file first? Or does anybody
> have a better idea how to load multiple files (kernel, initrd,
> etc. ...)?
>
> - The code from SLOF uses a different coding style (TABs instead
> of space) ... is it OK to keep that coding style here so we
> can share patches between SLOF and s390-ccw more easily?
>
> - The code only supports TFTP (via UDP) ... I think that is OK for
> most use-cases, but if we ever want to support network booting
> via HTTP or something else that is based on TCP, we would need to
> use something else instead... Should we maybe rather head towards
> grub2, petitboot or something different instead?
Can't it be extended to support HTTP boot?
>
> Thomas
>
>
> Thomas Huth (14):
> pc-bios/s390-ccw: Add the libc from the SLOF firmware
> pc-bios/s390-ccw: Start using the libc from SLOF
> pc-bios/s390-ccw: Add a write() function for stdio
> pc-bios/s390-ccw: Add implementation of sbrk()
> pc-bios/s390-ccw: Add the TFTP network loading stack from SLOF
> libnet: Remove remainders of netsave code
> libnet: Rework error message printing
> libnet: Refactor some code of netload() into a separate function
> pc-bios/s390-ccw: Make the basic libnet code compilable
> pc-bios/s390-ccw: Add timer code for the libnet
> pc-bios/s390-ccw: Add virtio-net driver code
> pc-bios/s390-ccw: Load file via an intermediate .INS file
> pc-bios/s390-ccw: Allow loading to address 0
> pc-bios/s390-ccw: Wire up the netload code
>
> configure | 6 +-
> hw/s390x/ipl.c | 2 +-
> pc-bios/s390-ccw/Makefile | 14 +-
> pc-bios/s390-ccw/bootmap.c | 10 +-
> pc-bios/s390-ccw/bootmap.h | 1 +
> pc-bios/s390-ccw/libc/Makefile | 47 ++
> pc-bios/s390-ccw/libc/README.txt | 49 ++
> pc-bios/s390-ccw/libc/ctype/Makefile.inc | 21 +
> pc-bios/s390-ccw/libc/ctype/isdigit.c | 25 +
> pc-bios/s390-ccw/libc/ctype/isprint.c | 18 +
> pc-bios/s390-ccw/libc/ctype/isspace.c | 29 +
> pc-bios/s390-ccw/libc/ctype/isxdigit.c | 21 +
> pc-bios/s390-ccw/libc/ctype/tolower.c | 18 +
> pc-bios/s390-ccw/libc/ctype/toupper.c | 21 +
> pc-bios/s390-ccw/libc/include/ctype.h | 24 +
> pc-bios/s390-ccw/libc/include/errno.h | 34 +
> pc-bios/s390-ccw/libc/include/limits.h | 32 +
> pc-bios/s390-ccw/libc/include/stdarg.h | 22 +
> pc-bios/s390-ccw/libc/include/stdbool.h | 20 +
> pc-bios/s390-ccw/libc/include/stddef.h | 25 +
> pc-bios/s390-ccw/libc/include/stdint.h | 28 +
> pc-bios/s390-ccw/libc/include/stdio.h | 63 ++
> pc-bios/s390-ccw/libc/include/stdlib.h | 34 +
> pc-bios/s390-ccw/libc/include/string.h | 37 ++
> pc-bios/s390-ccw/libc/include/sys/socket.h | 53 ++
> pc-bios/s390-ccw/libc/include/unistd.h | 28 +
> pc-bios/s390-ccw/libc/stdio/Makefile.inc | 24 +
> pc-bios/s390-ccw/libc/stdio/fileno.c | 19 +
> pc-bios/s390-ccw/libc/stdio/fprintf.c | 26 +
> pc-bios/s390-ccw/libc/stdio/printf.c | 27 +
> pc-bios/s390-ccw/libc/stdio/putc.c | 25 +
> pc-bios/s390-ccw/libc/stdio/putchar.c | 21 +
> pc-bios/s390-ccw/libc/stdio/puts.c | 28 +
> pc-bios/s390-ccw/libc/stdio/setvbuf.c | 28 +
> pc-bios/s390-ccw/libc/stdio/sprintf.c | 30 +
> pc-bios/s390-ccw/libc/stdio/stdchnls.c | 23 +
> pc-bios/s390-ccw/libc/stdio/vfprintf.c | 27 +
> pc-bios/s390-ccw/libc/stdio/vsnprintf.c | 298 +++++++++
> pc-bios/s390-ccw/libc/stdio/vsprintf.c | 19 +
> pc-bios/s390-ccw/libc/stdlib/Makefile.inc | 23 +
> pc-bios/s390-ccw/libc/stdlib/atoi.c | 18 +
> pc-bios/s390-ccw/libc/stdlib/atol.c | 18 +
> pc-bios/s390-ccw/libc/stdlib/error.c | 15 +
> pc-bios/s390-ccw/libc/stdlib/free.c | 26 +
> pc-bios/s390-ccw/libc/stdlib/malloc.c | 157 +++++
> pc-bios/s390-ccw/libc/stdlib/malloc_defs.h | 16 +
> pc-bios/s390-ccw/libc/stdlib/memalign.c | 26 +
> pc-bios/s390-ccw/libc/stdlib/rand.c | 29 +
> pc-bios/s390-ccw/libc/stdlib/realloc.c | 40 ++
> pc-bios/s390-ccw/libc/stdlib/strtol.c | 115 ++++
> pc-bios/s390-ccw/libc/stdlib/strtoul.c | 105 ++++
> pc-bios/s390-ccw/libc/string/Makefile.inc | 23 +
> pc-bios/s390-ccw/libc/string/memchr.c | 29 +
> pc-bios/s390-ccw/libc/string/memcmp.c | 30 +
> pc-bios/s390-ccw/libc/string/memcpy.c | 27 +
> pc-bios/s390-ccw/libc/string/memmove.c | 42 ++
> pc-bios/s390-ccw/libc/string/memset.c | 25 +
> pc-bios/s390-ccw/libc/string/strcasecmp.c | 28 +
> pc-bios/s390-ccw/libc/string/strcat.c | 24 +
> pc-bios/s390-ccw/libc/string/strchr.c | 28 +
> pc-bios/s390-ccw/libc/string/strcmp.c | 28 +
> pc-bios/s390-ccw/libc/string/strcpy.c | 25 +
> pc-bios/s390-ccw/libc/string/strlen.c | 27 +
> pc-bios/s390-ccw/libc/string/strncasecmp.c | 32 +
> pc-bios/s390-ccw/libc/string/strncmp.c | 31 +
> pc-bios/s390-ccw/libc/string/strncpy.c | 33 +
> pc-bios/s390-ccw/libc/string/strstr.c | 37 ++
> pc-bios/s390-ccw/libc/string/strtok.c | 45 ++
> pc-bios/s390-ccw/libnet/Makefile | 42 ++
> pc-bios/s390-ccw/libnet/args.c | 179 ++++++
> pc-bios/s390-ccw/libnet/args.h | 23 +
> pc-bios/s390-ccw/libnet/dhcp.c | 955 +++++++++++++++++++++++++++++
> pc-bios/s390-ccw/libnet/dhcp.h | 49 ++
> pc-bios/s390-ccw/libnet/dhcpv6.c | 212 +++++++
> pc-bios/s390-ccw/libnet/dhcpv6.h | 154 +++++
> pc-bios/s390-ccw/libnet/dns.c | 526 ++++++++++++++++
> pc-bios/s390-ccw/libnet/dns.h | 28 +
> pc-bios/s390-ccw/libnet/ethernet.c | 189 ++++++
> pc-bios/s390-ccw/libnet/ethernet.h | 47 ++
> pc-bios/s390-ccw/libnet/icmpv6.c | 409 ++++++++++++
> pc-bios/s390-ccw/libnet/icmpv6.h | 135 ++++
> pc-bios/s390-ccw/libnet/ipv4.c | 898 +++++++++++++++++++++++++++
> pc-bios/s390-ccw/libnet/ipv4.h | 97 +++
> pc-bios/s390-ccw/libnet/ipv6.c | 774 +++++++++++++++++++++++
> pc-bios/s390-ccw/libnet/ipv6.h | 188 ++++++
> pc-bios/s390-ccw/libnet/ndp.c | 184 ++++++
> pc-bios/s390-ccw/libnet/ndp.h | 72 +++
> pc-bios/s390-ccw/libnet/netapps.h | 25 +
> pc-bios/s390-ccw/libnet/netload.c | 600 ++++++++++++++++++
> pc-bios/s390-ccw/libnet/tcp.c | 46 ++
> pc-bios/s390-ccw/libnet/tcp.h | 27 +
> pc-bios/s390-ccw/libnet/tftp.c | 595 ++++++++++++++++++
> pc-bios/s390-ccw/libnet/tftp.h | 50 ++
> pc-bios/s390-ccw/libnet/time.h | 6 +
> pc-bios/s390-ccw/libnet/timer.c | 40 ++
> pc-bios/s390-ccw/libnet/udp.c | 115 ++++
> pc-bios/s390-ccw/libnet/udp.h | 53 ++
> pc-bios/s390-ccw/main.c | 3 +-
> pc-bios/s390-ccw/s390-ccw.h | 30 +-
> pc-bios/s390-ccw/sbrk.c | 39 ++
> pc-bios/s390-ccw/sclp.c | 32 +-
> pc-bios/s390-ccw/virtio-net.c | 125 ++++
> pc-bios/s390-ccw/virtio.c | 16 +-
> pc-bios/s390-ccw/virtio.h | 11 +
> 104 files changed, 9296 insertions(+), 57 deletions(-)
> create mode 100644 pc-bios/s390-ccw/libc/Makefile
> create mode 100644 pc-bios/s390-ccw/libc/README.txt
> create mode 100644 pc-bios/s390-ccw/libc/ctype/Makefile.inc
> create mode 100644 pc-bios/s390-ccw/libc/ctype/isdigit.c
> create mode 100644 pc-bios/s390-ccw/libc/ctype/isprint.c
> create mode 100644 pc-bios/s390-ccw/libc/ctype/isspace.c
> create mode 100644 pc-bios/s390-ccw/libc/ctype/isxdigit.c
> create mode 100644 pc-bios/s390-ccw/libc/ctype/tolower.c
> create mode 100644 pc-bios/s390-ccw/libc/ctype/toupper.c
> create mode 100644 pc-bios/s390-ccw/libc/include/ctype.h
> create mode 100644 pc-bios/s390-ccw/libc/include/errno.h
> create mode 100644 pc-bios/s390-ccw/libc/include/limits.h
> create mode 100644 pc-bios/s390-ccw/libc/include/stdarg.h
> create mode 100644 pc-bios/s390-ccw/libc/include/stdbool.h
> create mode 100644 pc-bios/s390-ccw/libc/include/stddef.h
> create mode 100644 pc-bios/s390-ccw/libc/include/stdint.h
> create mode 100644 pc-bios/s390-ccw/libc/include/stdio.h
> create mode 100644 pc-bios/s390-ccw/libc/include/stdlib.h
> create mode 100644 pc-bios/s390-ccw/libc/include/string.h
> create mode 100644 pc-bios/s390-ccw/libc/include/sys/socket.h
> create mode 100644 pc-bios/s390-ccw/libc/include/unistd.h
> create mode 100644 pc-bios/s390-ccw/libc/stdio/Makefile.inc
> create mode 100644 pc-bios/s390-ccw/libc/stdio/fileno.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/fprintf.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/printf.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/putc.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/putchar.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/puts.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/setvbuf.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/sprintf.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/stdchnls.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/vfprintf.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/vsnprintf.c
> create mode 100644 pc-bios/s390-ccw/libc/stdio/vsprintf.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/Makefile.inc
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/atoi.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/atol.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/error.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/free.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/malloc.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/malloc_defs.h
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/memalign.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/rand.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/realloc.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/strtol.c
> create mode 100644 pc-bios/s390-ccw/libc/stdlib/strtoul.c
> create mode 100644 pc-bios/s390-ccw/libc/string/Makefile.inc
> create mode 100644 pc-bios/s390-ccw/libc/string/memchr.c
> create mode 100644 pc-bios/s390-ccw/libc/string/memcmp.c
> create mode 100644 pc-bios/s390-ccw/libc/string/memcpy.c
> create mode 100644 pc-bios/s390-ccw/libc/string/memmove.c
> create mode 100644 pc-bios/s390-ccw/libc/string/memset.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strcasecmp.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strcat.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strchr.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strcmp.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strcpy.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strlen.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strncasecmp.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strncmp.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strncpy.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strstr.c
> create mode 100644 pc-bios/s390-ccw/libc/string/strtok.c
> create mode 100644 pc-bios/s390-ccw/libnet/Makefile
> create mode 100644 pc-bios/s390-ccw/libnet/args.c
> create mode 100644 pc-bios/s390-ccw/libnet/args.h
> create mode 100644 pc-bios/s390-ccw/libnet/dhcp.c
> create mode 100644 pc-bios/s390-ccw/libnet/dhcp.h
> create mode 100644 pc-bios/s390-ccw/libnet/dhcpv6.c
> create mode 100644 pc-bios/s390-ccw/libnet/dhcpv6.h
> create mode 100644 pc-bios/s390-ccw/libnet/dns.c
> create mode 100644 pc-bios/s390-ccw/libnet/dns.h
> create mode 100644 pc-bios/s390-ccw/libnet/ethernet.c
> create mode 100644 pc-bios/s390-ccw/libnet/ethernet.h
> create mode 100644 pc-bios/s390-ccw/libnet/icmpv6.c
> create mode 100644 pc-bios/s390-ccw/libnet/icmpv6.h
> create mode 100644 pc-bios/s390-ccw/libnet/ipv4.c
> create mode 100644 pc-bios/s390-ccw/libnet/ipv4.h
> create mode 100644 pc-bios/s390-ccw/libnet/ipv6.c
> create mode 100644 pc-bios/s390-ccw/libnet/ipv6.h
> create mode 100644 pc-bios/s390-ccw/libnet/ndp.c
> create mode 100644 pc-bios/s390-ccw/libnet/ndp.h
> create mode 100644 pc-bios/s390-ccw/libnet/netapps.h
> create mode 100644 pc-bios/s390-ccw/libnet/netload.c
> create mode 100644 pc-bios/s390-ccw/libnet/tcp.c
> create mode 100644 pc-bios/s390-ccw/libnet/tcp.h
> create mode 100644 pc-bios/s390-ccw/libnet/tftp.c
> create mode 100644 pc-bios/s390-ccw/libnet/tftp.h
> create mode 100644 pc-bios/s390-ccw/libnet/time.h
> create mode 100644 pc-bios/s390-ccw/libnet/timer.c
> create mode 100644 pc-bios/s390-ccw/libnet/udp.c
> create mode 100644 pc-bios/s390-ccw/libnet/udp.h
> create mode 100644 pc-bios/s390-ccw/sbrk.c
> create mode 100644 pc-bios/s390-ccw/virtio-net.c
>
next prev parent reply other threads:[~2017-06-27 16:53 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 11:48 [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 01/14] pc-bios/s390-ccw: Add the libc from the SLOF firmware Thomas Huth
2017-06-27 15:32 ` David Hildenbrand
2017-06-27 22:14 ` Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 02/14] pc-bios/s390-ccw: Start using the libc from SLOF Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 03/14] pc-bios/s390-ccw: Add a write() function for stdio Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 04/14] pc-bios/s390-ccw: Add implementation of sbrk() Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 05/14] pc-bios/s390-ccw: Add the TFTP network loading stack from SLOF Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 06/14] libnet: Remove remainders of netsave code Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 07/14] libnet: Rework error message printing Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 08/14] libnet: Refactor some code of netload() into a separate function Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 09/14] pc-bios/s390-ccw: Make the basic libnet code compilable Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 10/14] pc-bios/s390-ccw: Add timer code for the libnet Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 11/14] pc-bios/s390-ccw: Add virtio-net driver code Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 12/14] pc-bios/s390-ccw: Load file via an intermediate .INS file Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 13/14] pc-bios/s390-ccw: Allow loading to address 0 Thomas Huth
2017-06-27 11:48 ` [Qemu-devel] [RFC PATCH 14/14] pc-bios/s390-ccw: Wire up the netload code Thomas Huth
2017-06-27 15:41 ` [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS David Hildenbrand
2017-06-27 15:50 ` Viktor Mihajlovski
2017-06-27 21:40 ` Thomas Huth
2017-06-28 7:28 ` Viktor Mihajlovski
2017-06-28 8:02 ` Thomas Huth
2017-06-28 10:56 ` Thomas Huth
2017-06-28 15:02 ` Viktor Mihajlovski
2017-06-29 7:58 ` Thomas Huth
2017-06-29 8:10 ` Viktor Mihajlovski
2017-06-27 16:50 ` Farhan Ali [this message]
2017-06-28 7:34 ` Thomas Huth
2017-06-27 21:15 ` Alexander Graf
2017-06-27 21:56 ` Thomas Huth
2017-06-28 8:06 ` Gerd Hoffmann
2017-06-28 7:43 ` Christian Borntraeger
2017-06-28 8:59 ` Thomas Huth
2017-06-29 8:17 ` Thomas Huth
2017-06-29 8:39 ` Christian Borntraeger
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=cd6a24ee-ddfd-f6f1-a20d-2ec1323ffd3e@linux.vnet.ibm.com \
--to=alifm@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=farman@linux.vnet.ibm.com \
--cc=jfreiman@redhat.com \
--cc=qemu-devel@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).