From: Farhan Ali <alifm@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org,
Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Cc: Collin Walling <walling@linux.ibm.com>,
Cornelia Huck <cohuck@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v1 for-2.13 0/4] pc-bios/s390-ccw: Network boot improvements
Date: Wed, 18 Apr 2018 14:21:18 -0400 [thread overview]
Message-ID: <307f8b80-fca2-d55f-6bc6-85b794afa15e@linux.ibm.com> (raw)
In-Reply-To: <1524054707-20663-1-git-send-email-thuth@redhat.com>
On 04/18/2018 08:31 AM, Thomas Huth wrote:
> Some patches to improve the network boot experience on s390x:
>
> First, make sure that we shut down the virtio-net device before jumping
> into the kernel. Otherwise some incoming packets might destroy some of
> the kernel's data if it has not taken over the device yet.
>
> Then the last two patches add support for loading kernels via
> configuration files - pxelinux-style and .INS-file style. This way
> you don't have to manually glue your ramdisk to your kernel anymore,
> so this should be quite a relieve for all users who want to boot
> Linux via the network.
>
> The config file parsers have been completely written by myself from
> scratch and only tested with some config files that I came up with
> on my own. So if anybody has some pre-existing pxelinux config files
> already for booting a s390x, I'd appreciate some testing to see whether
> this works as expected for you, too!
>
> Thomas Huth (4):
> pc-bios/s390-ccw/net: Split up net_load() into init, load and uninit
> parts
> pc-bios/s390-ccw/net: Stop virtio-net device before jumping into the
> OS
> pc-bios/s390-ccw/net: Add support for pxelinux-style config files
> pc-bios/s390-ccw/net: Add support for .INS config files
>
> pc-bios/s390-ccw/netboot.mak | 5 +-
> pc-bios/s390-ccw/netmain.c | 312 ++++++++++++++++++++++++++++++++++++++----
> pc-bios/s390-ccw/virtio-net.c | 8 ++
> pc-bios/s390-ccw/virtio.c | 19 ++-
> pc-bios/s390-ccw/virtio.h | 3 +
> 5 files changed, 312 insertions(+), 35 deletions(-)
>
I have tried with pxelinux default config file I had and it worked fine.
I will try a couple more tests.
Also while going through the code again, I noticed a memory leak in the
function virtio_net_init, and fixed it. I could send a formal patch for
it, if you want to queue it as part of this series as I think we might
have missed 2.12 window?
diff --git a/pc-bios/s390-ccw/virtio-net.c b/pc-bios/s390-ccw/virtio-net.c
index ff7f4da..e83ba08 100644
--- a/pc-bios/s390-ccw/virtio-net.c
+++ b/pc-bios/s390-ccw/virtio-net.c
@@ -61,6 +61,7 @@ int virtio_net_init(void *mac_addr)
IPL_assert(buf != NULL, "Can not allocate memory for receive
buffers");
vring_send_buf(rxvq, buf, ETH_MTU_SIZE + sizeof(VirtioNetHdr),
VRING_DESC_F_WRITE);
+ free(buf);
}
vring_notify(rxvq);
next prev parent reply other threads:[~2018-04-18 18:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 12:31 [Qemu-devel] [PATCH v1 for-2.13 0/4] pc-bios/s390-ccw: Network boot improvements Thomas Huth
2018-04-18 12:31 ` [Qemu-devel] [PATCH v1 for-2.13 1/4] pc-bios/s390-ccw/net: Split up net_load() into init, load and uninit parts Thomas Huth
2018-04-18 18:11 ` Farhan Ali
2018-04-19 5:20 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-04-18 12:31 ` [Qemu-devel] [PATCH v1 for-2.13 2/4] pc-bios/s390-ccw/net: Stop virtio-net device before jumping into the OS Thomas Huth
2018-04-19 15:49 ` Christian Borntraeger
2018-04-20 6:31 ` Thomas Huth
2018-04-20 7:25 ` Christian Borntraeger
2018-04-18 12:31 ` [Qemu-devel] [PATCH v1 for-2.13 3/4] pc-bios/s390-ccw/net: Add support for pxelinux-style config files Thomas Huth
2018-04-19 7:41 ` Viktor VM Mihajlovski
2018-04-19 8:17 ` Thomas Huth
2018-04-19 12:40 ` Viktor VM Mihajlovski
2018-04-19 16:55 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-04-20 6:53 ` Viktor VM Mihajlovski
2018-04-20 7:36 ` Thomas Huth
2018-04-20 7:54 ` Viktor VM Mihajlovski
2018-04-20 8:40 ` Thomas Huth
2018-04-20 12:11 ` Viktor VM Mihajlovski
2018-04-18 12:31 ` [Qemu-devel] [PATCH v1 for-2.13 4/4] pc-bios/s390-ccw/net: Add support for .INS " Thomas Huth
2018-04-19 8:02 ` Viktor VM Mihajlovski
2018-04-19 8:20 ` Thomas Huth
2018-04-18 18:21 ` Farhan Ali [this message]
2018-04-19 5:27 ` [Qemu-devel] [qemu-s390x] [PATCH v1 for-2.13 0/4] pc-bios/s390-ccw: Network boot improvements Thomas Huth
2018-04-19 12:03 ` Farhan Ali
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=307f8b80-fca2-d55f-6bc6-85b794afa15e@linux.ibm.com \
--to=alifm@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=mihajlov@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
--cc=walling@linux.ibm.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).