From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11020080.outbound.protection.outlook.com [52.101.69.80]) by lore.virtuozzo.com (Postfix) with ESMTPS id 1990F80E7E for ; Thu, 29 Oct 2026 12:25:41 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Os2fVRGVkAHODGGcD1/TZkbFupTjYUNZPkfv2I5RzEs+FYOAHB5cXecdUyfF59T+d/9xyInBOyMojKWb64ngCI0RuCXr1fZGBbWPAx0/a3t5uQS0POrIB8mWDqMSRLJBp5T09mcPIfUx7nc/CanhZmm+RzIU6nt9XUghqR1YqFhSH4NZkCSWbb9ZLj/qrwHV8Rrjcpnm/DFI2Ge9SPy3iaKFuy9if/3aJDeNy2GeibSlHHWJySUiUC3yglrqGZJ69tnXr0a4uF/evvoXBzULaxYCgR7GHvRSH5lkmtVL0CqZ0qMwftcqBS2f5qhxJZ8zJ4JahgutfcELmN6RSj7MKQ== 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=ZIK4P+bDS18+eJ8RuM3yZwlNTvsy1996bnvaiArR+zE=; b=ydAem7yst6HZ994OVEfTEvNvz48JMHAYWHi6DoekKfnPa/qWR/i9lDNafu4U5BvsbYvFGhOlQmv1RclmYeeORMTObpDSEcSgrCmwYYYvoiz+DSkeU8fRMhAB1QSuAYlKeuG66RXee2kBjHRmxsyV8J0wYxrZY+q3YkKqNHzYuZfHe5fOLlUoNCmWULO5f+4kL8mxdTBSozHkfuii1oREGVY191IguTADUZx+Z03gT1bBWPvZFrGdeEmorkWjR5HP3D+o0F8nEedP5IiWXbOMM3FFWhkLxvvvsU2CxJsuatwHDqbjf2MUAocHTg316FoVW9PXl78Q6myun6pyad7uzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 2a00:1450:4864:20::32f) smtp.rcpttodomain=virtuozzo.com smtp.mailfrom=openvz.org; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=openvz.org; dkim=pass (signature was verified) header.d=openvz.org; arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.onmicrosoft.com; s=selector2-virtuozzo-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZIK4P+bDS18+eJ8RuM3yZwlNTvsy1996bnvaiArR+zE=; b=aKWvi0h2KWwpript+khPb7KsTeJwnafvWJLwytxIJ6rkfusq1GpoGmE0o7GuQElFa2i5U5jrzDw1tuxaP0eYWhXoFJDJ62RWYnuFYcb6NjyTxqSmH6134z+pStaWnQDshl5L5mGrRF00KTXVXfUR+gd6gEx9vOSHQ0TjP53Ql/w= Received: from PA7P264CA0286.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:370::13) by GVXPR08MB953059.eurprd08.prod.outlook.com (2603:10a6:150:3a7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.569.9; Thu, 29 Oct 2026 12:25:35 +0000 Received: from MI3PEPF00008555.eurprd05.prod.outlook.com (2603:10a6:102:370:cafe::70) by PA7P264CA0286.outlook.office365.com (2603:10a6:102:370::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.569.9 via Frontend Transport; Thu, 29 Oct 2026 12:25:35 +0000 Authentication-Results: spf=pass (sender IP is 2a00:1450:4864:20::32f) smtp.mailfrom=openvz.org; dkim=pass (signature was verified) header.d=openvz.org;dmarc=pass action=none header.from=openvz.org; Received-SPF: Pass (protection.outlook.com: domain of openvz.org designates 2a00:1450:4864:20::32f as permitted sender) receiver=protection.outlook.com; client-ip=2a00:1450:4864:20::32f; helo=mail-wm1-x32f.google.com; pr=C Received: from mail-wm1-x32f.google.com (2a00:1450:4864:20::32f) by MI3PEPF00008555.mail.protection.outlook.com (2603:10a6:298:1::89) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.569.4 via Frontend Transport; Thu, 29 Oct 2026 12:25:33 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4a1b07c3c5fso18851065e9.1 for ; Thu, 29 Oct 2026 05:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793276733; x=1793881533; darn=virtuozzo.com; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ZIK4P+bDS18+eJ8RuM3yZwlNTvsy1996bnvaiArR+zE=; b=CtaH4NieBofC/2XpZ2oyoG5lryXydFAL5U8+d3LZp+injmUaWQ13O8S3F9126m+9Ej 4qnlAwUPwm308cc3/KndCl8ehMJgjqlpVWnxs2TCczX8HDmqx9EVircJojMY1Bp18DuD J0qQgY8EJP8pVvwMzH/cQ1Hq3skexbWf6HjgxhxM2WCSCNL/nu52TNmELKNE1pH9a1uO B451ybLlL5K2KlUuJFZe1UP2PaUwjOi0Kj8HfQwznq3aYV6gd+2Z6TTVSh7IO+/BqKN1 lFgaCESoXC0tpD7K96XzFa/TwN5wRd3aiBfVGjojuJX89bUQItk5mHLvWHsVq861/xsF Me0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793276733; x=1793881533; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ZIK4P+bDS18+eJ8RuM3yZwlNTvsy1996bnvaiArR+zE=; b=HwDQ45qjcJEcHo7yTMWF8Tq0UQwfuZ1qjC8RwCHno8IOMHehDmQh3vR9zQ1KTUArG+ sGKuDjzbfG6/Qop1Nu5LFUclREOw1w/eZReZIb3DSOYFv+RIxbX1LGPw0yJVZxCljvvq sdF3dNoUXPbFT3xYnxS5ZP+69S7qaoTU2N9I8tNPzBuHuGV3R+qP2aVJrnev7pOQMPVm 5xij9bbWx3CqtMh9kamusMBl7+xKBWUxKZa3YhiL5Pa8Sda/VBNutUsy4UbUXTXmmbez I5LVth9GJbvRyG6JHImy+XtWy/ERx8NJtAJqGCg390+lilVo2tJh1igiOCHGIquFnIGN u6Cg== X-Gm-Message-State: AFq9FYKsrlXoDwYTgSzcoeNNVBrp3KMti0zOhZNcL8ivwJFhzXgCptT7 AfhIPymSwP8pmTGBZ7ctS/5xkyk/ezHA5EMFBEE0U9UaX1GzIVHZ4qP+MbFdtfQSzaI0YQ== X-Gm-Gg: AYBFou2nPcaBU25QV8N/OQL7hx3Si7zs38ljJivHoCZbme9eo75nMUEUNGpuOLMPbI3 EvZARRcKlNPsGzBb4eYlZPfP14+bGx/EfYX9X+ZSIX0yHTuJBlv/DHFkBsCmDFa96TBp55aNWQb ATwl3IFl9IrQaBrlQ7O84I7A2p8Yfb/jUpEsfJg0OfGJAhM0+1pwnkV6XOudazyeAY8CDXhKbMU Mnq9GvNBNSRv8AS0EQrrShYo0US9ChhscpPRz56yWttRwmOuo6vBArXm6+4kOTjbxo1oMedkdp6 dVX3izcrTviPh1eCWwVJFALp4/GX1sIklvtVnpHLqz4aivpIEiabcKRS2O5TGBRaQMqSB+JBZmG GtteBqkJWapQqqRjcLfUPVNUMz/x5wx/N+22xhbybVtenzN3bNlmKW5H8kmLc0l1GrR+l5JDBbI LKw42QvWAvxIsv4Mr21wjRoI2pG/7mp+xpuwhjb6Z5mMDywO/MirlZbsUYAML51lSC5PbMgLhH8 B2/OYbMdGr97t4lpl7ryN49elAtVqopBmF11LPV8AOLQZTD0ALBcDbsPwax3aPOx+ePknEkpZQK kpIo7BBCPKtzvQAvleIaF3KEEg== X-Received: by 2002:a05:600c:8184:b0:4a1:d087:f6ab with SMTP id 5b1f17b1804b1-4a967016ae6mr114594885e9.18.1793276732743; Thu, 29 Oct 2026 05:25:32 -0700 (PDT) Received: from athena.sw.ru ([2a06:5b06:b600:300:f4be:f111:4ee0:40d3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4aa80285b88sm62423205e9.14.2026.10.29.05.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 05:25:31 -0700 (PDT) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com Cc: svt-core@virtuozzo.com, den@openvz.org Subject: [PATCH v3 hci-8.0/hci-8.1 2/6] i386: keep hle and rtm on Virtuozzo machine types up to vz9.2.0 #PSBM-149402 Date: Thu, 29 Oct 2026 13:25:23 +0100 Message-ID: <20261029122527.365104-3-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261029122527.365104-1-den@openvz.org> References: <20261029122527.365104-1-den@openvz.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MI3PEPF00008555:EE_|GVXPR08MB953059:EE_ X-MS-Office365-Filtering-Correlation-Id: 47e49fc6-52ca-4fee-473c-08df35b7ba87 X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|6059299003|376014|48200799018|61400799027|9140799003|43022699015|82310400026|56012099006|5063699009|261009223027099003|261026140227099003|261026121527099003|261028144727099003|10067099003|261022105027099003|261021121427099003|261021123027099003|55112099003|16102099003|22082099003|18002099003|6133799003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?GXvfidKAiMCg8LjYCnjgE9M3mo6pmMiJ7M16tQDp6JJ1LCS5DvGisTfw67kp?= =?us-ascii?Q?kWQt7MNPmPvKs8IaRwzDCihDPpJBbKRBq91U92DPCTtKOe5d5t6XrFokqDPZ?= =?us-ascii?Q?umXLUnBVjgAeaHjC2xBzp+zBi5ohn/FXUROdPdpLNXNLmIHQg2WdX1+mGI9h?= =?us-ascii?Q?05If2/4zXzR/Rq9fp2CQJ2he7iGmdT2oX6mI2A5adl/KUXLBV4piyD3+X4JP?= =?us-ascii?Q?S1/r3imLZm63UKHiQA7tzUa00boFEV/R4flWyjmLPmWuRaFInncvI0GbrqIs?= =?us-ascii?Q?rVXfBnXe0Xsfwdnwhgw+2ySumrBwv+Pl4c6F0njSzq6o/UWrPJMabSsaAxq6?= =?us-ascii?Q?7+lRXPBZWuV62ug33+qNhhNl6Lo27wQR9ZCMstAO36B/dSnIfmk4ejY6dAlG?= =?us-ascii?Q?Tp8jjEp54Ot7vE0nFyXp25FYfgqE0mIPR12TCXekKFhI382Ui7oa3UiwU0oZ?= =?us-ascii?Q?RRd9KPOliYU3+G70PzXXwkp0mCFhrC2+rDQFcYutxWCQVo6vSK8oU9YbZcvV?= =?us-ascii?Q?WYzOF2lpzSNJMbUjOG2c9mG25ih+6AFSJRP/WEhZCy13tnVgTy+wQFeiliYr?= =?us-ascii?Q?6+smxaWUcwPnNxw86owG73sTFH6jE0+0iWPCArt/PZH+O3bYwtuNvvtI98J2?= =?us-ascii?Q?WrmpnmPoGj+1IWjf0S30tuldUWfYhXMAhfXLQ9+cQpsZFooahXtK2rayup45?= =?us-ascii?Q?W6AzqckSyH1mOjPUGE/CRjMXcsbDvHQ2lhbUahEFd+xv4gJk8ZnwCFb4zBVi?= =?us-ascii?Q?0jUyPyHBOYpYrfM2DhQ5LNIU0/tH8AHnaW2Hd4repCUu7a9U4YcGA51Kjts/?= =?us-ascii?Q?NSTdkZGTX/PfR6I+0XCeUQ5CN4WBIdTvn/wW9EYUThk4ZITmhgPBAucjlzUi?= =?us-ascii?Q?q5sxLjIZxqeQzwhunf/yED84Vh2DPf2yZo/pC3TAk9Cj1bZn95ecPVNNMBk0?= =?us-ascii?Q?f0QsFcGopaeuu2i5mx1KPQ=3D=3D?= X-Forefront-Antispam-Report: CIP:2a00:1450:4864:20::32f;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail-wm1-x32f.google.com;PTR:mail-wm1-x32f.google.com;CAT:NONE;SFS:(13230040)(704161411799003)(6059299003)(376014)(48200799018)(61400799027)(9140799003)(43022699015)(82310400026)(56012099006)(5063699009)(261009223027099003)(261026140227099003)(261026121527099003)(261028144727099003)(10067099003)(261022105027099003)(261021121427099003)(261021123027099003)(55112099003)(16102099003)(22082099003)(18002099003)(6133799003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RfI8qHypGAAwVsZcAwzPkQTHGxAmvJVgse6HR5MUHp8SCI58AHH/pGxsF0j3FOhIYLxbzgBhnBxFZAXYOtGpUTVwn2FNGXBQizgqUkA02G2/FLTtzPON5n8byv9jVD2sWrJVhQCD1EIxBELZCEuCQ7OiWfIRfy1vyHrd6qbY3JTWX1kdJ5cazst8KSMPsjikpJw6u62byr1uWZ9LYqANydN3GuKWLGAWt/Z+g9/1F+nYTsXeQcay2qpFoffI1lXxrdfnIAcRyT874FS7fWjJxSoit99q5ljpIidkfF0vJXPuaGNvytw0F/hpIzCnzpWrfE9u2ZZ0TNDQzIhIDs9hpvJfbXaim+rmwa2sLoSStBaihG6pEgFpz+9sBdpGaiv6+4RKFta3A9eHH5TaxIY7gn5QCxi/IU/nmjr4xxEUpFFrWoQieEJscShaprDElIhY X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-Auto-Response-Suppress: DR, OOF, AutoReply X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2026 12:25:33.4177 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47e49fc6-52ca-4fee-473c-08df35b7ba87 X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: MI3PEPF00008555.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB953059 List-Id: From: Denis V. Lunev Intel microcode updates for TAA disable TSX, and a host may also boot with tsx=off. KVM then stops offering hle and rtm, QEMU filters them, and a guest started with TSX can no longer be migrated, restored or reverted to a snapshot on that host: libvirt rejects the filtered features (VSTOR-75689, VSTOR-105458). The guest read its CPUID at boot, so the bits have to stay until it is restarted. Add x-tsx-compat: hle and rtm requested by an Intel CPU model or on the command line are then not filtered, and KVM gets them in the guest CPUID, ignoring bits it does not support. This also covers Haswell parts with the TSX erratum, where QEMU drops the bits itself. With TSX disabled through TSX_CTRL or by force-abort microcode XBEGIN aborts every transaction and HLE prefixes are ignored, so a guest that keeps using TSX falls back to its lock path. As a machine type property it also applies when such a guest is booted afresh. Through libvirt this changes little: a custom CPU with the default check='partial' is compared against the host before QEMU starts and still fails, and host-model and host-passthrough request only what the host has. A domain with check='full' or 'none', or QEMU started directly, gets the bits on a cold boot, as on the older node. Limiting the property to -incoming would miss an internal snapshot revert, which loads the state into a QEMU started without it, and a vCPU hot-added after migration. The kept bits are not reported as filtered, so check and enforce stay silent for them. pc_vz_9_2_compat turns it on for vz9.2.0 and every older vz machine type. Release 7.x ships up to vz9.1.0, and vz9.2.0 is the last type based on a RHEL 9 machine type, before the QEMU 10 based vz10.x types. vz10.x types and -cpu host expansion stay strict. Signed-off-by: Denis V. Lunev Acked-by: Andrey Drobyshev --- hw/i386/pc.c | 5 +++++ hw/i386/pc_piix.c | 3 ++- hw/i386/pc_q35.c | 2 +- include/hw/i386/pc.h | 3 +++ target/i386/cpu.c | 27 ++++++++++++++++++++++++++- target/i386/cpu.h | 7 +++++++ 6 files changed, 44 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 76289b86c28..25b17866103 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -548,6 +548,11 @@ GlobalProperty pc_vz_compat[] = { }; const size_t pc_vz_compat_len = G_N_ELEMENTS(pc_vz_compat); +GlobalProperty pc_vz_9_2_compat[] = { + { TYPE_X86_CPU, "x-tsx-compat", "on" }, +}; +const size_t pc_vz_9_2_compat_len = G_N_ELEMENTS(pc_vz_9_2_compat); + GlobalProperty pc_vz_7_16_compat[] = { { TYPE_X86_CPU, "kvm-pv-ipi", "off" }, { TYPE_X86_CPU, "kvm-pv-tlb-flush", "off" }, diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 1a50c2a645c..b1b595078eb 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -1058,7 +1058,8 @@ DEFINE_I440FX_RHEL_MACHINE(7, 2, 0); #define VZ_PC_MT(X) \ X(10, 1, 0, MT_VER_SYM(10, 0, 0), true) \ X(10, 0, 0, MT_VER_SYM(10, 0, 0), false) \ - X(7, 16, 0, MT_VER_SYM(7, 6, 0), false, hw_compat_vz_9_1, \ + X(7, 16, 0, MT_VER_SYM(7, 6, 0), false, pc_vz_9_2_compat, \ + hw_compat_vz_9_1, \ hw_compat_vz_7_16, \ pc_vz_7_16_compat) \ X(7, 12, 0, MT_VER_SYM(7, 6, 0), false, hw_compat_vz_7_12) \ diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 2f4a14b4e01..019239bec6a 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -974,7 +974,7 @@ DEFINE_Q35_RHEL_MACHINE(7, 3, 0); #define VZ_Q35_MT(X) \ X(10, 1, 0, MT_VER_SYM(10, 2, 0), true) \ X(10, 0, 0, MT_VER_SYM(10, 0, 0), false) \ - X(9, 2, 0, MT_VER_SYM(9, 6, 0), false) \ + X(9, 2, 0, MT_VER_SYM(9, 6, 0), false, pc_vz_9_2_compat) \ X(9, 1, 0, MT_VER_SYM(9, 4, 0), false, hw_compat_vz_9_1) \ X(9, 0, 0, MT_VER_SYM(9, 2, 0), false) \ X(7, 16, 0, MT_VER_SYM(7, 6, 0), false, hw_compat_vz_7_16, \ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 4d8a01528b8..bd73426644e 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -364,6 +364,9 @@ extern const size_t pc_rhel_7_2_compat_len; extern GlobalProperty pc_vz_compat[]; extern const size_t pc_vz_compat_len; +extern GlobalProperty pc_vz_9_2_compat[]; +extern const size_t pc_vz_9_2_compat_len; + extern GlobalProperty pc_vz_7_16_compat[]; extern const size_t pc_vz_7_16_compat_len; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5310d68443b..5ff5644dee9 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -9100,6 +9100,29 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp) } } +/* Requested features that a vz compat property keeps despite the host */ +static uint64_t x86_cpu_compat_kept_features(X86CPU *cpu, FeatureWord w) +{ + CPUX86State *env = &cpu->env; + uint64_t kept = 0; + + if (!kvm_enabled()) { + return 0; + } + + switch (w) { + case FEAT_7_0_EBX: + if (cpu->tsx_compat && IS_INTEL_CPU(env)) { + kept = CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_RTM; + } + break; + default: + break; + } + + return kept & env->features[w]; +} + /* * Finishes initialization of CPUID data, filters CPU feature * words based on host availability of each feature. @@ -9126,7 +9149,8 @@ static bool x86_cpu_filter_features(X86CPU *cpu, bool verbose) uint64_t host_feat = x86_cpu_get_supported_feature_word(NULL, w); uint64_t requested_features = env->features[w]; - uint64_t unavailable_features = requested_features & ~host_feat; + uint64_t unavailable_features = requested_features & ~host_feat & + ~x86_cpu_compat_kept_features(cpu, w); mark_unavailable_features(cpu, w, unavailable_features, prefix); } @@ -10056,6 +10080,7 @@ static const Property x86_cpu_properties[] = { arch_cap_always_on, false), DEFINE_PROP_BOOL("x-pdcm-on-even-without-pmu", X86CPU, pdcm_on_even_without_pmu, false), + DEFINE_PROP_BOOL("x-tsx-compat", X86CPU, tsx_compat, false), }; #ifndef CONFIG_USER_ONLY diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 07b7a9417b1..85efd0b9fbe 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2331,6 +2331,13 @@ struct ArchCPU { */ bool pdcm_on_even_without_pmu; + /* + * Virtuozzo machine types up to vz9.2.0: do not filter requested + * features the host no longer provides, so that a guest started on an + * older node keeps its CPUID. + */ + bool tsx_compat; + /* Number of physical address bits supported */ uint32_t phys_bits; -- 2.53.0