From nobody Fri May 17 02:03:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1674479503; cv=pass; d=zohomail.com; s=zohoarc; b=kX0S6B080hlEuWJXBkuNpHJ/i4Sn0ffwo5DkCquQO9F8+n44Rgwshjh5yn/lt0gqUvFFiOaJlHalHRDEZevD8itFRV3xfbtLVes2IXM6/F3ehLZ0L73bdYi0c/d1/YH1GEqJiRd9Xn2kWosQ0RUveRzV5OWE1uNyrxqblZHq7CU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674479503; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=1S9RGzAXZbvL+p2nKWN2tHznjQW89E7pjL+KiBsk+Tw=; b=QDjY7QNUNNVbbVh9Sol8+r8AC/iNHIE5ByyuzfJUWEZi5zvqwnCvgaa9iAGW+3XUX2JVrEifEErB31aAfBeyNg5VTYjNExdUjAbD8zTnXvXCK5OL3E3PNuvmjPrvW1eW48ZI5XgYfC6EEEsPA8au5WSJbfQJNDh30gr0NOnf5WQ= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1674479502555705.1872636102883; Mon, 23 Jan 2023 05:11:42 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.482837.748567 (Exim 4.92) (envelope-from ) id 1pJwb7-0000x8-4C; Mon, 23 Jan 2023 13:10:53 +0000 Received: by outflank-mailman (output) from mailman id 482837.748567; Mon, 23 Jan 2023 13:10:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pJwb7-0000x1-1Q; Mon, 23 Jan 2023 13:10:53 +0000 Received: by outflank-mailman (input) for mailman id 482837; Mon, 23 Jan 2023 13:10:51 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pJwb5-0000wv-Q0 for xen-devel@lists.xenproject.org; Mon, 23 Jan 2023 13:10:51 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2057.outbound.protection.outlook.com [40.107.237.57]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5a5e65d9-9b1f-11ed-b8d1-410ff93cb8f0; Mon, 23 Jan 2023 14:10:49 +0100 (CET) Received: from MW4P221CA0028.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::33) by CH3PR12MB8260.namprd12.prod.outlook.com (2603:10b6:610:12a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Mon, 23 Jan 2023 13:10:46 +0000 Received: from CO1NAM11FT073.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8b:cafe::3) by MW4P221CA0028.outlook.office365.com (2603:10b6:303:8b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33 via Frontend Transport; Mon, 23 Jan 2023 13:10:46 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1NAM11FT073.mail.protection.outlook.com (10.13.174.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6023.16 via Frontend Transport; Mon, 23 Jan 2023 13:10:44 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 23 Jan 2023 07:10:42 -0600 Received: from XIR-MICHALO-L1.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Mon, 23 Jan 2023 07:10:41 -0600 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5a5e65d9-9b1f-11ed-b8d1-410ff93cb8f0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XaxQRjwEKlCKIYQSHei0VjDhCk87oT9CA2qD/R/ubt5m64r2zEK4+6Dq/3EGuF4tjwHy37ZbtB0IAdIR3znkZrAsKpvL5AObv0c5Cp4JSeMgaRpF0dYY8yb5IREWyvnaLfWdXgfNh6bTNDVGsSfJz+Hrc9PMb5K8ZFdpjcia3ZQjv5qz1V7qI0n9aH0TAZnKmew9DxSj8gyllwL7U8UABRwywCyXqqcfM4FtHi5TWgrq3D2oJmGv/WIumRC9jxoPbCctl5ocgVySBOSLNdOC/C0nYs45hzWBZHPn8Dy1Byj2/EwyvqTGnLyLpdW+SOoIAMa/10qdKKAZJm+wgR482A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1S9RGzAXZbvL+p2nKWN2tHznjQW89E7pjL+KiBsk+Tw=; b=gr2rEoa+oF01X5JHjJcBrgDi6xZ16bzHNomBRCinWcNTIY0UUMr4bMPP7T/3igT117yAS59+3xaasTOnS/jpH7ltmRsfvzXA8JZQWzeNUTy6mzzka7a657g6d6j3oDmhGR/5O4XJIwI/IWMrHIak2i65U/DBt26RHqCGrJ7mSxu2Q0SvHaZ+58bMjhD2AeOvSCCdeSwSUXnsZQ3fsI6akUqWc63JJ/tpv80UlRNE+fuxeuS6RDtvBqlEw3xHutCdPDp+ydSAfzk2QTlY1TDvsg289Ag7cM6S/LplUUZHMdG2vSppdUxdp2tPU0GfnZGwEZ3j8Eu77bWwd+7xqmx+GA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1S9RGzAXZbvL+p2nKWN2tHznjQW89E7pjL+KiBsk+Tw=; b=b3Ucyh5ZAyz6pn6dCkpASVKNhYR9j3f+d5obb+xi56jhK0l1bWO8XX4KTWLMAe9td4XfJE5T9tXUjTr/pknnmf0pTwqhW9Woo9aIbmBD+l0NVSv6lmFglmpRMliwQ8Vjuj0LjYC03L96ZdDHWL6rvoVxAGHUuy0JOOx76/EJgn8= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Michal Orzel To: CC: Michal Orzel , Doug Goldstein , Stefano Stabellini , , Subject: [PATCH] automation: Modify static-mem check in qemu-smoke-dom0less-arm64.sh Date: Mon, 23 Jan 2023 14:10:23 +0100 Message-ID: <20230123131023.9408-1-michal.orzel@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT073:EE_|CH3PR12MB8260:EE_ X-MS-Office365-Filtering-Correlation-Id: a0d13261-ea34-43a9-4a8e-08dafd433ca6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4ID1OK+19kbj+uP/F4R5D7MaVYC3DpcTiRKoc3UZJjMZ/xKxrvZx+cIjagXiRlkFzB9mUyRlZM6UZWRJnlFB/xM+n6oZh1+jxo7P6kNTr2+GYdKl9t6s81QELPNXHvfkd5D0xYLZtIkKZscfDnV1lFKDkEAfaWQr2i93HTn7XHWXAPxpQla7pzU3CcJk4VtNjCTAvsdYZb0lHaFoRSXqb70ZLAPLhCIJid6ptiSdByIk/UEFYPrTeW/B6jHx7FDYuggL4E4RvCRzkG7gNrZuzPZVcb6GR/p8eD6B3zkOl/ATTmO28HUvprNO7ql4OAKc5nrS+yRIXq50AjiPJ+QV3Ft267H6xJ9bWw4DIqtzO0JD2s6EoNOn9temOJ7k6DSHNPS3FeA8pqRirKMugF4seuEOVoFZAPL2IPpRC4RgEjq8/f80U1O1yTT6vWORZtPJsvDJtwiz+LFeuuIR/WSJJB9N84r1kcDco70wxm+YvtDOFCKtk0HltebtDodj3+NRUPF67N4wVqtUbG0IsPMmBoWsI1wbIWFNYelxGoLMFGuv8ThqqiyK/YjjZtXBmHT4dao4tydQM7678uhezhbQP4Q8fcAHJyrlqzTqd1gIDQ/1RDFSXTQxzX5tYVpmGJyT8i6yVBiqpmiMY2QBhOSyrEcJW9LMRyQ+s68C+0IUN1lZ3aI6wx1/cxUxa6d+EpYTvCFRSKrVdJcmL92MFoTaSvg8eYrwojZAV+f0DyDH+3vFT5b1D+8Kr4gBi3mxDV0KWzOi8s5k4R3AKJlL8TQqga42ue2LiDYKTMOJlUg5c/0= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(396003)(39860400002)(376002)(136003)(346002)(451199015)(46966006)(40470700004)(36840700001)(83380400001)(36860700001)(81166007)(82740400003)(41300700001)(86362001)(356005)(44832011)(2906002)(8936002)(5660300002)(4326008)(82310400005)(40460700003)(40480700001)(6916009)(8676002)(26005)(186003)(1076003)(6666004)(426003)(47076005)(336012)(316002)(70586007)(70206006)(54906003)(2616005)(478600001)(966005)(36756003)(36900700001)(139555002);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2023 13:10:44.6326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0d13261-ea34-43a9-4a8e-08dafd433ca6 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT073.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8260 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1674479504120100001 Content-Type: text/plain; charset="utf-8" At the moment, the static-mem check relies on the way Xen exposes the memory banks in device tree. As this might change, the check should be modified to be generic and not to rely on device tree. In this case, let's use /proc/iomem which exposes the memory ranges in %08x format as follows: - : This way, we can grep in /proc/iomem for an entry containing memory region defined by the static-mem configuration with "System RAM" description. If it exists, mark the test as passed. Also, take the opportunity to add 0x prefix to domu_{base,size} definition rather than adding it in front of each occurence. Signed-off-by: Michal Orzel Acked-by: Stefano Stabellini Reviewed-by: Ayan Kumar Halder Reviewed-by: Xenia Ragiadakou --- Patch made as part of the discussion: https://lore.kernel.org/xen-devel/ba37ee02-c07c-2803-0867-149c779890b6@amd.= com/ CC: Julien, Ayan --- automation/scripts/qemu-smoke-dom0less-arm64.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/s= cripts/qemu-smoke-dom0less-arm64.sh index 2b59346fdcfd..182a4b6c18fc 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -16,14 +16,13 @@ fi =20 if [[ "${test_variant}" =3D=3D "static-mem" ]]; then # Memory range that is statically allocated to DOM1 - domu_base=3D"50000000" - domu_size=3D"10000000" + domu_base=3D"0x50000000" + domu_size=3D"0x10000000" passed=3D"${test_variant} test passed" domU_check=3D" -current=3D\$(hexdump -e '16/1 \"%02x\"' /proc/device-tree/memory@${domu_ba= se}/reg 2>/dev/null) -expected=3D$(printf \"%016x%016x\" 0x${domu_base} 0x${domu_size}) -if [[ \"\${expected}\" =3D=3D \"\${current}\" ]]; then - echo \"${passed}\" +mem_range=3D$(printf \"%08x-%08x\" ${domu_base} $(( ${domu_base} + ${domu_= size} - 1 ))) +if grep -q -x \"\${mem_range} : System RAM\" /proc/iomem; then + echo \"${passed}\" fi " fi @@ -126,7 +125,7 @@ UBOOT_SOURCE=3D"boot.source" UBOOT_SCRIPT=3D"boot.scr"' > binaries/config =20 if [[ "${test_variant}" =3D=3D "static-mem" ]]; then - echo -e "\nDOMU_STATIC_MEM[0]=3D\"0x${domu_base} 0x${domu_size}\"" >> = binaries/config + echo -e "\nDOMU_STATIC_MEM[0]=3D\"${domu_base} ${domu_size}\"" >> bina= ries/config fi =20 if [[ "${test_variant}" =3D=3D "boot-cpupools" ]]; then --=20 2.25.1