qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [qemu-s390x] [PATCH v5 01/15] s390 vfio-ccw: Add bootin


From: Thomas Huth
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH v5 01/15] s390 vfio-ccw: Add bootindex property and IPLB data
Date: Tue, 26 Mar 2019 13:49:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0

On 13/03/2019 17.31, Jason J. Herne wrote:
> 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.
> 
> Signed-off-by: Jason J. Herne <address@hidden>
> Acked-by: Halil Pasic <address@hidden>
> Reviewed-by: Cornelia Huck <address@hidden>
> ---
[...]
> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
> index 896888b..2307e5b 100644
> --- a/hw/s390x/ipl.c
> +++ b/hw/s390x/ipl.c
> @@ -19,6 +19,7 @@
>  #include "hw/loader.h"
>  #include "hw/boards.h"
>  #include "hw/s390x/virtio-ccw.h"
> +#include "hw/s390x/vfio-ccw.h"
>  #include "hw/s390x/css.h"
>  #include "hw/s390x/ebcdic.h"
>  #include "ipl.h"
> @@ -305,16 +306,36 @@ static void s390_ipl_set_boot_menu(S390IPLState *ipl)
>      *timeout = cpu_to_be32(splash_time);
>  }
>  
> -static CcwDevice *s390_get_ccw_device(DeviceState *dev_st)
> +#define CCW_DEVTYPE_NONE        0x00
> +#define CCW_DEVTYPE_VIRTIO      0x01
> +#define CCW_DEVTYPE_VIRTIO_NET  0x02
> +#define CCW_DEVTYPE_SCSI        0x03
> +#define CCW_DEVTYPE_VFIO        0x04

Could be an enum, too... but #defines are OK, too.

[...]
> diff --git a/include/hw/s390x/vfio-ccw.h b/include/hw/s390x/vfio-ccw.h
> new file mode 100644
> index 0000000..2fceaa2
> --- /dev/null
> +++ b/include/hw/s390x/vfio-ccw.h
> @@ -0,0 +1,28 @@
> +/*
> + * vfio based subchannel assignment support
> + *
> + * Copyright 2017 IBM Corp.

Maybe bump the year to 2019 ?

> + * Author(s): Dong Jia Shi <address@hidden>
> + *            Xiao Feng Ren <address@hidden>
> + *            Pierre Morel <address@hidden>
> + *
> + * 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

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]