diff mbox series

[kvm-unit-tests,GIT,PULL,16/22] s390x: uv-host: fix allocation of UV memory

Message ID 20221025114345.28003-17-imbrenda@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: tests and fixes for PV, timing | expand

Commit Message

Claudio Imbrenda Oct. 25, 2022, 11:43 a.m. UTC
Allocate the donated storage with 1M alignment from the normal pool, to
force it to be above 2G without wasting a whole 2G block of memory.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-Id: <20221020123143.213778-3-imbrenda@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
---
 s390x/uv-host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/s390x/uv-host.c b/s390x/uv-host.c
index 191e8b3f..9f09f80e 100644
--- a/s390x/uv-host.c
+++ b/s390x/uv-host.c
@@ -504,7 +504,7 @@  static void test_init(void)
 	struct psw psw;
 
 	/* Donated storage needs to be over 2GB */
-	mem = (uint64_t)memalign(1UL << 31, uvcb_qui.uv_base_stor_len);
+	mem = (uint64_t)memalign_pages_flags(SZ_1M, uvcb_qui.uv_base_stor_len, AREA_NORMAL);
 
 	uvcb_init.header.len = sizeof(uvcb_init);
 	uvcb_init.header.cmd = UVC_CMD_INIT_UV;