s390: vfio-ccw dasd ipl support
v4 cover s390: vfio-ccw dasd ipl support
This is to support booting from vfio-ccw dasd devices. We basically implement the real hardware ipl procedure. This allows for booting Linux guests on vfio-ccw devices.
vfio-ccw's channel program prefetch algorithm complicates ipl because most ipl channel programs dynamically modify themselves. Details on the ipl process and how we worked around this issue can be found in docs/devel/s390-dasd-ipl.txt.
*********************
NOTE: Newer DASD units which initially present as control unit type 3990 may in fact really be 2107. Some operating systems may enable 2107 features for these devices thereby making sense id return a control unit type of 2107. I've added support for control unit type 2107 so we can ipl from these devices.
*********************
Changelog
==========
v4
01/16: s390 vfio-ccw: Add bootindex property and IPLB data
- Adding CCW_DEVTYPE_VIRTIO_NET type.
- s390_get_ccw_device can now accept a NULL devtype argument
- Other minor refactors
06/16: s390-bios: Clean up cio.h
- Remove whitespace changes to cmd_orb struct
07/16: s390-bios: Decouple channel i/o logic from virtio
- Fix copyright line
08/16: s390-bios: Map low core memory
- Remove Lowcore entries >= 0x200
- Repositioned const keywords
09/16: s390-bios: ptr2u32 and u32toptr
- Add assert to ensure pointer being converted to u32 is below 32 bits in length
- Add missing copyright comment
10/16: s390-bios: Support for running format-0/1 channel programs
- basic_sense now calls __do_cio instead of do_cio. Further protection from infinite recursion.
- __do_cio now asks for retry for subchannel busy case.
- Minor fixups to comments and message wording
- start.S: Formating and register naming cleanups
- Added CU_TYPE_DASD_2107
11/16: s390-bios: cio error handling
- Only print sense data when it is provided
15/16:
- Added support for CU_TYPE_DASD_2107
16/16:
- Merged with various earlier patches
Jason J. Herne (15):
s390 vfio-ccw: Add bootindex property and IPLB data
s390-bios: decouple cio setup from virtio
s390-bios: decouple common boot logic from virtio
s390-bios: Extend find_dev() for non-virtio devices
s390-bios: Factor finding boot device out of virtio code path
s390-bios: Clean up cio.h
s390-bios: Decouple channel i/o logic from virtio
s390-bios: Map low core memory
s390-bios: ptr2u32 and u32toptr
s390-bios: Support for running format-0/1 channel programs
s390-bios: cio error handling
s390-bios: Refactor virtio to run channel programs via cio
s390-bios: Use control unit type to determine boot method
s390-bios: Add channel command codes/structs needed for dasd-ipl
s390-bios: Support booting from real dasd device
MAINTAINERS | 2 + docs/devel/s390-dasd-ipl.txt | 133 ++++++++++++++ hw/s390x/ipl.c | 61 +++++-- hw/s390x/s390-ccw.c | 9 + hw/vfio/ccw.c | 2 +- include/hw/s390x/s390-ccw.h | 1 + include/hw/s390x/vfio-ccw.h | 28 +++ pc-bios/s390-ccw/Makefile | 2 +- pc-bios/s390-ccw/cio.c | 423 +++++++++++++++++++++++++++++++++++++++++++ pc-bios/s390-ccw/cio.h | 270 +++++++++++++++++++++------ pc-bios/s390-ccw/dasd-ipl.c | 250 +++++++++++++++++++++++++ pc-bios/s390-ccw/dasd-ipl.h | 16 ++ pc-bios/s390-ccw/helper.h | 31 ++++ pc-bios/s390-ccw/libc.h | 11 ++ pc-bios/s390-ccw/main.c | 161 ++++++++++------ pc-bios/s390-ccw/netboot.mak | 2 +- pc-bios/s390-ccw/netmain.c | 2 + pc-bios/s390-ccw/s390-arch.h | 103 +++++++++++ pc-bios/s390-ccw/s390-ccw.h | 10 +- pc-bios/s390-ccw/start.S | 29 +++ pc-bios/s390-ccw/virtio.c | 73 ++------ tests/boot-serial-test.c | 2 +- 22 files changed, 1425 insertions(+), 196 deletions(-) create mode 100644 docs/devel/s390-dasd-ipl.txt create mode 100644 include/hw/s390x/vfio-ccw.h create mode 100644 pc-bios/s390-ccw/cio.c create mode 100644 pc-bios/s390-ccw/dasd-ipl.c create mode 100644 pc-bios/s390-ccw/dasd-ipl.h create mode 100644 pc-bios/s390-ccw/helper.h create mode 100644 pc-bios/s390-ccw/s390-arch.h
--
2.7.4
PATCH v4 1/15 s390 vfio-ccw: Add bootindex property and IPLB data
Add bootindex property and iplb data for vfio-ccw devices. This allows us to forward boot information into the bios for vfio-ccw devices.
Refactor s390_get_ccw_device() to return device type. This prevents us from having to use messy casting logic in several places.
--- MAINTAINERS | 1 + hw/s390x/ipl.c | 61 ++++++++++++++++++++++++++++++++++----------- hw/s390x/s390-ccw.c | 9 +++++++ hw/vfio/ccw.c | 2 +- include/hw/s390x/s390-ccw.h | 1 + include/hw/s390x/vfio-ccw.h | 28 +++++++++++++++++++++ 6 files changed, 86 insertions(+), 16 deletions(-) create mode 100644 include/hw/s390x/vfio-ccw.h
MAINTAINERS +1 -0
@@ -1430,6 +1430,7 @@ S: Supported F: hw/vfio/ccw.c F: hw/s390x/s390-ccw.c F: include/hw/s390x/s390-ccw.h +F: include/hw/s390x/vfio-ccw.h T: git https://github.com/cohuck/qemu.git s390-next L: [email protected]
hw/s390x/ipl.c +46 -15
124 lines not on this page · raw message
hw/s390x/s390-ccw.c +9 -0
@@ -124,6 +124,14 @@ static void s390_ccw_unrealize(S390CCWDevice *cdev, Error **errp)g_free (cdev->mdevid); } +static void s390_ccw_instance_init (Object *obj) +{ +S390CCWDevice *dev =S390_CCW_DEVICE (obj); + +device_add_bootindex_property (obj, &dev->bootindex,"bootindex" , +"/disk@0,0" ,DEVICE (obj),NULL ); +} +static void s390_ccw_class_init (ObjectClass *klass,void *data) {DeviceClass *dc =DEVICE_CLASS (klass);
@@ -137,6 +145,7 @@ static void s390_ccw_class_init(ObjectClass *klass, void *data)static const TypeInfo s390_ccw_info = { .name =TYPE_S390_CCW , .parent =TYPE_CCW_DEVICE , + .instance_init = s390_ccw_instance_init, .instance_size =sizeof (S390CCWDevice), .class_size =sizeof (S390CCWDeviceClass), .class_init = s390_ccw_class_init,
hw/vfio/ccw.c +1 -1
@@ -21,11 +21,11 @@#include "hw/vfio/vfio.h" #include "hw/vfio/vfio-common.h" #include "hw/s390x/s390-ccw.h" +#include "hw/s390x/vfio-ccw.h" #include "hw/s390x/ccw-device.h" #include "exec/address-spaces.h" #include "qemu/error-report.h" -#define TYPE_VFIO_CCW "vfio-ccw" typedef struct VFIOCCWDevice { S390CCWDevice cdev; VFIODevice vdev;
include/hw/s390x/s390-ccw.h +1 -0
@@ -27,6 +27,7 @@ typedef struct S390CCWDevice {CcwDevice parent_obj;CssDevId hostid;char *mdevid; +int32_t bootindex; } S390CCWDevice; typedef struct S390CCWDeviceClass {
include/hw/s390x/vfio-ccw.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* vfio based subchannel assignment support +* +* Copyright 2017 IBM Corp. +* Author(s): Dong Jia Shi <[email protected]> +* Xiao Feng Ren <[email protected]> +* Pierre Morel <[email protected]> +* +* 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 HW_VFIO_CCW_H +#define HW_VFIO_CCW_H + +#include "hw/vfio/vfio-common.h" +#include "hw/s390x/s390-ccw.h" +#include "hw/s390x/ccw-device.h" + +#define TYPE_VFIO_CCW "vfio-ccw" +#define VFIO_CCW (obj) \ + OBJECT_CHECK(VFIOCCWDevice, (obj), TYPE_VFIO_CCW) + +#define TYPE_VFIO_CCW "vfio-ccw" +typedef struct VFIOCCWDevice VFIOCCWDevice ; + +#endif
Signature · 1 line
2.7.4
PATCH v4 2/15 s390-bios: decouple cio setup from virtio
In reply to Jason J. HerneMove channel i/o setup code out to a separate function. This decouples cio setup from the virtio code path and allows us to make use of it for booting dasd devices.
--- pc-bios/s390-ccw/main.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
pc-bios/s390-ccw/main.c +13 -7
@@ -99,6 +99,18 @@ static void menu_setup(void) } } +/* +* Initialize the channel I/O subsystem so we can talk to our ipl/boot device. +*/ +static void css_setup (void ) +{ +/* +* Unconditionally enable mss support. In every sane configuration this +* will succeed; and even if it doesn't, stsch_err() can handle it. +*/ +enable_mss_facility (); +} +static void virtio_setup (void ) {Schib schib;
@@ -109,13 +121,6 @@ static void virtio_setup(void)VDev *vdev =virtio_get_device ();QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS ; -/* -* We unconditionally enable mss support. In every sane configuration, -* this will succeed; and even if it doesn't, stsch_err() can deal -* with the consequences. -*/ -enable_mss_facility (); -sclp_get_loadparm_ascii (loadparm_str);memcpy (ldp +10 , loadparm_str,LOADPARM_LEN );sclp_print (ldp);
@@ -168,6 +173,7 @@ static void virtio_setup(void)int main (void ) {sclp_setup (); +css_setup ();virtio_setup ();zipl_load ();/* no return */
Signature · 1 line
2.7.4
Re: [Qemu-devel] [PATCH v4 02/15] s390-bios: decouple cio setup from virtio
Quoted 4 lines · On Mon, 11 Mar 2019 11:21:20 -0400 "Jason J. Herne" <[email protected]>…
Move channel i/o setup code out to a separate function. This decouples cio setup from the virtio code path and allows us to make use of it for booting dasd devices.
Quoted 8 lines
Signed-off-by Jason J. Herne <[email protected]>Acked-by Halil Pasic <[email protected]>Reviewed-by Collin Walling <[email protected]>Reviewed-by Farhan Ali <[email protected]>Reviewed-by Thomas Huth <[email protected]>--- pc-bios/s390-ccw/main.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
[I could have sworn I already did that...]
PATCH v4 3/15 s390-bios: decouple common boot logic from virtio
In reply to Jason J. HerneCreate a boot_setup function to handle getting boot information from the machine/hypervisor. This decouples common boot logic from the virtio code path and allows us to make use of it for the real dasd boot scenario.
--- pc-bios/s390-ccw/main.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-)
pc-bios/s390-ccw/main.c +20 -8
@@ -14,16 +14,17 @@ 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[LOADPARM_LEN +1 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };QemuIplParameters qipl; +IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE))); +static bool have_iplb;#define LOADPARM_PROMPT "PROMPT "#define LOADPARM_EMPTY " "#define BOOT_MENU_FLAG_MASK (QIPL_FLAG_BM_OPTS_CMD | QIPL_FLAG_BM_OPTS_ZIPL)/* -* Priniciples of Operations (SA22-7832-09) chapter 17 requires that +* Principles of Operations (SA22-7832-09) chapter 17 requires that * a subsystem-identification is at 184-187 and bytes 188-191 are zero * after list-directed-IPL and ccw-IPL. */
@@ -111,23 +112,33 @@ static void css_setup(void)enable_mss_facility (); } +/* +* Collect various pieces of information from the hypervisor/hardware that +* we'll use to determine exactly how we'll boot. +*/ +static void boot_setup (void ) +{ +char lpmsg[] ="LOADPARM=[________]\n" ; + +sclp_get_loadparm_ascii (loadparm_str); +memcpy (lpmsg +10 , loadparm_str,8 ); +sclp_print (lpmsg); + + have_iplb =store_iplb (&iplb); +} +static void virtio_setup (void ) {Schib schib;int ssid;bool found = false;uint16_t dev_no; -char ldp[] ="LOADPARM=[________]\n" ;VDev *vdev =virtio_get_device ();QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS ; -sclp_get_loadparm_ascii (loadparm_str); -memcpy (ldp +10 , loadparm_str,LOADPARM_LEN ); -sclp_print (ldp); -memcpy (&qipl, early_qipl,sizeof (QemuIplParameters)); -if (store_iplb (&iplb)) { +if (have_iplb) {switch (iplb.pbt) {case S390_IPL_TYPE_CCW : dev_no = iplb.ccw.devno;
@@ -174,6 +185,7 @@ int main(void) {sclp_setup ();css_setup (); +boot_setup ();virtio_setup ();zipl_load ();/* no return */
Signature · 1 line
2.7.4
PATCH v4 4/15 s390-bios: Extend find_dev() for non-virtio devices
In reply to Jason J. HerneWe need a method for finding the subchannel of a dasd device. Let's modify find_dev to handle this since it mostly does what we need. Up to this point find_dev has been specific to only virtio devices.
--- pc-bios/s390-ccw/main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
pc-bios/s390-ccw/main.c +11 -5
@@ -49,6 +49,12 @@ unsigned int get_loadparm_index(void)return atoui (loadparm_str); } +/* +* Find the subchannel connected to the given device (dev_no) and fill in the +* subchannel information block (schib) with the connected subchannel's info. +* NOTE: The global variable blk_schid is updated to contain the subchannel +* information. +*/ static bool find_dev (Schib *schib,int dev_no) {int i, r;
@@ -62,15 +68,15 @@ static bool find_dev(Schib *schib, int dev_no)if (!schib->pmcw.dnv) {continue ; } -if (!virtio_is_supported (blk_schid)) { -continue ; - } +/* Skip net devices since no IPLB is created and therefore no -* no network bootloader has been loaded +* network bootloader has been loaded */ -if (virtio_get_device_type () ==VIRTIO_ID_NET && dev_no <0 ) { +if (virtio_is_supported (blk_schid) && +virtio_get_device_type () ==VIRTIO_ID_NET && dev_no <0 ) {continue ; } +if ((dev_no <0 ) || (schib->pmcw.dev == dev_no)) {return true; }
Signature · 1 line
2.7.4
PATCH v4 5/15 s390-bios: Factor finding boot device out of virtio code path
In reply to Jason J. HerneMake a new routine find_boot_device to locate the boot device for all cases, not just virtio.
The error message for the case where no boot device has been specified and a suitable boot device cannot be auto detected was specific to virtio devices. We update this message to remove virtio specific wording.
--- pc-bios/s390-ccw/main.c | 85 ++++++++++++++++++++++++++---------------------- tests/boot-serial-test.c | 2 +- 2 files changed, 47 insertions(+), 40 deletions(-)
pc-bios/s390-ccw/main.c +46 -39
@@ -55,17 +55,18 @@ unsigned int get_loadparm_index(void)* NOTE: The global variable blk_schid is updated to contain the subchannel * information. */ -static bool find_dev (Schib *schib,int dev_no) +static bool find_subch (int dev_no) { +Schib schib;int i, r;for (i =0 ; i <0x10000 ; i++) { blk_schid.sch_no = i; - r =stsch_err (blk_schid, schib); + r =stsch_err (blk_schid, &schib);if ((r ==3 ) || (r == -EIO )) {break ; } -if (!schib->pmcw.dnv) { +if (!schib.pmcw.dnv) {continue ; }
@@ -77,7 +78,7 @@ static bool find_dev(Schib *schib, int dev_no)continue ; } -if ((dev_no <0 ) || (schib->pmcw.dev == dev_no)) { +if ((dev_no <0 ) || (schib.pmcw.dev == dev_no)) {return true; } }
@@ -133,56 +134,61 @@ static void boot_setup(void) have_iplb =store_iplb (&iplb); } -static void virtio_setup (void ) +static void find_boot_device (void ) { -Schib schib; -int ssid; -bool found = false; -uint16_t dev_no;VDev *vdev =virtio_get_device (); -QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS ; - -memcpy (&qipl, early_qipl,sizeof (QemuIplParameters)); +int ssid; +bool found; -if (have_iplb) { -switch (iplb.pbt) { -case S390_IPL_TYPE_CCW : - dev_no = iplb.ccw.devno; -debug_print_int ("device no. " , dev_no); - blk_schid.ssid = iplb.ccw.ssid &0x3 ; -debug_print_int ("ssid " , blk_schid.ssid); - found =find_dev (&schib, dev_no); -break ; -case S390_IPL_TYPE_QEMU_SCSI : - vdev->scsi_device_selected = true; - vdev->selected_scsi_device.channel = iplb.scsi.channel; - vdev->selected_scsi_device.target = iplb.scsi.target; - vdev->selected_scsi_device.lun = iplb.scsi.lun; - blk_schid.ssid = iplb.scsi.ssid &0x3 ; - found =find_dev (&schib, iplb.scsi.devno); -break ; -default : -panic ("List-directed IPL not supported yet!\n" ); - } -menu_setup (); - }else { +if (!have_iplb) {for (ssid =0 ; ssid <0x3 ; ssid++) { blk_schid.ssid = ssid; - found =find_dev (&schib,-1 ); + found =find_subch (-1 );if (found) { -break ; +return ; } } +panic ("Could not find a suitable boot device (none specified)\n" ); + } + +switch (iplb.pbt) { +case S390_IPL_TYPE_CCW : +debug_print_int ("device no. " , iplb.ccw.devno); + blk_schid.ssid = iplb.ccw.ssid &0x3 ; +debug_print_int ("ssid " , blk_schid.ssid); + found =find_subch (iplb.ccw.devno); +break ; +case S390_IPL_TYPE_QEMU_SCSI : + vdev->scsi_device_selected = true; + vdev->selected_scsi_device.channel = iplb.scsi.channel; + vdev->selected_scsi_device.target = iplb.scsi.target; + vdev->selected_scsi_device.lun = iplb.scsi.lun; + blk_schid.ssid = iplb.scsi.ssid &0x3 ; + found =find_subch (iplb.scsi.devno); +break ; +default : +panic ("List-directed IPL not supported yet!\n" ); } -IPL_assert (found,"No virtio device found" ); +IPL_assert (found,"Boot device not found\n" ); +} + +static void virtio_setup (void ) +{ +VDev *vdev =virtio_get_device (); +QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS ; + +memcpy (&qipl, early_qipl,sizeof (QemuIplParameters)); + +if (have_iplb) { +menu_setup (); + }if (virtio_get_device_type () ==VIRTIO_ID_NET ) {sclp_print ("Network boot device detected\n" ); vdev->netboot_start_addr = qipl.netboot_start_addr; }else {virtio_blk_setup_device (blk_schid); -IPL_assert (virtio_ipl_disk_is_valid (),"No valid IPL device detected" ); } }
@@ -192,8 +198,9 @@ int main(void)sclp_setup ();css_setup ();boot_setup (); -virtio_setup (); +find_boot_device (); +virtio_setup ();zipl_load ();/* no return */ panic ("Failed to load OS from hard disk\n" );
tests/boot-serial-test.c +1 -1
@@ -112,7 +112,7 @@ static testdef_t tests[] = { { "sparc", "SS-4", "", "MB86904" }, { "sparc", "SS-600MP", "", "TMS390Z55" }, { "sparc64", "sun4u", "", "UltraSPARC" }, - { "s390x", "s390-ccw-virtio", "", "virtio device" }, + { "s390x", "s390-ccw-virtio", "", "device" }, { "m68k", "mcf5208evb", "", "TT", sizeof(kernel_mcf5208), kernel_mcf5208 }, { "microblaze", "petalogix-s3adsp1800", "", "TT", sizeof(kernel_pls3adsp1800), kernel_pls3adsp1800 },
Signature · 1 line
2.7.4
PATCH v4 6/15 s390-bios: Clean up cio.h
In reply to Jason J. HerneAdd proper typedefs to all structs and modify all bit fields to use consistent formatting.
--- pc-bios/s390-ccw/cio.h | 114 ++++++++++++++++++++++---------------------- pc-bios/s390-ccw/s390-ccw.h | 8 ---- 2 files changed, 57 insertions(+), 65 deletions(-)
pc-bios/s390-ccw/cio.h +57 -57
@@ -17,35 +17,35 @@* path management control word */ struct pmcw { -__u32 intparm;/* interruption parameter */ -__u32 qf :1 ;/* qdio facility */ -__u32 w :1 ; -__u32 isc :3 ;/* interruption sublass */ -__u32 res5 :3 ;/* reserved zeros */ -__u32 ena :1 ;/* enabled */ -__u32 lm :2 ;/* limit mode */ -__u32 mme :2 ;/* measurement-mode enable */ -__u32 mp :1 ;/* multipath mode */ -__u32 tf :1 ;/* timing facility */ -__u32 dnv :1 ;/* device number valid */ -__u32 dev :16 ;/* device number */ -__u8 lpm;/* logical path mask */ -__u8 pnom;/* path not operational mask */ -__u8 lpum;/* last path used mask */ -__u8 pim;/* path installed mask */ -__u16 mbi;/* measurement-block index */ -__u8 pom;/* path operational mask */ -__u8 pam;/* path available mask */ -__u8 chpid[8 ];/* CHPID 0-7 (if available) */ -__u32 unused1 :8 ;/* reserved zeros */ -__u32 st :3 ;/* subchannel type */ -__u32 unused2 :18 ;/* reserved zeros */ -__u32 mbfc :1 ;/* measurement block format control */ -__u32 xmwme :1 ;/* extended measurement word mode enable */ -__u32 csense :1 ;/* concurrent sense; can be enabled ...*/ -/* ... per MSCH, however, if facility */ -/* ... is not installed, this results */ -/* ... in an operand exception. */ +__u32 intparm;/* interruption parameter */ +__u32 qf:1 ;/* qdio facility */ +__u32 w:1 ; +__u32 isc:3 ;/* interruption sublass */ +__u32 res5:3 ;/* reserved zeros */ +__u32 ena:1 ;/* enabled */ +__u32 lm:2 ;/* limit mode */ +__u32 mme:2 ;/* measurement-mode enable */ +__u32 mp:1 ;/* multipath mode */ +__u32 tf:1 ;/* timing facility */ +__u32 dnv:1 ;/* device number valid */ +__u32 dev:16 ;/* device number */ +__u8 lpm;/* logical path mask */ +__u8 pnom;/* path not operational mask */ +__u8 lpum;/* last path used mask */ +__u8 pim;/* path installed mask */ +__u16 mbi;/* measurement-block index */ +__u8 pom;/* path operational mask */ +__u8 pam;/* path available mask */ +__u8 chpid[8 ];/* CHPID 0-7 (if available) */ +__u32 unused1:8 ;/* reserved zeros */ +__u32 st:3 ;/* subchannel type */ +__u32 unused2:18 ;/* reserved zeros */ +__u32 mbfc:1 ;/* measurement block format control */ +__u32 xmwme:1 ;/* extended measurement word mode enable */ +__u32 csense:1 ;/* concurrent sense; can be enabled ...*/ +/* ... per MSCH, however, if facility */ +/* ... is not installed, this results */ +/* ... in an operand exception. */ } __attribute__ ((packed));/* Target SCHIB configuration. */
@@ -77,28 +77,28 @@ struct scsw {/* * subchannel information block */ -struct schib { +typedef struct schib {struct pmcw pmcw;/* path management control word */ struct scsw scsw;/* subchannel status word */ __u64 mba;/* measurement block address */ __u8 mda[4 ];/* model dependent area */ -} __attribute__ ((packed,aligned (4 ))); - -struct subchannel_id { -__u32 cssid :8 ; - __u32 : 4; -__u32 m :1 ; -__u32 ssid :2 ; -__u32 one :1 ; -__u32 sch_no :16 ; -} __attribute__ ((packed,aligned (4 ))); +} __attribute__ ((packed,aligned (4 )))Schib ; + +typedef struct subchannel_id { +__u32 cssid:8 ; + __u32:4; +__u32 m:1 ; +__u32 ssid:2 ; +__u32 one:1 ; +__u32 sch_no:16 ; +} __attribute__ ((packed,aligned (4 )))SubChannelId ;struct chsc_header {__u16 length;__u16 code; } __attribute__((packed)); -struct chsc_area_sda { +typedef struct chsc_area_sda { struct chsc_header request; __u8 reserved1:4; __u8 format:4;
@@ -111,29 +111,29 @@ struct chsc_area_sda { __u32 reserved5:4; __u32 format2:4; __u32 reserved6:24; -} __attribute__((packed)); +} __attribute__((packed)) ChscAreaSda;/* * TPI info structure */ struct tpi_info {struct subchannel_id schid; -__u32 intparm;/* interruption parameter */ -__u32 adapter_IO :1 ; -__u32 reserved2 :1 ; -__u32 isc :3 ; -__u32 reserved3 :12 ; -__u32 int_type :3 ; -__u32 reserved4 :12 ; +__u32 intparm;/* interruption parameter */ +__u32 adapter_IO:1 ; +__u32 reserved2:1 ; +__u32 isc:3 ; +__u32 reserved3:12 ; +__u32 int_type:3 ; +__u32 reserved4:12 ; } __attribute__ ((packed,aligned (4 )));/* channel command word (type 1) */ -struct ccw1 { +typedef struct ccw1 {__u8 cmd_code;__u8 flags;__u16 count;__u32 cda; -} __attribute__ ((packed,aligned (8 ))); +} __attribute__ ((packed,aligned (8 )))Ccw1 ;#define CCW_FLAG_DC 0x80#define CCW_FLAG_CC 0x40
@@ -162,7 +162,7 @@ struct ccw1 {/* * Command-mode operation request block */ -struct cmd_orb { +typedef struct cmd_orb { __u32 intparm; /* interruption parameter */ __u32 key:4; /* flags, like key, suspend control, etc. */ __u32 spnd:1; /* suspend control */
@@ -182,7 +182,7 @@ struct cmd_orb { __u32 zero:6; /* reserved zeros */ __u32 orbx:1; /* ORB extension control */__u32 cpa;/* channel program address */ -} __attribute__ ((packed, aligned(4))); +} __attribute__ ((packed, aligned(4))) CmdOrb;struct ciw {__u8 type;
@@ -193,7 +193,7 @@ struct ciw {/* * sense-id response buffer layout */ -struct senseid { +typedef struct senseid { /* common part */ __u8 reserved; /* always 0x'FF' */ __u16 cu_type; /* control unit type */
@@ -203,15 +203,15 @@ struct senseid {__u8 unused;/* padding byte */ /* extended part */ struct ciw ciw[62 ]; -} __attribute__ ((packed, aligned(4))); +} __attribute__ ((packed, aligned(4))) SenseId;/* interruption response block */ -struct irb { +typedef struct irb {struct scsw scsw;__u32 esw[5 ];__u32 ecw[8 ];__u32 emw[8 ]; -} __attribute__ ((packed,aligned (4 ))); +} __attribute__ ((packed,aligned (4 )))Irb ;/* * Some S390 specific IO instructions as inline
pc-bios/s390-ccw/s390-ccw.h +0 -8
@@ -49,14 +49,6 @@ typedef unsigned long long __u64;#include "cio.h" #include "iplb.h" -typedef struct irb Irb ; -typedef struct ccw1 Ccw1 ; -typedef struct cmd_orb CmdOrb ; -typedef struct schib Schib ; -typedef struct chsc_area_sda ChscAreaSda ; -typedef struct senseid SenseId ; -typedef struct subchannel_id SubChannelId ; -/* start.s */ void disabled_wait (void );void consume_sclp_int (void );
Signature · 1 line
2.7.4
PATCH v4 7/15 s390-bios: Decouple channel i/o logic from virtio
In reply to Jason J. HerneCreate a separate library for channel i/o related code. This decouples channel i/o operations from virtio and allows us to make use of them for the real dasd boot path.
--- pc-bios/s390-ccw/Makefile | 2 +- pc-bios/s390-ccw/cio.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ pc-bios/s390-ccw/cio.h | 3 +++ pc-bios/s390-ccw/main.c | 1 + pc-bios/s390-ccw/netboot.mak | 2 +- pc-bios/s390-ccw/netmain.c | 1 + pc-bios/s390-ccw/s390-ccw.h | 1 - pc-bios/s390-ccw/virtio.c | 27 ++------------------------- 8 files changed, 53 insertions(+), 28 deletions(-) create mode 100644 pc-bios/s390-ccw/cio.c
pc-bios/s390-ccw/Makefile +1 -1
@@ -10,7 +10,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw) .PHONY : all clean build-all OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \ - virtio.o virtio-scsi.o virtio-blkdev.o libc.o + virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
pc-bios/s390-ccw/cio.c new file +44 -0
44 lines not on this page · raw message
pc-bios/s390-ccw/cio.h +3 -0
@@ -213,6 +213,9 @@ typedef struct irb {__u32 emw[8 ]; } __attribute__ ((packed, aligned(4))) Irb; +int enable_mss_facility (void ); +void enable_subchannel (SubChannelId schid); +/* * Some S390 specific IO instructions as inline */
pc-bios/s390-ccw/main.c +1 -0
@@ -10,6 +10,7 @@#include "libc.h" #include "s390-ccw.h" +#include "cio.h" #include "virtio.h" char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
pc-bios/s390-ccw/netboot.mak +1 -1
@@ -1,7 +1,7 @@ SLOF_DIR := $(SRC_PATH)/roms/SLOF -NETOBJS := start.o sclp.o virtio.o virtio-net.o jump2ipl.o netmain.o \ +NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o \ libnet.a libc.a LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include
pc-bios/s390-ccw/netmain.c +1 -0
@@ -33,6 +33,7 @@#include <pxelinux.h> #include "s390-ccw.h" +#include "cio.h" #include "virtio.h" #define DEFAULT_BOOT_RETRIES 10
pc-bios/s390-ccw/s390-ccw.h +0 -1
@@ -72,7 +72,6 @@ unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,bool virtio_is_supported (SubChannelId schid);void virtio_blk_setup_device (SubChannelId schid);int virtio_read (ulong sector,void *load_addr); -int enable_mss_facility (void );u64 get_clock (void );ulong get_second (void );
pc-bios/s390-ccw/virtio.c +2 -25
@@ -10,6 +10,7 @@#include "libc.h" #include "s390-ccw.h" +#include "cio.h" #include "virtio.h" #include "virtio-scsi.h" #include "bswap.h"
@@ -20,8 +21,6 @@ static VRing block[VIRTIO_MAX_VQS]; static char ring_area[VIRTIO_RING_SIZE * VIRTIO_MAX_VQS] __attribute__((__aligned__(PAGE_SIZE))); -static char chsc_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); -static VDev vdev = { .nr_vqs =1 , .vrings = block,
@@ -94,14 +93,9 @@ static int run_ccw(VDev *vdev, int cmd, void *ptr, int len) {Ccw1 ccw = {};CmdOrb orb = {}; -Schib schib;int r; -/* start command processing */ -stsch_err (vdev->schid, &schib); -/* enable the subchannel for IPL device */ - schib.pmcw.ena =1 ; -msch (vdev->schid, &schib); +enable_subchannel (vdev->schid);/* start subchannel command */ orb.fmt =1 ;
@@ -343,20 +337,3 @@ bool virtio_is_supported(SubChannelId schid) }return false; } - -int enable_mss_facility (void ) -{ -int ret; -ChscAreaSda *sda_area = (ChscAreaSda *) chsc_page; - -memset (sda_area,0 ,PAGE_SIZE ); - sda_area->request.length =0x0400 ; - sda_area->request.code =0x0031 ; - sda_area->operation_code =0x2 ; - - ret =chsc (sda_area); -if ((ret ==0 ) && (sda_area->response.code ==0x0001 )) { -return 0 ; - } -return -EIO ; -}
Signature · 1 line
2.7.4
Re: [Qemu-devel] [PATCH v4 07/15] s390-bios: Decouple channel i/o logic from virtio
Quoted 5 lines · On Mon, 11 Mar 2019 11:21:25 -0400 "Jason J. Herne" <[email protected]>…
Create a separate library for channel i/o related code. This decouples channel i/o operations from virtio and allows us to make use of them for the real dasd boot path.
Signed-off-by Jason J. Herne <[email protected]>
Quoted 11 lines
--- pc-bios/s390-ccw/Makefile | 2 +- pc-bios/s390-ccw/cio.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ pc-bios/s390-ccw/cio.h | 3 +++ pc-bios/s390-ccw/main.c | 1 + pc-bios/s390-ccw/netboot.mak | 2 +- pc-bios/s390-ccw/netmain.c | 1 + pc-bios/s390-ccw/s390-ccw.h | 1 - pc-bios/s390-ccw/virtio.c | 27 ++------------------------- 8 files changed, 53 insertions(+), 28 deletions(-) create mode 100644 pc-bios/s390-ccw/cio.c
PATCH v4 8/15 s390-bios: Map low core memory
In reply to Jason J. HerneCreate a new header for basic architecture specific definitions and add a mapping of low core memory. This mapping will be used by the real dasd boot process.
--- pc-bios/s390-ccw/main.c | 2 + pc-bios/s390-ccw/s390-arch.h | 90 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 pc-bios/s390-ccw/s390-arch.h
pc-bios/s390-ccw/main.c +2 -0
@@ -9,6 +9,7 @@*/ #include "libc.h" +#include "s390-arch.h" #include "s390-ccw.h" #include "cio.h" #include "virtio.h"
@@ -19,6 +20,7 @@ static char loadparm_str[LOADPARM_LEN + 1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };QemuIplParameters qipl; IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));static bool have_iplb; +LowCore const *lowcore;/* Yes, this *is* a pointer to address 0 */ #define LOADPARM_PROMPT "PROMPT "#define LOADPARM_EMPTY " "
pc-bios/s390-ccw/s390-arch.h new file +90 -0
90 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v4 9/15 s390-bios: ptr2u32 and u32toptr
In reply to Jason J. HerneIntroduce inline functions to convert between pointers and unsigned 32-bit ints. These are used to hide the ugliness required to avoid compiler warnings.
--- pc-bios/s390-ccw/helper.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pc-bios/s390-ccw/helper.h
pc-bios/s390-ccw/helper.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Helper Functions +* +* Copyright (c) 2019 IBM Corp. +* +* Author(s): Jason J. Herne <[email protected]> +* +* 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 S390_CCW_HELPER_H +#define S390_CCW_HELPER_H + +#include "s390-ccw.h" + +/* Avoids compiler warnings when casting a pointer to a u32 */ +static inline uint32_t ptr2u32 (void *ptr) +{ +IPL_assert ((uint64_t )ptr <=0xffffffff ,"ptr2u32: ptr too large" ); +return (uint32_t )(uint64_t )ptr; +} + +/* Avoids compiler warnings when casting a u32 to a pointer */ +static inline void *u32toptr (uint32_t n) +{ +return (void *)(uint64_t )n; +} + +#endif
Signature · 1 line
2.7.4
PATCH v4 10/15 s390-bios: Support for running format-0/1 channel programs
In reply to Jason J. HerneIntroduce a library function for executing format-0 and format-1 channel programs and waiting for their completion before continuing execution.
Add cu_type() to channel io library. This will be used to query control unit type which is used to determine if we are booting a virtio device or a real dasd device.
--- pc-bios/s390-ccw/cio.c | 144 ++++++++++++++++++++++++++++++++++++++++++++ pc-bios/s390-ccw/cio.h | 130 ++++++++++++++++++++++++++++++++++++++- pc-bios/s390-ccw/s390-ccw.h | 1 + pc-bios/s390-ccw/start.S | 29 +++++++++ 4 files changed, 301 insertions(+), 3 deletions(-)
pc-bios/s390-ccw/cio.c +144 -0
@@ -13,10 +13,14 @@#include "libc.h" #include "s390-ccw.h" +#include "s390-arch.h" +#include "helper.h" #include "cio.h" static char chsc_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); +static int __do_cio (SubChannelId schid,uint32_t ccw_addr,int fmt,Irb *irb); +int enable_mss_facility (void ) {int ret;
@@ -42,3 +46,143 @@ void enable_subchannel(SubChannelId schid) schib.pmcw.ena =1 ;msch (schid, &schib); } + +uint16_t cu_type (SubChannelId schid) +{ +Ccw1 sense_id_ccw; +SenseId sense_data; + + sense_id_ccw.cmd_code =CCW_CMD_SENSE_ID ; + sense_id_ccw.cda =ptr2u32 (&sense_data); + sense_id_ccw.count =sizeof (sense_data); + sense_id_ccw.flags |=CCW_FLAG_SLI ; + +if (do_cio (schid,CU_TYPE_UNKNOWN ,ptr2u32 (&sense_id_ccw),CCW_FMT1 )) { +panic ("Failed to run SenseID CCw\n" ); + } + +return sense_data.cu_type; +} + +int basic_sense (SubChannelId schid,uint16_t cutype,void *sense_data, +uint16_t data_size) +{ +Ccw1 senseCcw; +Irb irb; + + senseCcw.cmd_code =CCW_CMD_BASIC_SENSE ; + senseCcw.cda =ptr2u32 (sense_data); + senseCcw.count = data_size; + +return __do_cio (schid,ptr2u32 (&senseCcw),CCW_FMT1 , &irb); +} + +static bool irb_error (Irb *irb) +{ +if (irb->scsw.cstat) { +return true; + } +return irb->scsw.dstat != (SCSW_DSTAT_DEVEND |SCSW_DSTAT_CHEND ); +} + +/* +* Handles executing ssch, tsch and returns the irb obtained from tsch. +* Returns 0 on success, -1 if unexpected status pending and we need to retry, +* otherwise returns condition code from ssch/tsch for error cases. +*/ +static int __do_cio (SubChannelId schid,uint32_t ccw_addr,int fmt,Irb *irb) +{ +CmdOrb orb = {}; +int rc; + +IPL_assert (fmt ==0 || fmt ==1 ,"Invalid ccw format" ); + +/* ccw_addr must be <= 24 bits and point to at least one whole ccw. */ +if (fmt ==0 ) { +IPL_assert (ccw_addr <=0xFFFFFF -8 ,"Invalid ccw address" ); + } + + orb.fmt = fmt; + orb.pfch =1 ;/* QEMU's cio implementation requires prefetch */ + orb.c64 =1 ;/* QEMU's cio implementation requires 64-bit idaws */ + orb.lpm =0xFF ;/* All paths allowed */ + orb.cpa = ccw_addr; + + rc =ssch (schid, &orb); +if (rc ==1 || rc ==2 ) { +/* Subchannel status pending or busy. Eat status and ask for retry. */ +tsch (schid, irb); +return -1 ; + } +if (rc) { +print_int ("ssch failed with cc=" , rc); +return rc; + } + +consume_io_int (); + +/* collect status */ + rc =tsch (schid, irb); +if (rc) { +print_int ("tsch failed with cc=" , rc); + } + +return rc; +} + +/* +* Executes a channel program at a given subchannel. The request to run the +* channel program is sent to the subchannel, we then wait for the interrupt +* signaling completion of the I/O operation(s) performed by the channel +* program. Lastly we verify that the i/o operation completed without error and +* that the interrupt we received was for the subchannel used to run the +* channel program. +* +* Note: This function assumes it is running in an environment where no other +* cpus are generating or receiving I/O interrupts. So either run it in a +* single-cpu environment or make sure all other cpus are not doing I/O and +* have I/O interrupts masked off. We also assume that only one device is +* active (generating i/o interrupts). +* +* Returns non-zero on error. +*/ +int do_cio (SubChannelId schid,uint16_t cutype,uint32_t ccw_addr,int fmt) +{ +Irb irb = {}; +SenseDataEckdDasd sd; +int rc, retries =0 ; + +while (true) { + rc =__do_cio (schid, ccw_addr, fmt, &irb); + +if (rc ==-1 ) { + retries++; +continue ; + } +if (rc) { +/* ssch/tsch error. Message already reported by __do_cio */ +break ; + } + +if (!irb_error (&irb)) { +break ; + } + +/* +* Unexpected unit check, or interface-control-check. Use sense to +* clear (unit check only) then retry. +*/ +if ((unit_check (&irb) ||iface_ctrl_check (&irb)) && retries <=2 ) { +if (unit_check (&irb)) { +basic_sense (schid, cutype, &sd,sizeof (sd)); + } + retries++; +continue ; + } + + rc =-1 ; +break ; + } + +return rc; +}
pc-bios/s390-ccw/cio.h +127 -3
167 lines not on this page · raw message
pc-bios/s390-ccw/s390-ccw.h +1 -0
@@ -52,6 +52,7 @@ typedef unsigned long long __u64;/* start.s */ void disabled_wait (void );void consume_sclp_int (void ); +void consume_io_int (void );/* main.c */ void panic (const char *string);
pc-bios/s390-ccw/start.S +29 -0
@@ -71,6 +71,26 @@ consume_sclp_int: larl %r1, enabled_wait_psw lpswe 0(%r1) +/* + * void consume_io_int(void) + * + * eats one I/O interrupt + */ + .globl consume_io_int +consume_io_int: + /* enable I/O interrupts in cr6 */ + stctg %c6,%c6,0(%r15) + oi 4(%r15), 0xff + lctlg %c6,%c6,0(%r15) + /* prepare i/o call handler */ + larl %r1, io_new_code + stg %r1, 0x1f8 + larl %r1, io_new_mask + mvc 0x1f0(8),0(%r1) + /* load enabled wait PSW */ + larl %r1, enabled_wait_psw + lpswe 0(%r1) + external_new_code: /* disable service interrupts in cr0 */ stctg %c0,%c0,0(%r15)
@@ -78,6 +98,13 @@ external_new_code: lctlg %c0,%c0,0(%r15) br %r14 +io_new_code: + /* disable I/O interrupts in cr6 */ + stctg %c6,%c6,0(%r15) + ni 4(%r15), 0x00 + lctlg %c6,%c6,0(%r15) + br %r14 + .align 8 disabled_wait_psw: .quad 0x0002000180000000,0x0000000000000000
@@ -85,3 +112,5 @@ enabled_wait_psw: .quad 0x0302000180000000,0x0000000000000000 external_new_mask: .quad 0x0000000180000000 +io_new_mask: + .quad 0x0000000180000000
Signature · 1 line
2.7.4
PATCH v4 11/15 s390-bios: cio error handling
In reply to Jason J. HerneAdd verbose error output for when unexpected i/o errors happen. This eases the burden of debugging and reporting i/o errors. No error information is printed in the success case, here is an example of what is output on error:
cio device error
ssid : 0x0000000000000000
cssid : 0x0000000000000000
sch_no: 0x0000000000000000
Interrupt Response Block Data:
Function Ctrl : [Start]
Activity Ctrl : [Start-Pending]
Status Ctrl : [Alert] [Primary] [Secondary] [Status-Pending] Device Status : [Unit-Check]
Channel Status :
cpa=: 0x000000007f8d6038
prev_ccw=: 0x0000000000000000
this_ccw=: 0x0000000000000000
Eckd Dasd Sense Data (fmt 32-bytes):
Sense Condition Flags :
Residual Count =: 0x0000000000000000
Phys Drive ID =: 0x000000000000009e
low cyl address =: 0x0000000000000000
head addr & hi cyl =: 0x0000000000000000
format/message =: 0x0000000000000008
fmt-dependent[0-7] =: 0x0000000000000004
fmt-dependent[8-15]=: 0xe561282305082fff
prog action code =: 0x0000000000000016
Configuration info =: 0x00000000000040e0
mcode / hi-cyl =: 0x0000000000000000
cyl & head addr [0]=: 0x0000000000000000
cyl & head addr [1]=: 0x0000000000000000
cyl & head addr [2]=: 0x0000000000000000--- pc-bios/s390-ccw/cio.c | 237 +++++++++++++++++++++++++++++++++++++++++++++++- pc-bios/s390-ccw/libc.h | 11 +++ 2 files changed, 247 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/cio.c +236 -1
@@ -85,6 +85,228 @@ static bool irb_error(Irb *irb)return irb->scsw.dstat != (SCSW_DSTAT_DEVEND |SCSW_DSTAT_CHEND ); } +static void print_eckd_dasd_sense_data (SenseDataEckdDasd *sd) +{ +char msgline[512 ]; + +if (sd->config_info &0x8000 ) { +sclp_print ("Eckd Dasd Sense Data (fmt 24-bytes):\n" ); + }else { +sclp_print ("Eckd Dasd Sense Data (fmt 32-bytes):\n" ); + } + +strcat (msgline," Sense Condition Flags :" ); +if (sd->status[0 ] &SNS_STAT0_CMD_REJECT ) { +strcat (msgline," [Cmd-Reject]" ); + } +if (sd->status[0 ] &SNS_STAT0_INTERVENTION_REQ ) { +strcat (msgline," [Intervention-Required]" ); + } +if (sd->status[0 ] &SNS_STAT0_BUS_OUT_CHECK ) { +strcat (msgline," [Bus-Out-Parity-Check]" ); + } +if (sd->status[0 ] &SNS_STAT0_EQUIPMENT_CHECK ) { +strcat (msgline," [Equipment-Check]" ); + } +if (sd->status[0 ] &SNS_STAT0_DATA_CHECK ) { +strcat (msgline," [Data-Check]" ); + } +if (sd->status[0 ] &SNS_STAT0_OVERRUN ) { +strcat (msgline," [Overrun]" ); + } +if (sd->status[0 ] &SNS_STAT0_INCOMPL_DOMAIN ) { +strcat (msgline," [Incomplete-Domain]" ); + } + +if (sd->status[1 ] &SNS_STAT1_PERM_ERR ) { +strcat (msgline," [Permanent-Error]" ); + } +if (sd->status[1 ] &SNS_STAT1_INV_TRACK_FORMAT ) { +strcat (msgline," [Invalid-Track-Fmt]" ); + } +if (sd->status[1 ] &SNS_STAT1_EOC ) { +strcat (msgline," [End-of-Cyl]" ); + } +if (sd->status[1 ] &SNS_STAT1_MESSAGE_TO_OPER ) { +strcat (msgline," [Operator-Msg]" ); + } +if (sd->status[1 ] &SNS_STAT1_NO_REC_FOUND ) { +strcat (msgline," [No-Record-Found]" ); + } +if (sd->status[1 ] &SNS_STAT1_FILE_PROTECTED ) { +strcat (msgline," [File-Protected]" ); + } +if (sd->status[1 ] &SNS_STAT1_WRITE_INHIBITED ) { +strcat (msgline," [Write-Inhibited]" ); + } +if (sd->status[1 ] &SNS_STAT1_IMPRECISE_END ) { +strcat (msgline," [Imprecise-Ending]" ); + } + +if (sd->status[2 ] &SNS_STAT2_REQ_INH_WRITE ) { +strcat (msgline," [Req-Inhibit-Write]" ); + } +if (sd->status[2 ] &SNS_STAT2_CORRECTABLE ) { +strcat (msgline," [Correctable-Data-Check]" ); + } +if (sd->status[2 ] &SNS_STAT2_FIRST_LOG_ERR ) { +strcat (msgline," [First-Error-Log]" ); + } +if (sd->status[2 ] &SNS_STAT2_ENV_DATA_PRESENT ) { +strcat (msgline," [Env-Data-Present]" ); + } +if (sd->status[2 ] &SNS_STAT2_IMPRECISE_END ) { +strcat (msgline," [Imprecise-End]" ); + } +strcat (msgline,"\n" ); +sclp_print (msgline); + +print_int (" Residual Count =" , sd->res_count); +print_int (" Phys Drive ID =" , sd->phys_drive_id); +print_int (" low cyl address =" , sd->low_cyl_addr); +print_int (" head addr & hi cyl =" , sd->head_high_cyl_addr); +print_int (" format/message =" , sd->fmt_msg); +print_int (" fmt-dependent[0-7] =" , sd->fmt_dependent_info[0 ]); +print_int (" fmt-dependent[8-15]=" , sd->fmt_dependent_info[1 ]); +print_int (" prog action code =" , sd->program_action_code); +print_int (" Configuration info =" , sd->config_info); +print_int (" mcode / hi-cyl =" , sd->mcode_hicyl); +print_int (" cyl & head addr [0]=" , sd->cyl_head_addr[0 ]); +print_int (" cyl & head addr [1]=" , sd->cyl_head_addr[1 ]); +print_int (" cyl & head addr [2]=" , sd->cyl_head_addr[2 ]); +} + +static void print_irb_err (Irb *irb) +{ +uint64_t this_ccw = *(uint64_t *)u32toptr (irb->scsw.cpa); +uint64_t prev_ccw = *(uint64_t *)u32toptr (irb->scsw.cpa -8 ); +char msgline[256 ]; + +sclp_print ("Interrupt Response Block Data:\n" ); + +strcat (msgline," Function Ctrl :" ); +if (irb->scsw.ctrl &SCSW_FCTL_START_FUNC ) { +strcat (msgline," [Start]" ); + } +if (irb->scsw.ctrl &SCSW_FCTL_HALT_FUNC ) { +strcat (msgline," [Halt]" ); + } +if (irb->scsw.ctrl &SCSW_FCTL_CLEAR_FUNC ) { +strcat (msgline," [Clear]" ); + } +strcat (msgline,"\n" ); +sclp_print (msgline); + + msgline[0 ] ='\0' ; +strcat (msgline," Activity Ctrl :" ); +if (irb->scsw.ctrl &SCSW_ACTL_RESUME_PEND ) { +strcat (msgline," [Resume-Pending]" ); + } +if (irb->scsw.ctrl &SCSW_ACTL_START_PEND ) { +strcat (msgline," [Start-Pending]" ); + } +if (irb->scsw.ctrl &SCSW_ACTL_HALT_PEND ) { +strcat (msgline," [Halt-Pending]" ); + } +if (irb->scsw.ctrl &SCSW_ACTL_CLEAR_PEND ) { +strcat (msgline," [Clear-Pending]" ); + } +if (irb->scsw.ctrl &SCSW_ACTL_CH_ACTIVE ) { +strcat (msgline," [Channel-Active]" ); + } +if (irb->scsw.ctrl &SCSW_ACTL_DEV_ACTIVE ) { +strcat (msgline," [Device-Active]" ); + } +if (irb->scsw.ctrl &SCSW_ACTL_SUSPENDED ) { +strcat (msgline," [Suspended]" ); + } +strcat (msgline,"\n" ); +sclp_print (msgline); + + msgline[0 ] ='\0' ; +strcat (msgline," Status Ctrl :" ); +if (irb->scsw.ctrl &SCSW_SCTL_ALERT ) { +strcat (msgline," [Alert]" ); + } +if (irb->scsw.ctrl &SCSW_SCTL_INTERMED ) { +strcat (msgline," [Intermediate]" ); + } +if (irb->scsw.ctrl &SCSW_SCTL_PRIMARY ) { +strcat (msgline," [Primary]" ); + } +if (irb->scsw.ctrl &SCSW_SCTL_SECONDARY ) { +strcat (msgline," [Secondary]" ); + } +if (irb->scsw.ctrl &SCSW_SCTL_STATUS_PEND ) { +strcat (msgline," [Status-Pending]" ); + } + +strcat (msgline,"\n" ); +sclp_print (msgline); + + msgline[0 ] ='\0' ; +strcat (msgline," Device Status :" ); +if (irb->scsw.dstat &SCSW_DSTAT_ATTN ) { +strcat (msgline," [Attention]" ); + } +if (irb->scsw.dstat &SCSW_DSTAT_STATMOD ) { +strcat (msgline," [Status-Modifier]" ); + } +if (irb->scsw.dstat &SCSW_DSTAT_CUEND ) { +strcat (msgline," [Ctrl-Unit-End]" ); + } +if (irb->scsw.dstat &SCSW_DSTAT_BUSY ) { +strcat (msgline," [Busy]" ); + } +if (irb->scsw.dstat &SCSW_DSTAT_CHEND ) { +strcat (msgline," [Channel-End]" ); + } +if (irb->scsw.dstat &SCSW_DSTAT_DEVEND ) { +strcat (msgline," [Device-End]" ); + } +if (irb->scsw.dstat &SCSW_DSTAT_UCHK ) { +strcat (msgline," [Unit-Check]" ); + } +if (irb->scsw.dstat &SCSW_DSTAT_UEXCP ) { +strcat (msgline," [Unit-Exception]" ); + } +strcat (msgline,"\n" ); +sclp_print (msgline); + + msgline[0 ] ='\0' ; +strcat (msgline," Channel Status :" ); +if (irb->scsw.cstat &SCSW_CSTAT_PCINT ) { +strcat (msgline," [Program-Ctrl-Interruption]" ); + } +if (irb->scsw.cstat &SCSW_CSTAT_BADLEN ) { +strcat (msgline," [Incorrect-Length]" ); + } +if (irb->scsw.cstat &SCSW_CSTAT_PROGCHK ) { +strcat (msgline," [Program-Check]" ); + } +if (irb->scsw.cstat &SCSW_CSTAT_PROTCHK ) { +strcat (msgline," [Protection-Check]" ); + } +if (irb->scsw.cstat &SCSW_CSTAT_CHDCHK ) { +strcat (msgline," [Channel-Data-Check]" ); + } +if (irb->scsw.cstat &SCSW_CSTAT_CHCCHK ) { +strcat (msgline," [Channel-Ctrl-Check]" ); + } +if (irb->scsw.cstat &SCSW_CSTAT_ICCHK ) { +strcat (msgline," [Interface-Ctrl-Check]" ); + } +if (irb->scsw.cstat &SCSW_CSTAT_CHAINCHK ) { +strcat (msgline," [Chaining-Check]" ); + } +strcat (msgline,"\n" ); +sclp_print (msgline); + +print_int (" cpa=" , irb->scsw.cpa); +print_int (" prev_ccw=" , prev_ccw); +print_int (" this_ccw=" , this_ccw); +} +/* * Handles executing ssch, tsch and returns the irb obtained from tsch. * Returns 0 on success, -1 if unexpected status pending and we need to retry,
@@ -142,7 +364,7 @@ static int __do_cio(SubChannelId schid, uint32_t ccw_addr, int fmt, Irb *irb)* cpus are generating or receiving I/O interrupts. So either run it in a * single-cpu environment or make sure all other cpus are not doing I/O and * have I/O interrupts masked off. We also assume that only one device is -* active (generating i/o interrupts). +* active (generating i/o interrupts). * * Returns non-zero on error. */
@@ -180,6 +402,19 @@ int do_cio(SubChannelId schid, uint16_t cutype, uint32_t ccw_addr, int fmt)continue ; } +sclp_print ("cio device error\n" ); +print_int (" ssid " , schid.ssid); +print_int (" cssid " , schid.cssid); +print_int (" sch_no" , schid.sch_no); +print_int (" ctrl-unit type" , cutype); +sclp_print ("\n" ); +print_irb_err (&irb); +if (cutype ==CU_TYPE_DASD_3990 || cutype ==CU_TYPE_DASD_2107 || + cutype ==CU_TYPE_UNKNOWN ) { +if (!basic_sense (schid, cutype, &sd,sizeof (sd))) { +print_eckd_dasd_sense_data (&sd); + } + } rc =-1 ;break ; }
pc-bios/s390-ccw/libc.h +11 -0
@@ -67,6 +67,17 @@ static inline size_t strlen(const char *str)return i; } +static inline char *strcat (char *dest,const char *src) +{ +int i; +char *dest_end = dest +strlen (dest); + +for (i =0 ; i <=strlen (src); i++) { + dest_end[i] = src[i]; + } +return dest; +} +static inline int isdigit (int c) {return (c >='0' ) && (c <='9' );
Signature · 1 line
2.7.4
PATCH v4 12/15 s390-bios: Refactor virtio to run channel programs via cio
In reply to Jason J. HerneNow that we have a Channel I/O library let's modify virtio boot code to make use of it for running channel programs.
--- pc-bios/s390-ccw/virtio.c | 49 +++++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 29 deletions(-)
pc-bios/s390-ccw/virtio.c +20 -29
@@ -14,6 +14,7 @@#include "virtio.h" #include "virtio-scsi.h" #include "bswap.h" +#include "helper.h" #define VRING_WAIT_REPLY_TIMEOUT 30
@@ -89,33 +90,20 @@ int drain_irqs(SubChannelId schid) } } -static int run_ccw (VDev *vdev,int cmd,void *ptr,int len) +static int run_ccw (VDev *vdev,int cmd,void *ptr,int len,bool sli) {Ccw1 ccw = {}; -CmdOrb orb = {}; -int r; - -enable_subchannel (vdev->schid); - -/* start subchannel command */ - orb.fmt =1 ; - orb.cpa = (u32)(long)&ccw; - orb.lpm =0x80 ; ccw.cmd_code = cmd; ccw.cda = (long )ptr; ccw.count = len; - r =ssch (vdev->schid, &orb); -/* -* XXX Wait until device is done processing the CCW. For now we can -* assume that a simple tsch will have finished the CCW processing, -* but the architecture allows for asynchronous operation -*/ -if (!r) { - r =drain_irqs (vdev->schid); +if (sli) { + ccw.flags |=CCW_FLAG_SLI ; } -return r; + +enable_subchannel (vdev->schid); +return do_cio (vdev->schid, vdev->senseid.cu_type,ptr2u32 (&ccw),CCW_FMT1 ); }static void vring_init (VRing *vr,VqInfo *info)
@@ -257,7 +245,7 @@ void virtio_setup_ccw(VDev *vdev) vdev->config.blk.blk_size =0 ;/* mark "illegal" - setup started... */ vdev->guessed_disk_nature =VIRTIO_GDN_NONE ; -run_ccw (vdev,CCW_CMD_VDEV_RESET ,NULL ,0 ); +run_ccw (vdev,CCW_CMD_VDEV_RESET ,NULL ,0 , false);switch (vdev->senseid.cu_model) {case VIRTIO_ID_NET :
@@ -278,18 +266,19 @@ void virtio_setup_ccw(VDev *vdev)default :panic ("Unsupported virtio device\n" ); } -IPL_assert (run_ccw (vdev,CCW_CMD_READ_CONF , &vdev->config, cfg_size) ==0 , -"Could not get block device configuration" ); +IPL_assert ( +run_ccw (vdev,CCW_CMD_READ_CONF , &vdev->config, cfg_size, false) ==0 , +"Could not get block device configuration" );/* Feature negotiation */ for (i =0 ; i <ARRAY_SIZE (vdev->guest_features); i++) { feats.features =0 ; feats.index = i; - rc =run_ccw (vdev,CCW_CMD_READ_FEAT , &feats,sizeof (feats)); + rc =run_ccw (vdev,CCW_CMD_READ_FEAT , &feats,sizeof (feats), false);IPL_assert (rc ==0 ,"Could not get features bits" ); vdev->guest_features[i] &=bswap32 (feats.features); feats.features =bswap32 (vdev->guest_features[i]); - rc =run_ccw (vdev,CCW_CMD_WRITE_FEAT , &feats,sizeof (feats)); + rc =run_ccw (vdev,CCW_CMD_WRITE_FEAT , &feats,sizeof (feats), false);IPL_assert (rc ==0 ,"Could not set features bits" ); }
@@ -306,16 +295,17 @@ void virtio_setup_ccw(VDev *vdev) };IPL_assert ( -run_ccw (vdev,CCW_CMD_READ_VQ_CONF , &config,sizeof (config)) ==0 , +run_ccw (vdev,CCW_CMD_READ_VQ_CONF , &config,sizeof (config), false) ==0 ,"Could not get block device VQ configuration" ); info.num = config.num;vring_init (&vdev->vrings[i], &info); vdev->vrings[i].schid = vdev->schid; -IPL_assert (run_ccw (vdev,CCW_CMD_SET_VQ , &info,sizeof (info)) ==0 , -"Cannot set VQ info" ); +IPL_assert ( +run_ccw (vdev,CCW_CMD_SET_VQ , &info,sizeof (info), false) ==0 , +"Cannot set VQ info" ); }IPL_assert ( -run_ccw (vdev,CCW_CMD_WRITE_STATUS , &status,sizeof (status)) ==0 , +run_ccw (vdev,CCW_CMD_WRITE_STATUS , &status,sizeof (status), false) ==0 ,"Could not write status to host" ); }
@@ -324,7 +314,8 @@ bool virtio_is_supported(SubChannelId schid) vdev.schid = schid;memset (&vdev.senseid,0 ,sizeof (vdev.senseid));/* run sense id command */ -if (run_ccw (&vdev,CCW_CMD_SENSE_ID , &vdev.senseid,sizeof (vdev.senseid))) { +if (run_ccw (&vdev,CCW_CMD_SENSE_ID , &vdev.senseid,sizeof (vdev.senseid), + true)) {return false; }if (vdev.senseid.cu_type ==0x3832 ) {
Signature · 1 line
2.7.4
PATCH v4 13/15 s390-bios: Use control unit type to determine boot method
In reply to Jason J. HerneThe boot method is different depending on which device type we are booting from. Let's examine the control unit type to determine if we're a virtio device. We'll eventually add a case to check for a real dasd device here as well.
Since we have to call enable_subchannel() in main now, might as well remove that call from virtio.c : run_ccw(). This requires adding some additional enable_subchannel calls to not break calls to virtio_is_supported().
--- pc-bios/s390-ccw/main.c | 16 ++++++++++++++-- pc-bios/s390-ccw/netmain.c | 1 + pc-bios/s390-ccw/virtio.c | 1 - 3 files changed, 15 insertions(+), 3 deletions(-)
pc-bios/s390-ccw/main.c +14 -2
@@ -76,6 +76,7 @@ static bool find_subch(int dev_no)/* Skip net devices since no IPLB is created and therefore no * network bootloader has been loaded */ +enable_subchannel (blk_schid);if (virtio_is_supported (blk_schid) &&virtio_get_device_type () ==VIRTIO_ID_NET && dev_no <0 ) {continue ;
@@ -198,13 +199,24 @@ static void virtio_setup(void)int main (void ) { +uint16_t cutype; +sclp_setup ();css_setup ();boot_setup ();find_boot_device (); +enable_subchannel (blk_schid); -virtio_setup (); -zipl_load ();/* no return */ + cutype =cu_type (blk_schid); +switch (cutype) { +case CU_TYPE_VIRTIO : +virtio_setup (); +zipl_load ();/* no return */ +break ; +default : +print_int ("Attempting to boot from unexpected device type" , cutype); +panic ("" ); + }panic ("Failed to load OS from hard disk\n" );return 0 ;/* make compiler happy */
pc-bios/s390-ccw/netmain.c +1 -0
@@ -476,6 +476,7 @@ static bool find_net_dev(Schib *schib, int dev_no)if (!schib->pmcw.dnv) {continue ; } +enable_subchannel (net_schid);if (!virtio_is_supported (net_schid)) {continue ; }
pc-bios/s390-ccw/virtio.c +0 -1
@@ -102,7 +102,6 @@ static int run_ccw(VDev *vdev, int cmd, void *ptr, int len, bool sli) ccw.flags |=CCW_FLAG_SLI ; } -enable_subchannel (vdev->schid);return do_cio (vdev->schid, vdev->senseid.cu_type,ptr2u32 (&ccw),CCW_FMT1 ); }
Signature · 1 line
2.7.4
PATCH v4 14/15 s390-bios: Add channel command codes/structs needed for dasd-ipl
In reply to Jason J. HerneThe dasd IPL procedure needs to execute a few previously unused channel commands. Let's define them and their associated data structures.
--- pc-bios/s390-ccw/cio.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
pc-bios/s390-ccw/cio.h +23 -0
@@ -200,11 +200,14 @@ typedef struct ccw1 {#define CCW_FLAG_IDA 0x04#define CCW_FLAG_SUSPEND 0x02 +/* Common CCW commands */ +#define CCW_CMD_READ_IPL 0x02#define CCW_CMD_NOOP 0x03#define CCW_CMD_BASIC_SENSE 0x04#define CCW_CMD_TIC 0x08#define CCW_CMD_SENSE_ID 0xe4 +/* Virtio CCW commands */ #define CCW_CMD_SET_VQ 0x13#define CCW_CMD_VDEV_RESET 0x33#define CCW_CMD_READ_FEAT 0x12
@@ -216,6 +219,12 @@ typedef struct ccw1 {#define CCW_CMD_SET_CONF_IND 0x53#define CCW_CMD_READ_VQ_CONF 0x32 +/* DASD CCW commands */ +#define CCW_CMD_DASD_READ 0x06 +#define CCW_CMD_DASD_SEEK 0x07 +#define CCW_CMD_DASD_SEARCH_ID_EQ 0x31 +#define CCW_CMD_DASD_READ_MT 0x86 +/* * Command-mode operation request block */
@@ -333,6 +342,20 @@ typedef struct irb {__u32 emw[8 ]; } __attribute__ ((packed, aligned(4))) Irb; +/* Used for SEEK ccw commands */ +typedef struct CcwSeekData { +uint16_t reserved; +uint16_t cyl; +uint16_t head; +} __attribute__((packed))CcwSeekData ; + +/* Used for SEARCH ID ccw commands */ +typedef struct CcwSearchIdData { +uint16_t cyl; +uint16_t head; +uint8_t record; +} __attribute__((packed))CcwSearchIdData ; +int enable_mss_facility (void );void enable_subchannel (SubChannelId schid);uint16_t cu_type (SubChannelId schid);
Signature · 1 line
2.7.4
PATCH v4 15/15 s390-bios: Support booting from real dasd device
In reply to Jason J. HerneAllows guest to boot from a vfio configured real dasd device.
--- MAINTAINERS | 1 + docs/devel/s390-dasd-ipl.txt | 133 +++++++++++++++++++++++ pc-bios/s390-ccw/Makefile | 2 +- pc-bios/s390-ccw/dasd-ipl.c | 250 +++++++++++++++++++++++++++++++++++++++++++ pc-bios/s390-ccw/dasd-ipl.h | 16 +++ pc-bios/s390-ccw/main.c | 5 + pc-bios/s390-ccw/s390-arch.h | 13 +++ 7 files changed, 419 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
MAINTAINERS +1 -0
@@ -1166,6 +1166,7 @@ S: Supported F: hw/s390x/ipl.* F: pc-bios/s390-ccw/ F: pc-bios/s390-ccw.img +F: docs/devel/s390-dasd-ipl.txt T: git https://github.com/borntraeger/qemu.git s390-next L: [email protected]
docs/devel/s390-dasd-ipl.txt new file +133 -0
133 lines not on this page · raw message
pc-bios/s390-ccw/Makefile +1 -1
@@ -10,7 +10,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw) .PHONY : all clean build-all OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \ - virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o + virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
pc-bios/s390-ccw/dasd-ipl.c new file +250 -0
250 lines not on this page · raw message
pc-bios/s390-ccw/dasd-ipl.h new file +16 -0
@@ -0,0 +1,16 @@ +/* +* S390 IPL (boot) from a real DASD device via vfio framework. +* +* Copyright (c) 2019 Jason J. Herne <[email protected]> +* +* 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,uint16_t cutype); + +#endif /* DASD_IPL_H */
pc-bios/s390-ccw/main.c +5 -0
@@ -13,6 +13,7 @@#include "s390-ccw.h" #include "cio.h" #include "virtio.h" +#include "dasd-ipl.h" char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));static SubChannelId blk_schid = { .one =1 };
@@ -209,6 +210,10 @@ int main(void) cutype =cu_type (blk_schid);switch (cutype) { +case CU_TYPE_DASD_3990 : +case CU_TYPE_DASD_2107 : +dasd_ipl (blk_schid, cutype);/* no return */ +break ;case CU_TYPE_VIRTIO :virtio_setup ();zipl_load ();/* no return */
pc-bios/s390-ccw/s390-arch.h +13 -0
@@ -87,4 +87,17 @@ typedef struct LowCore {extern LowCore const *lowcore; +static inline void set_prefix (uint32_t address) +{ + asmvolatile ("spx %0" : :"m" (address) :"memory" ); +} + +static inline uint32_t store_prefix (void ) +{ +uint32_t address; + + asmvolatile ("stpx %0" :"=m" (address)); +return address; +} +#endif
Signature · 1 line
2.7.4
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v4 00/15] s390: vfio-ccw dasd ipl support
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'bd94e50234 s390-bios: Support booting from real dasd device aad5bf130c s390-bios: Add channel command codes/structs needed for dasd-ipl e258b66057 s390-bios: Use control unit type to determine boot method cc8935297c s390-bios: Refactor virtio to run channel programs via cio 7bdaffbf3f s390-bios: cio error handling5f3bd7198d s390-bios: Support for running format-0/1 channel programs eb2acc2e8a s390-bios: ptr2u32 and u32toptr0e981d74ac s390-bios: Map low core memoryf059965201 s390-bios: Decouple channel i/o logic from virtio 7fc7e860d1 s390-bios: Clean up cio.h4e4ed7410e s390-bios: Factor finding boot device out of virtio code path 7d0cb3a7d8 s390-bios: Extend find_dev() for non-virtio devices c716ab8964 s390-bios: decouple common boot logic from virtio de40d8226e s390-bios: decouple cio setup from virtio832381495b s390 vfio-ccw: Add bootindex property and IPLB data
=== OUTPUT BEGIN ===
1/15 Checking commit 832381495ba0 (s390 vfio-ccw: Add bootindex property and IPLB data)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #220:
new file mode 100644
total: 0 errors, 1 warnings, 199 lines checked
Patch 1/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/15 Checking commit de40d8226eed (s390-bios: decouple cio setup from virtio) 3/15 Checking commit c716ab896424 (s390-bios: decouple common boot logic from virtio)
ERROR: externs should be avoided in .c files
#31: FILE: pc-bios/s390-ccw/main.c:19:
+IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
total: 1 errors, 0 warnings, 65 lines checked
Patch 3/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/15 Checking commit 7d0cb3a7d837 (s390-bios: Extend find_dev() for non-virtio devices) 5/15 Checking commit 4e4ed7410ed2 (s390-bios: Factor finding boot device out of virtio code path) 6/15 Checking commit 7fc7e860d1a8 (s390-bios: Clean up cio.h)
7/15 Checking commit f05996520135 (s390-bios: Decouple channel i/o logic from virtio)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28:
new file mode 100644
total: 0 errors, 1 warnings, 123 lines checked
Patch 7/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
8/15 Checking commit 0e981d74ac1d (s390-bios: Map low core memory)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #36:
new file mode 100644
total: 0 errors, 1 warnings, 104 lines checked
Patch 8/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
9/15 Checking commit eb2acc2e8abf (s390-bios: ptr2u32 and u32toptr)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #17:
new file mode 100644
total: 0 errors, 1 warnings, 31 lines checked
Patch 9/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/15 Checking commit 5f3bd7198d22 (s390-bios: Support for running format-0/1 channel programs)
ERROR: trailing whitespace
#137: FILE: pc-bios/s390-ccw/cio.c:145:
+ * active (generating i/o interrupts). $
total: 1 errors, 0 warnings, 375 lines checked
Patch 10/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
11/15 Checking commit 7bdaffbf3f39 (s390-bios: cio error handling)
12/15 Checking commit cc8935297cb1 (s390-bios: Refactor virtio to run channel programs via cio)
WARNING: line over 80 characters
#103: FILE: pc-bios/s390-ccw/virtio.c:298:
+ run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
WARNING: line over 80 characters
#116: FILE: pc-bios/s390-ccw/virtio.c:308:
+ run_ccw(vdev, CCW_CMD_WRITE_STATUS, &status, sizeof(status), false) == 0,
total: 0 errors, 2 warnings, 107 lines checked
Patch 12/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
13/15 Checking commit e258b660570b (s390-bios: Use control unit type to determine boot method) 14/15 Checking commit aad5bf130c00 (s390-bios: Add channel command codes/structs needed for dasd-ipl) 15/15 Checking commit bd94e50234c5 (s390-bios: Support booting from real dasd device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26:
new file mode 100644
total: 0 errors, 1 warnings, 448 lines checked
Patch 15/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v4 00/15] s390: vfio-ccw dasd ipl support
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
t [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'ea96f08482 s390-bios: Support booting from real dasd device ab7d59e218 s390-bios: Add channel command codes/structs needed for dasd-ipl 2ad6920563 s390-bios: Use control unit type to determine boot method c1dd91dcab s390-bios: Refactor virtio to run channel programs via cio 783a5d992e s390-bios: cio error handlinged5a01a4d1 s390-bios: Support for running format-0/1 channel programs ce04b580ff s390-bios: ptr2u32 and u32toptrd0bf9e13e4 s390-bios: Map low core memorybef31e545b s390-bios: Decouple channel i/o logic from virtio 9d517b7d84 s390-bios: Clean up cio.h19fba0fd56 s390-bios: Factor finding boot device out of virtio code path 6c0daf90e7 s390-bios: Extend find_dev() for non-virtio devices a500db9f58 s390-bios: decouple common boot logic from virtio 1a8b1f01ab s390-bios: decouple cio setup from virtio22aef1c027 s390 vfio-ccw: Add bootindex property and IPLB data
=== OUTPUT BEGIN ===
1/15 Checking commit 22aef1c02747 (s390 vfio-ccw: Add bootindex property and IPLB data)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #220:
new file mode 100644
total: 0 errors, 1 warnings, 199 lines checked
Patch 1/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/15 Checking commit 1a8b1f01abf8 (s390-bios: decouple cio setup from virtio) 3/15 Checking commit a500db9f58bc (s390-bios: decouple common boot logic from virtio)
ERROR: externs should be avoided in .c files
#31: FILE: pc-bios/s390-ccw/main.c:19:
+IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
total: 1 errors, 0 warnings, 65 lines checked
Patch 3/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/15 Checking commit 6c0daf90e7a2 (s390-bios: Extend find_dev() for non-virtio devices) 5/15 Checking commit 19fba0fd568a (s390-bios: Factor finding boot device out of virtio code path) 6/15 Checking commit 9d517b7d847e (s390-bios: Clean up cio.h)
7/15 Checking commit bef31e545b82 (s390-bios: Decouple channel i/o logic from virtio)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28:
new file mode 100644
total: 0 errors, 1 warnings, 123 lines checked
Patch 7/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
8/15 Checking commit d0bf9e13e4f2 (s390-bios: Map low core memory)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #36:
new file mode 100644
total: 0 errors, 1 warnings, 104 lines checked
Patch 8/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
9/15 Checking commit ce04b580ff16 (s390-bios: ptr2u32 and u32toptr)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #17:
new file mode 100644
total: 0 errors, 1 warnings, 31 lines checked
Patch 9/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/15 Checking commit ed5a01a4d1bb (s390-bios: Support for running format-0/1 channel programs)
ERROR: trailing whitespace
#137: FILE: pc-bios/s390-ccw/cio.c:145:
+ * active (generating i/o interrupts). $
total: 1 errors, 0 warnings, 375 lines checked
Patch 10/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
11/15 Checking commit 783a5d992e32 (s390-bios: cio error handling)
12/15 Checking commit c1dd91dcabf5 (s390-bios: Refactor virtio to run channel programs via cio)
WARNING: line over 80 characters
#103: FILE: pc-bios/s390-ccw/virtio.c:298:
+ run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
WARNING: line over 80 characters
#116: FILE: pc-bios/s390-ccw/virtio.c:308:
+ run_ccw(vdev, CCW_CMD_WRITE_STATUS, &status, sizeof(status), false) == 0,
total: 0 errors, 2 warnings, 107 lines checked
Patch 12/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
13/15 Checking commit 2ad69205637b (s390-bios: Use control unit type to determine boot method) 14/15 Checking commit ab7d59e21880 (s390-bios: Add channel command codes/structs needed for dasd-ipl) 15/15 Checking commit ea96f08482fb (s390-bios: Support booting from real dasd device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26:
new file mode 100644
total: 0 errors, 1 warnings, 448 lines checked
Patch 15/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v4 00/15] s390: vfio-ccw dasd ipl support
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
t [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'fc8f35f68b s390-bios: Support booting from real dasd device cc8f9b9582 s390-bios: Add channel command codes/structs needed for dasd-ipl b29dbdc21e s390-bios: Use control unit type to determine boot method 302635f2b0 s390-bios: Refactor virtio to run channel programs via cio d97780d732 s390-bios: cio error handling4d96946c21 s390-bios: Support for running format-0/1 channel programs f46e7a874b s390-bios: ptr2u32 and u32toptrfa38f7e829 s390-bios: Map low core memoryd8b568caf7 s390-bios: Decouple channel i/o logic from virtio a25758c37b s390-bios: Clean up cio.heba9c2f352 s390-bios: Factor finding boot device out of virtio code path 0b7c5d9020 s390-bios: Extend find_dev() for non-virtio devices 6da07615a3 s390-bios: decouple common boot logic from virtio c09f8e28ca s390-bios: decouple cio setup from virtio8289560b25 s390 vfio-ccw: Add bootindex property and IPLB data
=== OUTPUT BEGIN ===
1/15 Checking commit 8289560b250a (s390 vfio-ccw: Add bootindex property and IPLB data)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #220:
new file mode 100644
total: 0 errors, 1 warnings, 199 lines checked
Patch 1/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/15 Checking commit c09f8e28ca6a (s390-bios: decouple cio setup from virtio) 3/15 Checking commit 6da07615a32e (s390-bios: decouple common boot logic from virtio)
ERROR: externs should be avoided in .c files
#31: FILE: pc-bios/s390-ccw/main.c:19:
+IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
total: 1 errors, 0 warnings, 65 lines checked
Patch 3/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/15 Checking commit 0b7c5d90207b (s390-bios: Extend find_dev() for non-virtio devices) 5/15 Checking commit eba9c2f35241 (s390-bios: Factor finding boot device out of virtio code path) 6/15 Checking commit a25758c37b49 (s390-bios: Clean up cio.h)
7/15 Checking commit d8b568caf728 (s390-bios: Decouple channel i/o logic from virtio)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28:
new file mode 100644
total: 0 errors, 1 warnings, 123 lines checked
Patch 7/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
8/15 Checking commit fa38f7e82947 (s390-bios: Map low core memory)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #36:
new file mode 100644
total: 0 errors, 1 warnings, 104 lines checked
Patch 8/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
9/15 Checking commit f46e7a874b6c (s390-bios: ptr2u32 and u32toptr)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #17:
new file mode 100644
total: 0 errors, 1 warnings, 31 lines checked
Patch 9/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/15 Checking commit 4d96946c21d4 (s390-bios: Support for running format-0/1 channel programs)
ERROR: trailing whitespace
#137: FILE: pc-bios/s390-ccw/cio.c:145:
+ * active (generating i/o interrupts). $
total: 1 errors, 0 warnings, 375 lines checked
Patch 10/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
11/15 Checking commit d97780d73213 (s390-bios: cio error handling)
12/15 Checking commit 302635f2b0b1 (s390-bios: Refactor virtio to run channel programs via cio)
WARNING: line over 80 characters
#103: FILE: pc-bios/s390-ccw/virtio.c:298:
+ run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
WARNING: line over 80 characters
#116: FILE: pc-bios/s390-ccw/virtio.c:308:
+ run_ccw(vdev, CCW_CMD_WRITE_STATUS, &status, sizeof(status), false) == 0,
total: 0 errors, 2 warnings, 107 lines checked
Patch 12/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
13/15 Checking commit b29dbdc21e67 (s390-bios: Use control unit type to determine boot method) 14/15 Checking commit cc8f9b958217 (s390-bios: Add channel command codes/structs needed for dasd-ipl) 15/15 Checking commit fc8f35f68b0a (s390-bios: Support booting from real dasd device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26:
new file mode 100644
total: 0 errors, 1 warnings, 448 lines checked
Patch 15/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v4 00/15] s390: vfio-ccw dasd ipl support
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
t [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'38160b4042 s390-bios: Support booting from real dasd device 316515709f s390-bios: Add channel command codes/structs needed for dasd-ipl cb625acff9 s390-bios: Use control unit type to determine boot method e0cf56f04f s390-bios: Refactor virtio to run channel programs via cio 50a001e04d s390-bios: cio error handling8be89d08ab s390-bios: Support for running format-0/1 channel programs c4bd8ffe51 s390-bios: ptr2u32 and u32toptr8ba6f9783a s390-bios: Map low core memoryc2be0a3e0d s390-bios: Decouple channel i/o logic from virtio 02e12ec27b s390-bios: Clean up cio.hba01d1cded s390-bios: Factor finding boot device out of virtio code path bff0b93ce8 s390-bios: Extend find_dev() for non-virtio devices 6b9542b07a s390-bios: decouple common boot logic from virtio 1b23a9248e s390-bios: decouple cio setup from virtioeaef648c5f s390 vfio-ccw: Add bootindex property and IPLB data
=== OUTPUT BEGIN ===
1/15 Checking commit eaef648c5ffe (s390 vfio-ccw: Add bootindex property and IPLB data)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #220:
new file mode 100644
total: 0 errors, 1 warnings, 199 lines checked
Patch 1/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/15 Checking commit 1b23a9248e2c (s390-bios: decouple cio setup from virtio) 3/15 Checking commit 6b9542b07a35 (s390-bios: decouple common boot logic from virtio)
ERROR: externs should be avoided in .c files
#31: FILE: pc-bios/s390-ccw/main.c:19:
+IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
total: 1 errors, 0 warnings, 65 lines checked
Patch 3/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/15 Checking commit bff0b93ce80d (s390-bios: Extend find_dev() for non-virtio devices) 5/15 Checking commit ba01d1cdeda4 (s390-bios: Factor finding boot device out of virtio code path) 6/15 Checking commit 02e12ec27b64 (s390-bios: Clean up cio.h)
7/15 Checking commit c2be0a3e0d87 (s390-bios: Decouple channel i/o logic from virtio)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28:
new file mode 100644
total: 0 errors, 1 warnings, 123 lines checked
Patch 7/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
8/15 Checking commit 8ba6f9783a0d (s390-bios: Map low core memory)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #36:
new file mode 100644
total: 0 errors, 1 warnings, 104 lines checked
Patch 8/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
9/15 Checking commit c4bd8ffe510b (s390-bios: ptr2u32 and u32toptr)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #17:
new file mode 100644
total: 0 errors, 1 warnings, 31 lines checked
Patch 9/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/15 Checking commit 8be89d08ab08 (s390-bios: Support for running format-0/1 channel programs)
ERROR: trailing whitespace
#137: FILE: pc-bios/s390-ccw/cio.c:145:
+ * active (generating i/o interrupts). $
total: 1 errors, 0 warnings, 375 lines checked
Patch 10/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
11/15 Checking commit 50a001e04daa (s390-bios: cio error handling)
12/15 Checking commit e0cf56f04fb1 (s390-bios: Refactor virtio to run channel programs via cio)
WARNING: line over 80 characters
#103: FILE: pc-bios/s390-ccw/virtio.c:298:
+ run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
WARNING: line over 80 characters
#116: FILE: pc-bios/s390-ccw/virtio.c:308:
+ run_ccw(vdev, CCW_CMD_WRITE_STATUS, &status, sizeof(status), false) == 0,
total: 0 errors, 2 warnings, 107 lines checked
Patch 12/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
13/15 Checking commit cb625acff93d (s390-bios: Use control unit type to determine boot method) 14/15 Checking commit 316515709f62 (s390-bios: Add channel command codes/structs needed for dasd-ipl) 15/15 Checking commit 38160b404298 (s390-bios: Support booting from real dasd device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26:
new file mode 100644
total: 0 errors, 1 warnings, 448 lines checked
Patch 15/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v4 00/15] s390: vfio-ccw dasd ipl support
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
t [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'74e39a4097 s390-bios: Support booting from real dasd device 6d452a448d s390-bios: Add channel command codes/structs needed for dasd-ipl cb492caa6c s390-bios: Use control unit type to determine boot method 0620776b87 s390-bios: Refactor virtio to run channel programs via cio 4558a4d4c8 s390-bios: cio error handlinge715629662 s390-bios: Support for running format-0/1 channel programs ba523e4c71 s390-bios: ptr2u32 and u32toptr0c748e5dae s390-bios: Map low core memory92ea0fe2d0 s390-bios: Decouple channel i/o logic from virtio e676252115 s390-bios: Clean up cio.ha94f87a361 s390-bios: Factor finding boot device out of virtio code path 295fd42af0 s390-bios: Extend find_dev() for non-virtio devices 7a5e64f51e s390-bios: decouple common boot logic from virtio 2fd1205555 s390-bios: decouple cio setup from virtio4925bc96f1 s390 vfio-ccw: Add bootindex property and IPLB data
=== OUTPUT BEGIN ===
1/15 Checking commit 4925bc96f171 (s390 vfio-ccw: Add bootindex property and IPLB data)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #220:
new file mode 100644
total: 0 errors, 1 warnings, 199 lines checked
Patch 1/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/15 Checking commit 2fd120555517 (s390-bios: decouple cio setup from virtio) 3/15 Checking commit 7a5e64f51ee9 (s390-bios: decouple common boot logic from virtio)
ERROR: externs should be avoided in .c files
#31: FILE: pc-bios/s390-ccw/main.c:19:
+IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
total: 1 errors, 0 warnings, 65 lines checked
Patch 3/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/15 Checking commit 295fd42af0bd (s390-bios: Extend find_dev() for non-virtio devices) 5/15 Checking commit a94f87a361cc (s390-bios: Factor finding boot device out of virtio code path) 6/15 Checking commit e676252115d6 (s390-bios: Clean up cio.h)
7/15 Checking commit 92ea0fe2d0b6 (s390-bios: Decouple channel i/o logic from virtio)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28:
new file mode 100644
total: 0 errors, 1 warnings, 123 lines checked
Patch 7/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
8/15 Checking commit 0c748e5dae63 (s390-bios: Map low core memory)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #36:
new file mode 100644
total: 0 errors, 1 warnings, 104 lines checked
Patch 8/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
9/15 Checking commit ba523e4c71f7 (s390-bios: ptr2u32 and u32toptr)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #17:
new file mode 100644
total: 0 errors, 1 warnings, 31 lines checked
Patch 9/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/15 Checking commit e7156296626a (s390-bios: Support for running format-0/1 channel programs)
ERROR: trailing whitespace
#137: FILE: pc-bios/s390-ccw/cio.c:145:
+ * active (generating i/o interrupts). $
total: 1 errors, 0 warnings, 375 lines checked
Patch 10/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
11/15 Checking commit 4558a4d4c855 (s390-bios: cio error handling)
12/15 Checking commit 0620776b87c4 (s390-bios: Refactor virtio to run channel programs via cio)
WARNING: line over 80 characters
#103: FILE: pc-bios/s390-ccw/virtio.c:298:
+ run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
WARNING: line over 80 characters
#116: FILE: pc-bios/s390-ccw/virtio.c:308:
+ run_ccw(vdev, CCW_CMD_WRITE_STATUS, &status, sizeof(status), false) == 0,
total: 0 errors, 2 warnings, 107 lines checked
Patch 12/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
13/15 Checking commit cb492caa6c49 (s390-bios: Use control unit type to determine boot method) 14/15 Checking commit 6d452a448d58 (s390-bios: Add channel command codes/structs needed for dasd-ipl) 15/15 Checking commit 74e39a40972c (s390-bios: Support booting from real dasd device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26:
new file mode 100644
total: 0 errors, 1 warnings, 448 lines checked
Patch 15/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v4 00/15] s390: vfio-ccw dasd ipl support
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
79d8b1dc5b..2e35c7738e master -> master
t [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'ee5930c12b s390-bios: Support booting from real dasd device 5ff6fc17a5 s390-bios: Add channel command codes/structs needed for dasd-ipl cb041a4b32 s390-bios: Use control unit type to determine boot method b8416017c4 s390-bios: Refactor virtio to run channel programs via cio df2ec37e43 s390-bios: cio error handling63b18eb97b s390-bios: Support for running format-0/1 channel programs e6900566ed s390-bios: ptr2u32 and u32toptr9de84fcb45 s390-bios: Map low core memory5116bdb9e5 s390-bios: Decouple channel i/o logic from virtio 06f7810bbc s390-bios: Clean up cio.hb488965a0b s390-bios: Factor finding boot device out of virtio code path 509467af29 s390-bios: Extend find_dev() for non-virtio devices 5a2fb35f34 s390-bios: decouple common boot logic from virtio 3a37549e53 s390-bios: decouple cio setup from virtio959a2b698e s390 vfio-ccw: Add bootindex property and IPLB data
=== OUTPUT BEGIN ===
1/15 Checking commit 959a2b698e70 (s390 vfio-ccw: Add bootindex property and IPLB data)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #220:
new file mode 100644
total: 0 errors, 1 warnings, 199 lines checked
Patch 1/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/15 Checking commit 3a37549e53cb (s390-bios: decouple cio setup from virtio) 3/15 Checking commit 5a2fb35f34cd (s390-bios: decouple common boot logic from virtio)
ERROR: externs should be avoided in .c files
#31: FILE: pc-bios/s390-ccw/main.c:19:
+IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
total: 1 errors, 0 warnings, 65 lines checked
Patch 3/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/15 Checking commit 509467af2963 (s390-bios: Extend find_dev() for non-virtio devices) 5/15 Checking commit b488965a0b21 (s390-bios: Factor finding boot device out of virtio code path) 6/15 Checking commit 06f7810bbc26 (s390-bios: Clean up cio.h)
7/15 Checking commit 5116bdb9e5ab (s390-bios: Decouple channel i/o logic from virtio)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28:
new file mode 100644
total: 0 errors, 1 warnings, 123 lines checked
Patch 7/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
8/15 Checking commit 9de84fcb45af (s390-bios: Map low core memory)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #36:
new file mode 100644
total: 0 errors, 1 warnings, 104 lines checked
Patch 8/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
9/15 Checking commit e6900566edda (s390-bios: ptr2u32 and u32toptr)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #17:
new file mode 100644
total: 0 errors, 1 warnings, 31 lines checked
Patch 9/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/15 Checking commit 63b18eb97b3d (s390-bios: Support for running format-0/1 channel programs)
ERROR: trailing whitespace
#137: FILE: pc-bios/s390-ccw/cio.c:145:
+ * active (generating i/o interrupts). $
total: 1 errors, 0 warnings, 375 lines checked
Patch 10/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
11/15 Checking commit df2ec37e43e8 (s390-bios: cio error handling)
12/15 Checking commit b8416017c4b3 (s390-bios: Refactor virtio to run channel programs via cio)
WARNING: line over 80 characters
#103: FILE: pc-bios/s390-ccw/virtio.c:298:
+ run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
WARNING: line over 80 characters
#116: FILE: pc-bios/s390-ccw/virtio.c:308:
+ run_ccw(vdev, CCW_CMD_WRITE_STATUS, &status, sizeof(status), false) == 0,
total: 0 errors, 2 warnings, 107 lines checked
Patch 12/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
13/15 Checking commit cb041a4b3249 (s390-bios: Use control unit type to determine boot method) 14/15 Checking commit 5ff6fc17a5ea (s390-bios: Add channel command codes/structs needed for dasd-ipl) 15/15 Checking commit ee5930c12b96 (s390-bios: Support booting from real dasd device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26:
new file mode 100644
total: 0 errors, 1 warnings, 448 lines checked
Patch 15/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Quoted 8 lines · On Mon, 11 Mar 2019 11:21:18 -0400 "Jason J. Herne" <[email protected]>…
This is to support booting from vfio-ccw dasd devices. We basically implement the real hardware ipl procedure. This allows for booting Linux guests on vfio-ccw devices.
vfio-ccw's channel program prefetch algorithm complicates ipl because most ipl channel programs dynamically modify themselves. Details on the ipl process and how we worked around this issue can be found in
docs/devel/s390-dasd-ipl.txt.
Quoted 6 lines
*********************
NOTE: Newer DASD units which initially present as control unit type 3990 may in fact really be 2107. Some operating systems may enable 2107 features for these devices thereby making sense id return a control unit type of 2107. I've added support for control unit type 2107 so we can ipl from these devices.
*********************
Ugh. I'd have hoped that would have been recognized as A Bad Idea the last time we had a design like that...
Does that cu type switch persist over subchannel enable/disable? Subsystem reset?
Quoted 91 lines
Changelog
==========
v4
01/16: s390 vfio-ccw: Add bootindex property and IPLB data
- AddingCCW_DEVTYPE_VIRTIO_NETtype.
-s390_get_ccw_devicecan now accept a NULL devtype argument
- Other minor refactors06/16: s390-bios: Clean up
cio.h
- Remove whitespace changes tocmd_orbstruct07/16: s390-bios: Decouple channel i/o logic from virtio
- Fix copyright line08/16: s390-bios: Map low core memory
- Remove Lowcore entries >=0x200
- Repositioned const keywords09/16: s390-bios: ptr2u32 and u32toptr
- Add assert to ensure pointer being converted to u32 is below 32 bits in length
- Add missing copyright comment10/16: s390-bios: Support for running format-0/1 channel programs
-basic_sensenow calls__do_cioinstead ofdo_cio. Further protection from infinite recursion.
-__do_cionow asks for retry for subchannel busy case.
- Minor fixups to comments and message wording
-start.S: Formating and register naming cleanups
- AddedCU_TYPE_DASD_210711/16: s390-bios: cio error handling
- Only print sense data when it is provided15/16:
- Added support forCU_TYPE_DASD_210716/16:
- Merged with various earlier patchesJason J. Herne (15):
s390 vfio-ccw: Add bootindex property and IPLB data
s390-bios: decouple cio setup from virtio
s390-bios: decouple common boot logic from virtio
s390-bios: Extendfind_dev()for non-virtio devices
s390-bios: Factor finding boot device out of virtio code path
s390-bios: Clean upcio.h
s390-bios: Decouple channel i/o logic from virtio
s390-bios: Map low core memory
s390-bios: ptr2u32 and u32toptr
s390-bios: Support for running format-0/1 channel programs
s390-bios: cio error handling
s390-bios: Refactor virtio to run channel programs via cio
s390-bios: Use control unit type to determine boot method
s390-bios: Add channel command codes/structs needed for dasd-ipl
s390-bios: Support booting from real dasd deviceMAINTAINERS | 2 + docs/devel/s390-dasd-ipl.txt | 133 ++++++++++++++ hw/s390x/ipl.c | 61 +++++-- hw/s390x/s390-ccw.c | 9 + hw/vfio/ccw.c | 2 +- include/hw/s390x/s390-ccw.h | 1 + include/hw/s390x/vfio-ccw.h | 28 +++ pc-bios/s390-ccw/Makefile | 2 +- pc-bios/s390-ccw/cio.c | 423 +++++++++++++++++++++++++++++++++++++++++++ pc-bios/s390-ccw/cio.h | 270 +++++++++++++++++++++------ pc-bios/s390-ccw/dasd-ipl.c | 250 +++++++++++++++++++++++++ pc-bios/s390-ccw/dasd-ipl.h | 16 ++ pc-bios/s390-ccw/helper.h | 31 ++++ pc-bios/s390-ccw/libc.h | 11 ++ pc-bios/s390-ccw/main.c | 161 ++++++++++------ pc-bios/s390-ccw/netboot.mak | 2 +- pc-bios/s390-ccw/netmain.c | 2 + pc-bios/s390-ccw/s390-arch.h | 103 +++++++++++ pc-bios/s390-ccw/s390-ccw.h | 10 +- pc-bios/s390-ccw/start.S | 29 +++ pc-bios/s390-ccw/virtio.c | 73 ++------ tests/boot-serial-test.c | 2 +- 22 files changed, 1425 insertions(+), 196 deletions(-) create mode 100644 docs/devel/s390-dasd-ipl.txt create mode 100644 include/hw/s390x/vfio-ccw.h create mode 100644 pc-bios/s390-ccw/cio.c create mode 100644 pc-bios/s390-ccw/dasd-ipl.c create mode 100644 pc-bios/s390-ccw/dasd-ipl.h create mode 100644 pc-bios/s390-ccw/helper.h create mode 100644 pc-bios/s390-ccw/s390-arch.h--
2.7.4
Quoted 18 lines · Cornelia Huck
Quoted 8 lines · On Mon, 11 Mar 2019 11:21:18 -0400 "Jason J. Herne" <[email protected]>…
This is to support booting from vfio-ccw dasd devices. We basically implement the real hardware ipl procedure. This allows for booting Linux guests on vfio-ccw devices.
vfio-ccw's channel program prefetch algorithm complicates ipl because most ipl channel programs dynamically modify themselves. Details on the ipl process and how we worked around this issue can be found in
docs/devel/s390-dasd-ipl.txt.Quoted 6 lines
*********************
NOTE: Newer DASD units which initially present as control unit type 3990 may in fact really be 2107. Some operating systems may enable 2107 features for these devices thereby making sense id return a control unit type of 2107. I've added support for control unit type 2107 so we can ipl from these devices.
*********************
Quoted 5 lines
Ugh. I'd have hoped that would have been recognized as A Bad Idea the last time we had a design like that...
Does that cu type switch persist over subchannel enable/disable? Subsystem reset?
It persists over a disable/enable, but not a reset it seems.
Signature · 1 line
-- Jason J. Herne ([email protected])
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v4 00/15] s390: vfio-ccw dasd ipl support
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
t [tag update] patchew/[email protected] -> patchew/[email protected]
t [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'28d0ad5902 s390-bios: Support booting from real dasd device 9863aa7f1a s390-bios: Add channel command codes/structs needed for dasd-ipl a1ed77d45c s390-bios: Use control unit type to determine boot method 860ce9f087 s390-bios: Refactor virtio to run channel programs via cio 0b90862497 s390-bios: cio error handling4a5815fd2d s390-bios: Support for running format-0/1 channel programs 6f541fc6ff s390-bios: ptr2u32 and u32toptr5a73c3809c s390-bios: Map low core memoryb6fdd420ca s390-bios: Decouple channel i/o logic from virtio ef25638533 s390-bios: Clean up cio.h83ad1a9aaa s390-bios: Factor finding boot device out of virtio code path cc5a61d5ce s390-bios: Extend find_dev() for non-virtio devices e500fc51bf s390-bios: decouple common boot logic from virtio aa95743df7 s390-bios: decouple cio setup from virtioe57421e58c s390 vfio-ccw: Add bootindex property and IPLB data
=== OUTPUT BEGIN ===
1/15 Checking commit e57421e58ca0 (s390 vfio-ccw: Add bootindex property and IPLB data)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #220:
new file mode 100644
total: 0 errors, 1 warnings, 199 lines checked
Patch 1/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/15 Checking commit aa95743df7d3 (s390-bios: decouple cio setup from virtio) 3/15 Checking commit e500fc51bff8 (s390-bios: decouple common boot logic from virtio)
ERROR: externs should be avoided in .c files
#31: FILE: pc-bios/s390-ccw/main.c:19:
+IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
total: 1 errors, 0 warnings, 65 lines checked
Patch 3/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/15 Checking commit cc5a61d5ce83 (s390-bios: Extend find_dev() for non-virtio devices) 5/15 Checking commit 83ad1a9aaa66 (s390-bios: Factor finding boot device out of virtio code path) 6/15 Checking commit ef25638533aa (s390-bios: Clean up cio.h)
7/15 Checking commit b6fdd420cac1 (s390-bios: Decouple channel i/o logic from virtio)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#29:
new file mode 100644
total: 0 errors, 1 warnings, 123 lines checked
Patch 7/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
8/15 Checking commit 5a73c3809c0a (s390-bios: Map low core memory)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #36:
new file mode 100644
total: 0 errors, 1 warnings, 104 lines checked
Patch 8/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
9/15 Checking commit 6f541fc6ff3c (s390-bios: ptr2u32 and u32toptr)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #17:
new file mode 100644
total: 0 errors, 1 warnings, 31 lines checked
Patch 9/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/15 Checking commit 4a5815fd2dc3 (s390-bios: Support for running format-0/1 channel programs)
ERROR: trailing whitespace
#137: FILE: pc-bios/s390-ccw/cio.c:145:
+ * active (generating i/o interrupts). $
total: 1 errors, 0 warnings, 375 lines checked
Patch 10/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
11/15 Checking commit 0b90862497ba (s390-bios: cio error handling)
12/15 Checking commit 860ce9f0871d (s390-bios: Refactor virtio to run channel programs via cio)
WARNING: line over 80 characters
#103: FILE: pc-bios/s390-ccw/virtio.c:298:
+ run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
WARNING: line over 80 characters
#116: FILE: pc-bios/s390-ccw/virtio.c:308:
+ run_ccw(vdev, CCW_CMD_WRITE_STATUS, &status, sizeof(status), false) == 0,
total: 0 errors, 2 warnings, 107 lines checked
Patch 12/15 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
13/15 Checking commit a1ed77d45c63 (s390-bios: Use control unit type to determine boot method) 14/15 Checking commit 9863aa7f1a32 (s390-bios: Add channel command codes/structs needed for dasd-ipl) 15/15 Checking commit 28d0ad590207 (s390-bios: Support booting from real dasd device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26:
new file mode 100644
total: 0 errors, 1 warnings, 448 lines checked
Patch 15/15 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]