From nobody Sun Nov 24 09:15:30 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=1725962650; cv=pass; d=zohomail.com; s=zohoarc; b=BMTqTRLk0mFSxeUuR1A3PHsa4TfkwY5drUx25RjHiDQIE6kTS9+H4AzM+Vhfn6mgY57KUo4orCZzmOE6f8ucWnJ333SzTmouv7sNeBZot8AOp105kkEqyE7nNMnrePJDKnp1CTO2BXajdxziw6R2y5TUNjBubfabpwxN+vDQ2ig= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725962650; 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=6zRKVP0wxYzEad+yxt0t268SLIx2OcpPGkov/2Pn12M=; b=VyzaSzZpLdB/tCY/Z15aWuvsRfU3eHmH2IgMRuvCcK6zUMTTKPueJDe3AZTX8fzYGi2H5EZlKSzU4F68frf4ZKPCnkMlKVZqLQG0D/Xp1Z306TwH8skMnE3EXJXA3zBB4Srq6lOura+ch4rrdOgmF5UnItRCsLoutxIo2KezqBw= 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 1725962650959380.2247716464973; Tue, 10 Sep 2024 03:04:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snxhr-00079D-PA; Tue, 10 Sep 2024 06:02:43 -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 1snxhp-00071S-Oc; Tue, 10 Sep 2024 06:02:41 -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 1snxhn-0001oI-T1; Tue, 10 Sep 2024 06:02:41 -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 48A9QVcH022346; Tue, 10 Sep 2024 10:02:37 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 41gfctd3yx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Sep 2024 10:02:36 +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 48AA0tjB019798; Tue, 10 Sep 2024 10:02:35 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 41gd9eugka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Sep 2024 10:02:35 +0000 Received: from CH3PR10MB7329.namprd10.prod.outlook.com (2603:10b6:610:12c::16) by PH0PR10MB5894.namprd10.prod.outlook.com (2603:10b6:510:14b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.10; Tue, 10 Sep 2024 10:02:32 +0000 Received: from CH3PR10MB7329.namprd10.prod.outlook.com ([fe80::f238:6143:104c:da23]) by CH3PR10MB7329.namprd10.prod.outlook.com ([fe80::f238:6143:104c:da23%5]) with mapi id 15.20.7939.010; Tue, 10 Sep 2024 10:02:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=6zRKVP0wxYzEad+yxt0t268SLIx2OcpPGkov/2Pn12M=; b= RlYYAb8UTzBVLAXWf57TivquzOqiFxRn9Ntq+xg28dbfqmCJ081JlM0r6qMwjwO9 +K5tPT+36Up+qOAeR6ZilRxV9MoxSGu4ulguMo7laFJWAI3Ijte/nwSa5oVnyZBA QYSrkiBxn2lq9HK8Pi9ubH+/083JGW2I4UAZWMMzvA7J+zGFFliSPXo+QaibydTD vZ9tPNJrSyg9hwWIvUVFDXI9pyPnKiz+gyrsZA47guOLxOQMHOrOwXA6OSVKGF3a DXkchcHgth8sMhZd6bd0O6KaO52WH8EvHChiMiMIH3PeDbJ2I0ErN+u/B4FT79vo TFr2ViXH+/s2EZN+5B9mKg== ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FtxAO6WQbt4Vq3kGGRMt7+b5z58r4cMIeyKf3y6ks1z68J2HHETEUTq45l1DBt1WMy/uEaqhwBJTRfXWOv06a5W0q2Ys2hs99bI7XLW7XuaWLXI8lKbcGeoVw2DJ8M0TDSnqvFdBf0/NakzeFMwZlxCtvzMUpMttO1p5sToSq+I7zrPXcJKAxy4pLy2uCexlB6jXrVAR9Vn7SF/BZ4+ajUYa9+bHoDneaksJeKm+T3v3WUr9al4NbD4/+6j3kzChg+d2gyhFU1f1BEQKj1SRsGngwUk5gUK/ALvGqCf7bsfxNG0MrJslz9n4ifZfFdrk1f90ai26yptvV20rA2NDMw== 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=6zRKVP0wxYzEad+yxt0t268SLIx2OcpPGkov/2Pn12M=; b=BZHWQXtMYeziAeWtszGtHREKR2M2aXwy75FTkGl9AOrZH7OjnNO0mgL5vbTWQWUKJaDmO8ykXWo8Z04RJD/pZGqn2F30fBx4ITLYrwg64Z6X7BWo4p5xymsmbvDq+vsm19v3DkxcSpSg6ANLiB9oft2I1cQ9E5dwaA0LVl+aathQg7zImpvLs0d2nb+9BHA02P2lyGJSvIRIqRm2an8UUOEAP/9XD3CGh9rjppZpHQIScUjlY2kiOMuEhTCatG6S7tCrCtHtJQ0MKUqomaoZXKviCft8izwx346qQtQFO2hqZsIkRBjmvJnn7tXbYNe9Gi1QJyBoYFNOkLxM6/vnPQ== 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=6zRKVP0wxYzEad+yxt0t268SLIx2OcpPGkov/2Pn12M=; b=hULaZaKTHXdhSWHzg120OgDUjvbWoXWDDfXdOfEOcNy1hXtvgdVfrYLgGRwNlAaILrem1MAxV7+isY2iaRs7XOWxK0HbTphaYK2ruRZJ8ZUme35LCp4RJvEqHgQPWizixatUtHzgmx8d4RMniI8R5hQIWy6HAODIYBV151FNL3Y= From: =?UTF-8?q?=E2=80=9CWilliam=20Roche?= To: pbonzini@redhat.com, peterx@redhat.com, david@redhat.com, philmd@linaro.org, marcandre.lureau@redhat.com, berrange@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, peter.maydell@linaro.org, mtosatti@redhat.com, qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, qemu-arm@nongnu.org, william.roche@oracle.com, joao.m.martins@oracle.com Subject: [RFC RESEND 6/6] system/hugetlb_ras: Replay lost BUS_MCEERR_AO signals on VM resume Date: Tue, 10 Sep 2024 10:02:16 +0000 Message-ID: <20240910100216.2744078-7-william.roche@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20240910100216.2744078-1-william.roche@oracle.com> References: <20240910090747.2741475-1-william.roche@oracle.com> <20240910100216.2744078-1-william.roche@oracle.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BY5PR04CA0006.namprd04.prod.outlook.com (2603:10b6:a03:1d0::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_|PH0PR10MB5894:EE_ X-MS-Office365-Filtering-Correlation-Id: 03215d93-5641-49b8-edbe-08dcd17fb019 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|1800799024|366016|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?EsSO2UGLVZdpUvM0EhBCbsiYew0Fe/viWSjhQxTaupscQyDTmA6fuUm5h2wX?= =?us-ascii?Q?3Iws5bC6bt64YFZRzr48lOYY8z2rlpQ+4okLdZCf6JQiOG1PM5iYnM159gR5?= =?us-ascii?Q?P97pDvERvwU4qbH51fo2EjO0d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ascii?Q?Wf1Gj/dh7ZU1h0DcbdIh9LCE1JxGRHfC/uIINR9TcKwb9rDYF/CRUD+Iw+Lk?= =?us-ascii?Q?PsARHnxMxAY7/dG1dNy1ZIdazt6SrsZEqV5gm2aHQBWhDbiiFDtaBalSnE1k?= =?us-ascii?Q?z5ZlFqZB+guAcWusnv+/WBAk2zeTZdwdDTVkGCmVS9gEObtHJ+a3G7CXFGtm?= =?us-ascii?Q?UtJhmucA7tYexh3NGkORQXqKY4ShXIq4S2AvbJQsDXrzovXfwqhJ6xoHd4gH?= =?us-ascii?Q?8AOt5My1r5nN45+bTa5x05TQoncrtkPFsURDagig3Gb0WNWnj3pptmSVmck4?= =?us-ascii?Q?dOl/s5Jg3k2gN1anMMbil21fTHucICTEyVTb8b3gD9iLdyutfWLAxWvGeVWS?= =?us-ascii?Q?gsEr/QL2csqzUjYVlifqVZVNZ2oH?= 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)(7416014)(376014)(1800799024)(366016)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?uDvYovXieU1cDOFAZeolMNhp+W0IxmtcoujbL117EpApkc0T/2zaEZ9Vbryg?= =?us-ascii?Q?nhrKGYx9XyVn/yIDZXhLgCc5BLmC5n0vY9e30BtWkci2yQR82xuC+077MrKr?= =?us-ascii?Q?NB7uLPu8DgifZcoS60BNFqSOvzfG7mpGt/WQy42d5QUsahh8C8X25I9Jj3Qt?= =?us-ascii?Q?1itWHcm+44E1EalL9bR5r2AZPnQ4HMtjGoJHo4wdroYYT1kub4HwQZzM06gs?= =?us-ascii?Q?07D3PkJILDObTFFm81zeg5BEHlVQYPn0Oy8aqcdjugDhAp8/a4vJbICUatKR?= =?us-ascii?Q?wq9ECh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bjSosQREePYQKzF?= =?us-ascii?Q?wbwaR9YJz1VArhckXyZfBKtNp7k+/6D4mVMyY11+pnGBsMGYHwnJRLsuENHL?= =?us-ascii?Q?ZYRb1V89Dhc+SXOil4Ft6Dg1FwLGgLpAw6xS+2DF672ai1EFEZpX56xcW0Ix?= =?us-ascii?Q?4ELO43gBTJcme4elerWGITH904GuMvTu94Nepl8HJ52ZeOgVyap7EATLQ2HQ?= =?us-ascii?Q?rtn0+crSD2XXJlwBML4Myd9HkIqI2ND3X+Koo6lZByhBbh44WFcBlsxTlgMq?= =?us-ascii?Q?V8qpafPZ+2rjMximq+RcHOPwuaeG1hhaXKAjHbVd8hqNvvtwWuA2Yb5K7L/Y?= =?us-ascii?Q?swZ0Nhrpo4yXCHDlDPmP4Iv2OTkLdctcNB6MvZkC9MKX/TSaH6SdrONCcSWB?= =?us-ascii?Q?aZzGwiAFKu7MBB1BDmgV4SIxpthTaPMjZROT1CHA1XpD6qMwmKt6n8dIpkZ0?= =?us-ascii?Q?qA=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: q/Y6ktLtNfVnt6qhLbi1vZyVtWm3jKd6KhmJItGcn2BoO/v9LojIwUOYUuoAVR0n5gSTWB/gwK/siRtU101vZBflNe8aN1SX3+FdPOzibUbdgA7dUAEBBhlCF/MznydcZpUzJ1h4siMDzEmzxc8N0YAQmT2u+mfbWlqNG70rEqn16oaHdZq6DY7bzW3blltos0WHnu3nbU7hmuiddL+k8DFqjvTQQUAuA7XunhgUr6vCsgwUILk3s+9qsZOCyb1zNQAm6h4ZdDk7+SIpNGDuj52cdsXsWyoJscfgyqJUf8lWnwuTt2Usij6JwMcXwAkUMfrcab2F7hsG6bkNULAjFskRX5/+myqxb8wyWbuA7eXXu+RN4fOTYnyBM+FPafHAIG2/B4T7Jt7QLan11Qpj1ek+I6H4nQONxTIctt5Mz8Bd6JsGoJaiKxxOuxifzzmS+Y6baYwUsQ3G4zP1gN1XnkFAiRSlOsT3qMD4FU1xHQfwCO0Qfq8KiXk6JAuEuzPKjENsG0KmVnGkF6CuWe0aqPsD8OvhWVy58UN3RmgGL0Wt0zyv4hTWENpQCmtCi+hztQvIdgwQcyfMfZaddGnFZduzo9i8GqbO7N68T8Y2drY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03215d93-5641-49b8-edbe-08dcd17fb019 X-MS-Exchange-CrossTenant-AuthSource: CH3PR10MB7329.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2024 10:02:32.7074 (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: 02jud2HlQfU4J1fx52HZD02l9EV8z8KX6zDz2aJq0VYi/HCGB9JbtI+SiWnhD9HuGJdepsx+z6DklSAamLcgD7774eDeUglgMCd1HJsOwGo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5894 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-10_02,2024-09-09_02,2024-09-02_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 bulkscore=0 mlxscore=0 phishscore=0 malwarescore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2408220000 definitions=main-2409100075 X-Proofpoint-GUID: gc52CITwLG83E-NazIeIKq_AI3ziclBh X-Proofpoint-ORIG-GUID: gc52CITwLG83E-NazIeIKq_AI3ziclBh 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: 1725962652149116600 Content-Type: text/plain; charset="utf-8" From: William Roche In case the SIGBUS handler is triggered by a BUS_MCEERR_AO signal and this handler needs to exit to let the VM pause during the memory mapping change, this SIGBUS won't be regenerated when the VM resumes. In this case we take note of this signal before exiting the handler to replay it when the VM resumes. Signed-off-by: William Roche --- system/hugetlbfs_ras.c | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/system/hugetlbfs_ras.c b/system/hugetlbfs_ras.c index 90e399bbad..50f810f836 100644 --- a/system/hugetlbfs_ras.c +++ b/system/hugetlbfs_ras.c @@ -155,6 +155,56 @@ hugetlbfs_ras_backend_sz(void *addr) return rb->page_size; } =20 + +/* + * List of BUS_MCEERR_AO signals received before replaying. + * Addition is serialized under large_hwpoison_mtx, but replay is + * asynchronous. + */ +typedef struct LargeHWPoisonAO { + void *addr; + QLIST_ENTRY(LargeHWPoisonAO) list; +} LargeHWPoisonAO; + +static QLIST_HEAD(, LargeHWPoisonAO) large_hwpoison_ao =3D + QLIST_HEAD_INITIALIZER(large_hwpoison_ao); + +static void +large_hwpoison_ao_record(void *addr) +{ + LargeHWPoisonAO *cel; + + cel =3D g_new(LargeHWPoisonAO, 1); + cel->addr =3D addr; + QLIST_INSERT_HEAD(&large_hwpoison_ao, cel, list); +} + +/* replay the possible BUS_MCEERR_AO recorded signal(s) */ +static void +hugetlbfs_ras_ao_replay_bh(void) +{ + LargeHWPoisonAO *cel, *next; + QLIST_HEAD(, LargeHWPoisonAO) local_list =3D + QLIST_HEAD_INITIALIZER(local_list); + + /* + * Copy to a local list to avoid holding large_hwpoison_mtx + * when calling kvm_on_sigbus(). + */ + qemu_mutex_lock(&large_hwpoison_mtx); + QLIST_FOREACH_SAFE(cel, &large_hwpoison_ao, list, next) { + QLIST_REMOVE(cel, list); + QLIST_INSERT_HEAD(&local_list, cel, list); + } + qemu_mutex_unlock(&large_hwpoison_mtx); + + QLIST_FOREACH_SAFE(cel, &local_list, list, next) { + DPRINTF("AO on %p\n", cel->addr); + kvm_on_sigbus(BUS_MCEERR_AO, cel->addr, _PAGE_SHIFT); + g_free(cel); + } +} + /* * Report if this std page address of the given faulted large page should = be * retried or if the current signal handler should continue to deal with i= t. @@ -276,6 +326,15 @@ hugetlbfs_ras_correct(void **paddr, size_t *psz, int c= ode) if (large_hwpoison_vm_stop) { DPRINTF("Handler exit requested as on page %p\n", page->page_addr); *paddr =3D NULL; + /* + * BUS_MCEERR_AO specific case: this signal is not regenerated, + * we keep it to replay when the VM is ready to take it. + */ + if (code =3D=3D BUS_MCEERR_AO) { + large_hwpoison_ao_record(page->first_poison ? page->first_pois= on : + reported_addr); + } + } qemu_mutex_unlock(&large_hwpoison_mtx); =20 @@ -522,6 +581,7 @@ static void coroutine_hugetlbfs_ras_vmstop_bh(void *opa= que) static void coroutine_hugetlbfs_ras_vmstart_bh(void *opaque) { vm_start(); + hugetlbfs_ras_ao_replay_bh(); } =20 static void * --=20 2.43.5