mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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. Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com> Acked-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <1554388475-18329-2-git-send-email-jjherne@linux.ibm.com> [thuth: fixed "typedef struct VFIOCCWDevice" build failure with clang] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
532cc6da74
commit
44445d8668
6 changed files with 88 additions and 18 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue