From patchwork Tue Oct 18 14:09:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Imbrenda X-Patchwork-Id: 13010612 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 868B0C4332F for ; Tue, 18 Oct 2022 14:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbiJROKr (ORCPT ); Tue, 18 Oct 2022 10:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbiJROKW (ORCPT ); Tue, 18 Oct 2022 10:10:22 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABBA6360A9 for ; Tue, 18 Oct 2022 07:10:10 -0700 (PDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29IDbe7w005949 for ; Tue, 18 Oct 2022 14:10:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=8yj/nftUkrIztaV+qZCv6+oq0Q39uhW/sEM8Gxwv0B0=; b=PuDyTht0jmAWiq/nsCv9bn3aQ60GYql+0j9AA96oiGjIGuK6+7PtD9xkfKBSnsnzPpg/ XtJRIE3P2duU74kjXH+8VH4FVHrG6GguC2UKB4NXoLDxql5FqHpGG/YtBA6Dg/2fHjwa eTdo0PjMWdTm8NabZ1jy+sZRZhhc+DBDMslKV6ehEgHjFKCQ8qyePLhyWGaRDM6HQx7o siggQilhtTiAjxsbKVmhtkTicmOa+u/5MqLG1mPRztzrVkAUbjopOLSjw2O/9Z644OU6 N1I8aJJPt4t56xBAcUFSIyHcjcCvfsbfLH4NDxfBTgBEsoOBgcdGKJLGxRRxWnhvb4wQ lw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k9vrra9vg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Oct 2022 14:10:06 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29IDvaU8004025 for ; Tue, 18 Oct 2022 14:10:05 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k9vrra9u1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Oct 2022 14:10:05 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29IE58Pn029926; Tue, 18 Oct 2022 14:10:04 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3k7mg95d9h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Oct 2022 14:10:04 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29IEAXvo45744478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Oct 2022 14:10:33 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EEFF342049; Tue, 18 Oct 2022 14:10:00 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 918A342042; Tue, 18 Oct 2022 14:10:00 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.8.239]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 18 Oct 2022 14:10:00 +0000 (GMT) From: Claudio Imbrenda To: kvm@vger.kernel.org Cc: frankja@linux.ibm.com, nrb@linux.ibm.com, seiden@linux.ibm.com, scgl@linux.ibm.com, thuth@redhat.com Subject: [kvm-unit-tests PATCH v1 2/2] s390x: uv-host: fix allocation of UV memory Date: Tue, 18 Oct 2022 16:09:51 +0200 Message-Id: <20221018140951.127093-3-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221018140951.127093-1-imbrenda@linux.ibm.com> References: <20221018140951.127093-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: xhiqf6t0kcTcRpZKjgVksScfahTDnjzW X-Proofpoint-ORIG-GUID: C5P4bHUkWOnM_6-pVk_QLCPz9uMWGsWH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-18_04,2022-10-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 spamscore=0 mlxscore=0 phishscore=0 adultscore=0 malwarescore=0 suspectscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210180080 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 Reviewed-by: Janosch Frank --- s390x/uv-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390x/uv-host.c b/s390x/uv-host.c index a1a6d120..e1fc0213 100644 --- a/s390x/uv-host.c +++ b/s390x/uv-host.c @@ -329,7 +329,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;