diff options
author | Dominik Dingel <dingel@linux.vnet.ibm.com> | 2013-06-17 14:29:42 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-07-29 12:02:00 +0200 |
commit | c8cda8748eceeeb06f1952e7e765a0919103644d (patch) | |
tree | 952bf455241b43d691f853fef6c5338e1130b709 /pc-bios/s390-ccw/virtio.c | |
parent | 461bdb3414c40d6806194bf68c91521496b1042d (diff) |
s390/IPL: Allow boot from other ssid than 0
We now take the subchannel set id also into account to find the boot device.
If we want to use a subchannel set other than the default set 0, we first
need to enable the mss facility.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'pc-bios/s390-ccw/virtio.c')
-rw-r--r-- | pc-bios/s390-ccw/virtio.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c index f438af15aa..49f2d291fc 100644 --- a/pc-bios/s390-ccw/virtio.c +++ b/pc-bios/s390-ccw/virtio.c @@ -13,6 +13,8 @@ struct vring block; +static char chsc_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); + static long kvm_hypercall(unsigned long nr, unsigned long param1, unsigned long param2) { @@ -301,3 +303,19 @@ bool virtio_is_blk(struct subchannel_id schid) return true; } +int enable_mss_facility(void) +{ + int ret; + struct chsc_area_sda *sda_area = (struct chsc_area_sda *) 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; +} |