[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 15/16] s390-bios: Support booting from real d
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v3 15/16] s390-bios: Support booting from real dasd device |
Date: |
Tue, 5 Mar 2019 14:03:56 +0100 |
On Fri, 1 Mar 2019 13:59:35 -0500
"Jason J. Herne" <address@hidden> wrote:
> Allows guest to boot from a vfio configured real dasd device.
>
> Signed-off-by: Jason J. Herne <address@hidden>
> ---
> MAINTAINERS | 1 +
> docs/devel/s390-dasd-ipl.txt | 133 +++++++++++++++++++++++
> pc-bios/s390-ccw/Makefile | 2 +-
> pc-bios/s390-ccw/dasd-ipl.c | 249
> +++++++++++++++++++++++++++++++++++++++++++
> pc-bios/s390-ccw/dasd-ipl.h | 16 +++
> pc-bios/s390-ccw/main.c | 4 +
> pc-bios/s390-ccw/s390-arch.h | 13 +++
> 7 files changed, 417 insertions(+), 1 deletion(-)
> create mode 100644 docs/devel/s390-dasd-ipl.txt
> create mode 100644 pc-bios/s390-ccw/dasd-ipl.c
> create mode 100644 pc-bios/s390-ccw/dasd-ipl.h
>
> diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c
> new file mode 100644
> index 0000000..5a863f0
> --- /dev/null
> +++ b/pc-bios/s390-ccw/dasd-ipl.c
> @@ -0,0 +1,249 @@
> +/*
> + * S390 IPL (boot) from a real DASD device via vfio framework.
> + *
> + * Copyright (c) 2018 Jason J. Herne <address@hidden>
2019?
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or (at
> + * your option) any later version. See the COPYING file in the top-level
> + * directory.
> + */
(...)
> +/*
> + * Limitations in QEMU's CCW support complicate the IPL process. Details can
s/QEMU's CCW support/vfio-ccw/ ?
> + * be found in docs/devel/s390-dasd-ipl.txt
> + */
> +void dasd_ipl(SubChannelId schid)
> +{
> + uint32_t ipl2_addr;
> +
> + /* Construct Read IPL CCW and run it to read IPL1 from boot disk */
> + make_readipl();
> + run_readipl(schid);
> + ipl2_addr = read_ipl2_addr();
> + check_ipl1();
> +
> + /*
> + * Fixup IPL1 channel program to account for QEMU limitations, then run
> it
> + * to read IPL2 channel program from boot disk.
> + */
> + ipl1_fixup();
> + run_ipl1(schid);
> + check_ipl2(ipl2_addr);
> +
> + /*
> + * Run IPL2 channel program to read operating system code from boot disk
> + * then transfer control to the guest operating system
> + */
> + run_ipl2(schid, ipl2_addr);
> + lpsw(0);
> +}
> diff --git a/pc-bios/s390-ccw/dasd-ipl.h b/pc-bios/s390-ccw/dasd-ipl.h
> new file mode 100644
> index 0000000..56bba82
> --- /dev/null
> +++ b/pc-bios/s390-ccw/dasd-ipl.h
> @@ -0,0 +1,16 @@
> +/*
> + * S390 IPL (boot) from a real DASD device via vfio framework.
> + *
> + * Copyright (c) 2018 Jason J. Herne <address@hidden>
2019?
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or (at
> + * your option) any later version. See the COPYING file in the top-level
> + * directory.
> + */
> +
> +#ifndef DASD_IPL_H
> +#define DASD_IPL_H
> +
> +void dasd_ipl(SubChannelId schid);
> +
> +#endif /* DASD_IPL_H */
Otherwise, looks good to me.
Reviewed-by: Cornelia Huck <address@hidden>
- Re: [Qemu-devel] [qemu-s390x] [PATCH v3 05/16] s390-bios: Factor finding boot device out of virtio code path, (continued)
[Qemu-devel] [PATCH v3 16/16] s390-bios: dasd-ipl: Use control unit type to customize error data, Jason J. Herne, 2019/03/01
Re: [Qemu-devel] [PATCH v3 16/16] s390-bios: dasd-ipl: Use control unit type to customize error data, Cornelia Huck, 2019/03/04
[Qemu-devel] [PATCH v3 04/16] s390-bios: Extend find_dev() for non-virtio devices, Jason J. Herne, 2019/03/01
[Qemu-devel] [PATCH v3 15/16] s390-bios: Support booting from real dasd device, Jason J. Herne, 2019/03/01
[Qemu-devel] [PATCH v3 06/16] s390-bios: Clean up cio.h, Jason J. Herne, 2019/03/01