mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
s390/sclp: introduce checks for ESCA and HVS
Introduce sclp.has_hvs and sclp.has_esca to provide a way for kvm to check whether the extended-SCA and the home-virtual-SCA facilities are available. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
71f116bfed
commit
f7ba1d3426
@ -53,6 +53,8 @@ struct sclp_info {
|
|||||||
unsigned char has_sigpif : 1;
|
unsigned char has_sigpif : 1;
|
||||||
unsigned char has_core_type : 1;
|
unsigned char has_core_type : 1;
|
||||||
unsigned char has_sprp : 1;
|
unsigned char has_sprp : 1;
|
||||||
|
unsigned char has_hvs : 1;
|
||||||
|
unsigned char has_esca : 1;
|
||||||
unsigned int ibc;
|
unsigned int ibc;
|
||||||
unsigned int mtid;
|
unsigned int mtid;
|
||||||
unsigned int mtid_cp;
|
unsigned int mtid_cp;
|
||||||
|
@ -43,7 +43,10 @@ struct read_info_sccb {
|
|||||||
u8 _pad_92[100 - 92]; /* 92-99 */
|
u8 _pad_92[100 - 92]; /* 92-99 */
|
||||||
u32 rnsize2; /* 100-103 */
|
u32 rnsize2; /* 100-103 */
|
||||||
u64 rnmax2; /* 104-111 */
|
u64 rnmax2; /* 104-111 */
|
||||||
u8 _pad_112[120 - 112]; /* 112-119 */
|
u8 _pad_112[116 - 112]; /* 112-115 */
|
||||||
|
u8 fac116; /* 116 */
|
||||||
|
u8 _pad_117[119 - 117]; /* 117-118 */
|
||||||
|
u8 fac119; /* 119 */
|
||||||
u16 hcpua; /* 120-121 */
|
u16 hcpua; /* 120-121 */
|
||||||
u8 _pad_122[4096 - 122]; /* 122-4095 */
|
u8 _pad_122[4096 - 122]; /* 122-4095 */
|
||||||
} __packed __aligned(PAGE_SIZE);
|
} __packed __aligned(PAGE_SIZE);
|
||||||
@ -108,6 +111,8 @@ static void __init sclp_facilities_detect(struct read_info_sccb *sccb)
|
|||||||
sclp.facilities = sccb->facilities;
|
sclp.facilities = sccb->facilities;
|
||||||
sclp.has_sprp = !!(sccb->fac84 & 0x02);
|
sclp.has_sprp = !!(sccb->fac84 & 0x02);
|
||||||
sclp.has_core_type = !!(sccb->fac84 & 0x01);
|
sclp.has_core_type = !!(sccb->fac84 & 0x01);
|
||||||
|
sclp.has_esca = !!(sccb->fac116 & 0x08);
|
||||||
|
sclp.has_hvs = !!(sccb->fac119 & 0x80);
|
||||||
if (sccb->fac85 & 0x02)
|
if (sccb->fac85 & 0x02)
|
||||||
S390_lowcore.machine_flags |= MACHINE_FLAG_ESOP;
|
S390_lowcore.machine_flags |= MACHINE_FLAG_ESOP;
|
||||||
sclp.rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2;
|
sclp.rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2;
|
||||||
|
Loading…
Reference in New Issue
Block a user