From nobody Sat Nov 23 23:01:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=oracle.com); dmarc=fail(p=reject dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1729633045; cv=pass; d=zohomail.com; s=zohoarc; b=AQPNIIs+do+HGonN8BoV5fvsQ5TTRTQCdTDgrzloeZiEGoZh09l+mC9F9BqPACkYaSwVsoKzNAB3Rdu2O25gzg2mr1rFz0ni10NIU4+sSIaCfoQNr/ju0mN5e6NsVBzGttAoJe62C4yNKZDlXneoYJx4HQtH+htYCuotQQklLtI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729633045; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yA5SGXqxap0vZEqvFgb2qBzg1DPOrZyTVMAb7dTFU+I=; b=P9T/bscIcfqAwZLoudu08vC1VHqO8WkClwCbdB4zdIbvqkc2M3O/1WxA/Y8pQUhQYiVlo3bduC2lMqSwXSvblhQB/BykpFxSLLg3rEiF1IT6G/OQQjGIAs3dVz9Guh/i7HX/VOT/6lSXokdpYMOb6vsE/i6lmTht/d93bBuLa78= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=oracle.com); dmarc=fail header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1729633045014509.0621916697356; Tue, 22 Oct 2024 14:37:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3MXI-0004xc-00; Tue, 22 Oct 2024 17:35:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3MXF-0004we-TS; Tue, 22 Oct 2024 17:35:25 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3MXD-0006jM-QU; Tue, 22 Oct 2024 17:35:25 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49MLQbwR022771; Tue, 22 Oct 2024 21:35:19 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42c5aserat-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Oct 2024 21:35:18 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 49ML4swM020265; Tue, 22 Oct 2024 21:35:17 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2044.outbound.protection.outlook.com [104.47.57.44]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 42c37egyk2-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Oct 2024 21:35:17 +0000 Received: from CH3PR10MB7329.namprd10.prod.outlook.com (2603:10b6:610:12c::16) by SA2PR10MB4809.namprd10.prod.outlook.com (2603:10b6:806:113::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:35:15 +0000 Received: from CH3PR10MB7329.namprd10.prod.outlook.com ([fe80::f238:6143:104c:da23]) by CH3PR10MB7329.namprd10.prod.outlook.com ([fe80::f238:6143:104c:da23%4]) with mapi id 15.20.8069.027; Tue, 22 Oct 2024 21:35:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=yA5SGXqxap0vZEqvFgb2qBzg1DPOrZyTVMAb7dTFU+I=; b= AijDQy9HETJv8Z+3jEHPjMwWyYE4cWIg0eLgu5jap0IRZvmxRkjKOzY9FU2T29aB UF5eISVW+pyA9gyvQwXkT0RoLh/eYG4Hc19vxdjfqIW7ijJtVC1JAyCbwzf+rpNn eh/gO8aPeOKoXR95lspD26uayMKFDqrGlbUQ38mEGnwrYwxaesm46QsiIt/YMYkD SW6zhEKYlaU3pFC9iQNJ7Rs4jb6Syt7VjU8YBOGj7fKx5fVQLsP9BtKgVHyBKd3S Jwh/oGYlWGXEt9RgEcboc0NaNIyms0HkG4AWLGuEzU0v3pDTecGRfQvNUDVupfxS bKPAm0nAByg1ww1aiQPR3w== ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oZnc0fa9EAUwUmeuM9u2GQZxsjB2K1vgUWeg8388d6b/yOGIzrIRSsCFtyapxJ4LhVv1pyhqZEXahb9sImhHKtmpK+un0r+ii0CS/Mf0gJKY4Ki3EAgRmzeK1lsAxbu7NCw7Hf4/7tQ23h7UEqKMRJJIQi1owSjyPXTfrkKlgKp4LFDvnmxvrC0tF6TJVT62uT/Xlc8TQFYOkFxL4aswhCURH5o77hAI8FyuT/bfvPB6FrjcgynuOdsCsEwi2vnfWfiL6yByFoXySrVFTrRrhK5ibndss4y5MoeZPCjn4PAMqacG7VpeufR0w0/Hv69oWhfAztyok0MszZ+TwcK+Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=yA5SGXqxap0vZEqvFgb2qBzg1DPOrZyTVMAb7dTFU+I=; b=ZfILI5HhsuPRUjt/9uI4QRsl5gbzjhrSTwJNj/T72+JmS6IckybirzIzyfRBvKujCCMcjqdYhUd/I90fewqVKmyUxyVtCwAwak+xF7O1HVYjMjpd6lsI8h4VJZ4yvxUNRzrAy8byxxfQ3h1t3SHmkqpQzCtYUHDQA7QViuNSiMHVgWdJgzQDZXUWlO0tlPlk10kSUeSKIbR2Zq24iJSn54jmYr38mmO3xqYj26SqpujsSMvGPEcd3lXfa1Tw/yP4k59vETCjkePrJbHJ+LKbIWeWRwAliZNCzAM/3EkeawhhwqY9qVsfve0txOxn3TKeX1/EvDBwY79glsjWFpGcbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yA5SGXqxap0vZEqvFgb2qBzg1DPOrZyTVMAb7dTFU+I=; b=Z7QMbKt1sTLBUj7Iz/dSf9dc9xEIf5OVw+Xe6/b1i7B4x8ST7xXd2H2DiuopKVhNtHINYicD1MQM78v03njBtiUyg0wYg9SaRYE/Uvgj9j4+obzaA57z90I8YLhWrGsqfB/gr0OLIOHUJfeG1ijoSZnGB6W7gx4bLeQMcNVzBPU= From: =?UTF-8?q?=E2=80=9CWilliam=20Roche?= To: peterx@redhat.com, david@redhat.com, pbonzini@redhat.com, richard.henderson@linaro.org, philmd@linaro.org, peter.maydell@linaro.org, mtosatti@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: william.roche@oracle.com, joao.m.martins@oracle.com Subject: [PATCH v1 3/4] system/physmem: Largepage punch hole before reset of memory pages Date: Tue, 22 Oct 2024 21:35:02 +0000 Message-ID: <20241022213503.1189954-4-william.roche@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241022213503.1189954-1-william.roche@oracle.com> References: <20241022213503.1189954-1-william.roche@oracle.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BN9PR03CA0971.namprd03.prod.outlook.com (2603:10b6:408:109::16) To CH3PR10MB7329.namprd10.prod.outlook.com (2603:10b6:610:12c::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR10MB7329:EE_|SA2PR10MB4809:EE_ X-MS-Office365-Filtering-Correlation-Id: 49084a3a-3a25-4ecf-60f3-08dcf2e16ace X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|7416014|366016|1800799024|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?52m4ycQxcOLGWK3JwN0NJR7gNcxCHZwtO18QVRJz7S0xbMufbcrkjwgdchga?= =?us-ascii?Q?2J89DKfAmpg2hWk3NmGfcQJ/fFzk1+fBQ7DNbdov+ZcAsRin9NsjRD21hMaK?= =?us-ascii?Q?GCt2si8t7GlBL/Z8v7HrBOcqItxXsnxmC6upuLsUuj38E/oFiaQoHtZHveCS?= =?us-ascii?Q?VdL0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39eMpYYeKnUmwTVmyQuurjV?= =?us-ascii?Q?ZuRZsEhDQRmh8EDoxsllCivFt4Ln8v4XJ09zDVA6GGoXRCfwMfP4QycvPSrA?= =?us-ascii?Q?IqqGwqpQkVcZWfapu8nZP5JTUgP8jfyYoB2ztLfA0Jwj1sVFvUNkYrp/68Qh?= =?us-ascii?Q?j8Bj2vbQvKMIpIlgKLv1FPjsxO6URNCE+jp0DNT5CiyygD7cRwQkNvlJEpxB?= =?us-ascii?Q?ADhhhrym2LywMBCk/bY2hK/+xnBd4ham2IfxNELqaO41azSyZ4RSF2TIAQgE?= =?us-ascii?Q?ikX24ZbkFX9cAY6WVl+AgOpBSD+HX4k2H+YszpYbxba7FtyGX+zIRTe04KDZ?= =?us-ascii?Q?ZA+U+zM=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR10MB7329.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(7416014)(366016)(1800799024)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?4+HZsTy5oSttN001piD2iQQTAANs6hGctJaX1UeCe5vI6dEUQRB5xa8wXTbz?= =?us-ascii?Q?wbEsk65tSdjTPusWgyaDnivMTrI6xE9Ev5FCvYfmQJJvZqZqttjBuUOU7z2O?= =?us-ascii?Q?43MrEkuO2U/l27ZzXWWXqS9F6/qz/7pySA52PPTU37/WkZGb/EJ4xETp4RYe?= =?us-ascii?Q?0Nv1fdIHxhljN6UAuSUe4J818lVBc4GBQ2LXljLOnsrj022JBx0YO7JXV4fH?= =?us-ascii?Q?Ij1xR4lYGgnrW1r5ZwZjXag8K1LoOWjLKPqfMM45NqzwuHBUffeyQ+bYBzQp?= =?us-ascii?Q?GgDcnBi7gNkKTeUJKvD7R2fEZYacB6n6aSMcXV9USWlZDMBxSPGm/m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e3vxOJNKo/LifE0haNV0ZW62ApSkY4eda/9?= =?us-ascii?Q?tL9C2LSxb6B91VXkxrrnhJxWdPGoshZj0FKTsz8A1Vb3kkmV0h7e+nnznzm3?= =?us-ascii?Q?cVFG3+e6/rq1ThVmFFhj9SLXHQL6EeE1GBmyNOakxPe5CpRr/8Tm4lHH+DVk?= =?us-ascii?Q?g8C3MHaaed2gBtU/3/NPm8XjdfT3BEEvgiUPDFykDBnSceGtMBc2pZfGqb6Z?= =?us-ascii?Q?x04NlZjChHba094px4w15/I+0SRUKwIx8+3uor9FMk5DnYTcK928195YAuKv?= =?us-ascii?Q?HtuCDAwkrPr6w/5tgCoSwRNq8Mw0/uRWpz180NABjhk+7f3/0+JMexLgVhHO?= =?us-ascii?Q?qfScqW9+8cAlCsY7DkaSoV9Pmi7nBrxOexkBO7dlpqn644dyvC7QQRVuKcjx?= =?us-ascii?Q?qA=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: SmMfP8Gm9nLBRFI52+M452qF77n4o6Po6HtTg67lJxMtXDcg/072zEpyZxJ+vcqb/ZZi5ESPHZN6oxGJNz97uavzaMR/MPVaXxphLtIy37VGETy3eHM18Z4RsjltQa7ljSlWtHzj4QfIrwTfeO8PYR/cXovhtlLq3UU2nPZZ593ymTdyNUYLzb3IBUt585P0NyuLF8R2xmsyurQpMkhFuE+SHNMLqUAfNRCH+5m8Ph9Uo2202xm0d2otPwVkD87QuoQQ3fYilWn0t4XCmGJTy2WwAgE8nf5wwe8jcVGASFPWkFI0EQmKNFS4ZN1rzRxLEMG87BnneEG0dFApY2xmzul/mOov8UtzoIf708sfO4cUpKf27ZzqOp2lUIRSfzWs6Od4jSzkGDdAE8sZYfhON14nP6mokZ7a5RmtkRDSkOKF5d0huq8gd2jjyirFVwdAbvouVwEqRE7cJRyGvQkkUFCA4dorMd+7p3G+gkxqL29LLf2XA9sCs/PrUepF5d7hPpvModFBUlRrK+y/5E/P0d/treeYPcP4cYV6nsiCqtq79cmXy5Fal5G8NZW6VIYGibG1fZckkZGOh86pdpniPEJ35zKvQki8rKh3mmlrpt8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49084a3a-3a25-4ecf-60f3-08dcf2e16ace X-MS-Exchange-CrossTenant-AuthSource: CH3PR10MB7329.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:35:15.4930 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hYl6350lDZOgQhzKx3WbgaD2SGh1IglWwFsBMaUKfKZDJLaMPNiotjsluY+W8l1Y4v0Buu2BLwaay6GLx+q8zjz+UY64A/G0KD2YFPoGf7o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4809 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-22_23,2024-10-22_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 mlxscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2410220140 X-Proofpoint-GUID: YoTjuLtpRFYnHesFQiS80yYBVEGzU_c2 X-Proofpoint-ORIG-GUID: YoTjuLtpRFYnHesFQiS80yYBVEGzU_c2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.220.165.32; envelope-from=william.roche@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_PH_BODY_ACCOUNTS_PRE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @oracle.onmicrosoft.com) X-ZM-MESSAGEID: 1729633046751116600 Content-Type: text/plain; charset="utf-8" From: William Roche When the VM reboots, a memory reset is performed calling qemu_ram_remap() on all hwpoisoned pages. While we take into account the recorded page sizes to repair the memory locations, a large page also needs to punch a hole in the backend file to regenerate a usable memory, cleaning the HW poisoned section. This is mandatory for hugetlbfs case for example. Signed-off-by: William Roche --- system/physmem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system/physmem.c b/system/physmem.c index 3757428336..3f6024a92d 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2211,6 +2211,14 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t leng= th) prot =3D PROT_READ; prot |=3D block->flags & RAM_READONLY ? 0 : PROT_WRITE; if (block->fd >=3D 0) { + if (length > TARGET_PAGE_SIZE && fallocate(block->fd, + FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, + offset + block->fd_offset, length) !=3D 0) { + error_report("Could not recreate the file hole for= " + "addr: " RAM_ADDR_FMT "@" RAM_ADDR_FM= T "", + length, addr); + exit(1); + } area =3D mmap(vaddr, length, prot, flags, block->fd, offset + block->fd_offset); } else { --=20 2.43.5