mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
KVM: s390: consider system MHA for guest storage
Verify that the guest maximum storage address is below the MHA (maximum host address) value allowed on the host. Acked-by: Michael Holzheu <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Signed-off-by: Guenther Hutzl <[email protected]> Signed-off-by: Dominik Dingel <[email protected]> [adopt to match recent limit,size changes] Signed-off-by: Christian Borntraeger <[email protected]>
This commit is contained in:
parent
a3a92c31bf
commit
32e6b236d2
2 changed files with 12 additions and 2 deletions
|
|
@ -40,7 +40,8 @@ struct read_info_sccb {
|
|||
u8 fac85; /* 85 */
|
||||
u8 _pad_86[91 - 86]; /* 86-90 */
|
||||
u8 flags; /* 91 */
|
||||
u8 _pad_92[100 - 92]; /* 92-99 */
|
||||
u8 _pad_92[99 - 92]; /* 92-98 */
|
||||
u8 hamaxpow; /* 99 */
|
||||
u32 rnsize2; /* 100-103 */
|
||||
u64 rnmax2; /* 104-111 */
|
||||
u8 _pad_112[116 - 112]; /* 112-115 */
|
||||
|
|
@ -120,6 +121,11 @@ static void __init sclp_facilities_detect(struct read_info_sccb *sccb)
|
|||
sclp.rzm <<= 20;
|
||||
sclp.ibc = sccb->ibc;
|
||||
|
||||
if (sccb->hamaxpow && sccb->hamaxpow < 64)
|
||||
sclp.hamax = (1UL << sccb->hamaxpow) - 1;
|
||||
else
|
||||
sclp.hamax = U64_MAX;
|
||||
|
||||
if (!sccb->hcpua) {
|
||||
if (MACHINE_IS_VM)
|
||||
sclp.max_cores = 64;
|
||||
|
|
|
|||
Loading…
Reference in a new issue