From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11022081.outbound.protection.outlook.com [52.101.66.81]) by lore.virtuozzo.com (Postfix) with ESMTPS id 6AC75803F6 for ; Wed, 18 Nov 2026 08:28:32 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kswlRohpcAxCMgNylqIsJ4dHWnXn1aFGBBxqD774u/acsb+4Dv1+hLHhkcdfyO9jvEWWs2g8zz/8lREj7q5QuH6I6ltgyINARRLf5KYclZlrdfZLBS0f1A+gVG5/8hL3ZHKaboHWTCMXYYTSi+c45E98qzE4xGt4OXuqnB/eDpB8iHZuxEbw/nmjmdTGrALqbbyFVWLNLzHiI5sZwuSgeDQD5btjAwyFSu6d6ZJutwJub6drqkrSi+3bl79kdV3Cv6qdhVECryypYSTICaRccUyAoEfMKiUc9SgGjMJrKQj5WqoNvMOsXRlQvCebnLnvMPRj4WXZD2x5iYJJ43s1rw== 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=DNOQqdS0AyDk9xIeSPH/qYut9OgwqtekGuMC1vWjEbA=; b=PdA9vhErXgXnu6DJd7/f2le5eyRCow5yEFk7Z4j+O9g2gvMoxRc3wJSEMbWEYKs0QFfTE/O0QGmHGr5flNl29dgQMwByQ5zb7abXoMQtmLWRNlkYpboT0XBI/efNTnMNd8aBTbqMGO/kFPiPJ9di9KDm968bEt2ZXa0Cze6ARPDRfAVE8J6t09gEMLLHTKER2M+3Uq1c1n8TOcOvFgvvXFmArb6+2BJIQD5Tn/eFgpdxK0oMvS8zkp0ACK6PwW6mWdAjLvKa62rGWB5xBwTZBc92+uCDlcWvGYj9C9SsRWdyFacWecxIUax0rTW74BCrAVGh7wYWedub5M28AF/5zQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 130.117.225.111) smtp.rcpttodomain=virtuozzo.com smtp.mailfrom=virtuozzo.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=virtuozzo.com; dkim=pass (signature was verified) header.d=virtuozzo.com; arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DNOQqdS0AyDk9xIeSPH/qYut9OgwqtekGuMC1vWjEbA=; b=MSLfUWFqqxZcU5/XRDGuhjqkOGo8AQjKZoJQEKfuIQtHvGQi1o5oehSRqsDS0pjIpY7Zt9ziLfVDez9bovTyd2Nf7O8RcMKkYw8Wgxwdm+lH1AWnd44ZCWUUn/rdi5ibwDCkJj3th0ltvzT6zy0w7zDOFaKWx23gDk0eeD2yKNMgew+1l03aNfjeMrQZzTsHijSZmC/xZkgk/FtlP/i159/zv0P7g7sWwlBBUjMFXSdxr5IUGe9CDzghk++Sw/6jXdR+y9G4dYacPNcN8Xx+JJmwnVGxg9p/GaxFTjGX1iltknbgtuTgaJVB32y2WuQRwT/6GgWG3B67NELJURVC0Q== Received: from AS4P191CA0007.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:5d5::7) by AS8PR08MB8274.eurprd08.prod.outlook.com (2603:10a6:20b:536::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.615.14; Wed, 18 Nov 2026 08:28:29 +0000 Received: from CPH1EPF0000052E.eurprd05.prod.outlook.com (2603:10a6:20b:5d5:cafe::28) by AS4P191CA0007.outlook.office365.com (2603:10a6:20b:5d5::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.615.14 via Frontend Transport; Wed, 18 Nov 2026 08:28:29 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 130.117.225.111) smtp.mailfrom=virtuozzo.com; dkim=pass (signature was verified) header.d=virtuozzo.com;dmarc=pass action=none header.from=virtuozzo.com; Received-SPF: Pass (protection.outlook.com: domain of virtuozzo.com designates 130.117.225.111 as permitted sender) receiver=protection.outlook.com; client-ip=130.117.225.111; helo=relay.virtuozzo.com; pr=C Received: from relay.virtuozzo.com (130.117.225.111) by CPH1EPF0000052E.mail.protection.outlook.com (10.167.241.169) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.615.4 via Frontend Transport; Wed, 18 Nov 2026 08:28:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=DNOQqdS0AyDk9xIeSPH/qYut9OgwqtekGuMC1vWjEbA=; b=oxepihKu1qSF Lib7VWz8YxY5XVAifL1ugn4J47zxgdNtDHyZnNFNnTL4ln/5q445jnJAUIswPAZCkKoEGa/V0C7ko lMTW9fE+2x23L2I1Zz7mjNZNS0HCocoNyEfMqxKIQUwglUswkDTQl4j/7eNvvgFr6aFlHwx8Jpbvz 7oiG/fW6BpM3eYvnADFPkT+s78jNteJaA1q13S5jErNVZap4mX1IFcSB4d8CnlJYGtxy8Z7baWe7w OOtnedR2EL36A4TH76sxTPRqnti0H+gw7oMUZNbjsDxVumsTtWKvVMzNTiARabcK8vX8T4+4EoNQ/ Knlt3uVYOp47/rLwmmj8SQ==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=sky) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xTaxW-00H3eo-39; Wed, 18 Nov 2026 09:28:28 +0100 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Cc: andrey.drobyshev@virtuozzo.com, svt-core@virtuozzo.com Subject: [PATCH hci-8.2 v2 0/2] vhost-blk: support the werror/rerror policies Date: Wed, 18 Nov 2026 09:28:24 +0100 Message-ID: <20261118082826.3259784-1-alexander.ivanov@virtuozzo.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CPH1EPF0000052E:EE_|AS8PR08MB8274:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d0ca312-a25e-4e5d-6b35-08df454dec74 X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr List-Id: svt-core@virtuozzo.com X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|82310400026|1800799024|376014|23010399003|6133799003|5113699003|18002099003|261009223027099003|56012099006|261102123227099003|261028144727099003|10067099003|261026121527099003|261026140227099003|261021121427099003|261022105027099003|261021123027099003; X-Microsoft-Antispam-Message-Info: KvdQWM+pzrPYGKiH27pZYz3cMiN9Obo65lS/1ulFXSv7TFjFd8n2xn8IUKVLoNjHkQtRtEy03MHf/ERrLY4KZSpeTjNZ7F02O36BjSfns87hD8oRxskefHupFVratAY9J01mK0TAB5RhSAhzThGBhD7CiStgAX+Bu+z8xbWEAeBhnFLMtQF4+Cz6IED2duhiIkkcYcehw5zwCHUqAVzlKFtcYVlN7v3i5lSpKOTkXtCzbmCRtvNEWAXi/Zi6qjjaFq/HncdeKEehaqRl25jj7MPUmaXlRFAzlkfg8AEh/6gX34p5IGoBe4flHfK6sRPxmSvNxbdfj4uCR5tX75oTNvbKMEO68TejlCgex+13OZ4nC3XM8ESIevq/RVddr4rbYNH3Q5cgfXw2kdN9ovT1n/PiSv6+1WS6UNOSWReQr68jJgVzn9LuhkjNmT/i0rYF4TRqhu8trz4z2fqEpofrqqbKVK1k1b74wpKUrIZ6D0HhjYz7jprBe4w0xLo5x/h6nKPElLlTVOyhMk2hvpAW72USjvHoBgTpsx3PbQtZu9NoyxLRa5po0yq6+Xgs2UEQ0svHIjbJSdd691r2zo/hO2Df/yw9nrwc2y18hrRt8P1u8TQwEbCPRfVZTsMs46JqYcikBbpQwlO3OYk8cit3Bw== X-Forefront-Antispam-Report: CIP:130.117.225.111;CTRY:CH;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:relay.virtuozzo.com;PTR:relay.virtuozzo.com;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(1800799024)(376014)(23010399003)(6133799003)(5113699003)(18002099003)(261009223027099003)(56012099006)(261102123227099003)(261028144727099003)(10067099003)(261026121527099003)(261026140227099003)(261021121427099003)(261022105027099003)(261021123027099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: phO/sUBSZu2NP5csYbCcaQW+W51VJpQfqtdT68Y3/HSYnSBV6L26R3V+VCFQ7CZSLAUkbWKXl7sS/fOr1P4HJ0zfNMjStXGC3Qt1owCNYrP7+uU2gCE5NXPBTn4npa2z/u4wTAZxrn4fLYz93NJkBJzUR8ldbz/xEc+CtFkBMfkIJRZf02o0pze/FvYO9EiIQqKnrVJcaYSsgP/ItyUsMPczYXUZULV2j8MdHfP/Oxfd5YMDTvyUX9PQuPDRBau1t4O7kjx8YAYHkV9Ooen7vyPXzkETxA0QX4QTYw0E3RsozM53i+l7aT73hPBpn8dpaS0ed9weJt7VRecg/OLAXSL9KcMeWAnchrGnaI71Ubi2UKrSMmIJONgWJh+1Vg2RV8TjgypKtHzvAhEFel7rNoVW8UMezLkJ/PD4qj9NYYfij/jjLfcMraYT8x/Fnwai X-Auto-Response-Suppress: DR, OOF, AutoReply X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2026 08:28:29.1474 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d0ca312-a25e-4e5d-6b35-08df454dec74 X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0bc7f26d-0264-416e-a6fc-8352af79c58f;Ip=[130.117.225.111];Helo=[relay.virtuozzo.com] X-MS-Exchange-CrossTenant-AuthSource: CPH1EPF0000052E.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8274 A vhost-blk disk completes requests to the guest from the kernel, so QEMU never sees an I/O error and the werror/rerror policies cannot work the usual way. The dm-qcow2 series holds a failed request according to the policy and reports it with an IO_ERROR change uevent. This series makes QEMU accept the policies and pause the VM on that uevent. Patch 1 adds the werror and rerror properties, which libvirt passes when the disk has error_policy or rerror_policy set. Without them QEMU refuses to start such a VM. Patch 2 parses the IO_ERROR uevent and stops the VM with the io-error reason and a BLOCK_IO_ERROR event. Migration and savevm are blocked while requests are held in the kernel. v2: - patch 1: accept enospc as rerror, add Reviewed-by - patch 2: stop the VM even if the event does not match the policy of the device, with a warning, as nobody resubmits the held request otherwise - patch 2: ignore repeated events once the held request is reported, as the run state stays running until the main loop handles the stop - patch 2: if the VM is already stopped, block migration and emit BLOCK_IO_ERROR without requesting a stop - patch 2: ignore the event while vhost is stopped and in the suspended state - patch 2: accept enospc without ueventfd, as it is the default ! Don't apply this patchset before the kernel patchset is applied. https://virtuozzo.atlassian.net/browse/VSTOR-152175 Alexander Ivanov (2): vhost-blk: add the werror and rerror properties #VSTOR-152175 vhost-blk: pause the VM on an IO_ERROR uevent from dm-qcow2 #VSTOR-152175 hw/block/vhost-blk.c | 117 +++++++++++++++++++++++++++++++++- include/hw/virtio/vhost-blk.h | 2 + 2 files changed, 116 insertions(+), 3 deletions(-) -- 2.53.0