From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=40.93.201.3 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796506794; b=UQewtsdaRI2PNZ4lhopt3NIptQ19353467C86gW98vTjYoL2l9tJS0Wp+/e8l4mz2a7o ZJTbl8H1547brs4c6ZKq/ceM40BjeMcQhKDcgHLeCBzDo9hbRALi58KmvqotpD7tl/Kyl OyvsGSiC8Pru5xcTbnfwG8G2joU9QrZbfZUkyvqlux1kas/b1IAxQnYAuiUHh642cq/4s ITcVk3witx/HhFX9Im4ZRSGtdsB/PIzkvlChbyXWqd/SJ3kiM2IYZquMqgy02fJQPHPX6 0OLBFrmQPOQ91oNYwIIlnDx2AMVpKRaBjXQsIqe2ByEyVFE2WGgE8efeRt8JlIpFDLg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796506794; h=DMARC-Filter:DKIM-Signature:Received:Received: X-MS-Exchange-Authentication-Results:Received-SPF:Received:Received: From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy:X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=TmnaNP6boAXwrjw4EHYYMYzS/v7AsOzv/WLCW67uhQ8=; b=LF6H81HmjCsWpx7+yIT0VTFgTxf3TVSP6neTX+PbmzwkdSCj3q0SB/8DwkuTjhcKDbR7 M9KPMz6hkFMeay3jyMRbCzocBCmY+21grQqBFKdPwGuF4aOv7kriIUWWAYHa5SUIWgmhe t5X0hHvNx+UXyeCxVuUPcEUclQ5Z6Y9XNaiH2hDRdR1CHq9AXiCnn6zptylpief0A4dRK G04M2VkjuVufC9X5GcnhWu55tAOV18TD0ii8lT5F62U0MsTO0sVjbxfmZ0/mYbzn8dxCb DSJzmlsM8NiOaFRhqGjPj7bYKnEYE8khxnP4uFnP3h6LCeTt9wB1NNWJt2oxzItQNLA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=wgSLaEKp; arc=pass header.oldest-pass=0 smtp.remote-ip=40.93.201.3 Received: from CY3PR05CU001.outbound.protection.outlook.com (mail-westcentralusazon11013003.outbound.protection.outlook.com [40.93.201.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCB0A606A31F for ; Sat, 5 Dec 2026 21:39:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BCB0A606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=wgSLaEKp ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=itsM4029kVlYITVTg6OolEbnwIfsajZaXKSgJFao+vhy/dJZUcAzJDOS12HAbzxH5ffHYFfKZ5S0MnRmuTKK88l2AFGN9Z5jhz9/O5Gnr/4Ru78cHItl+lLMTZR8hIUoykyOXNDPX0WHYX9jse2xMHtUwIZ89O0jvxH/Igyg3mS/UXiq36gZnL6NJYyhmBKqiCBuTEPHSuMb1zBA0h0UGkV0WTZUzk7pne7GFTlDO/k8oG0IPV8e3Q1rCQKPz9GqhfZ3SvkNC2EQi+DQqVgNNPalQc9Gn7S1ob/OXv7AbCEodT8NWXyBqh0tBiSPR1ycLV4iSWkz8pNfrYTJqh5RLw== 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=TmnaNP6boAXwrjw4EHYYMYzS/v7AsOzv/WLCW67uhQ8=; b=QTG1SN8tb74YOwVmwJ06rovYsejT12PZLS9D1aDKzUgiOrs11dVvQi07DEl559cLrcJmSGsIkmq/lC6RGxrqigrgYnenDRmjRDfy0fou/3P0Vi7XBO1jBiXzfPpHV4qOy4YLQwZ2nY7kLrrA/JStlZ/ZK+xMKZvoUiALV9aDfhub2GpnJBHUDme00F9Vacw0N/AWOhseDrmyY0tl+MgmLt5EHy1/bnauEs5tNhMYhXwNGhUeBxAEj8npVKD4i95lXHEYJiOQR7yOHl1rCiIb59DwS/74p1ijMV1O6LOoMYCBb8G7iWxGvzG/bxxGzCTYPbLr6Jgxd6yU07JQICeFmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nongnu.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 (0) 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=TmnaNP6boAXwrjw4EHYYMYzS/v7AsOzv/WLCW67uhQ8=; b=wgSLaEKpPHwupigjO599e3YfBF7n1DGlybKgqiMbgupoagdxmWoDvHOytczawqGy9AyB/MgEcfAf77cTZ9XlJ9Rv9p3ufpmQ0/viSdUcIGgyqKVE2763AMLeFJY2EXNm1i8lf6uUIRyn8ZROnQ0itKsSn1O42xyrQnmw9P93jDM= Received: from BN9PR03CA0610.namprd03.prod.outlook.com (2603:10b6:408:106::15) by BY5PR12MB4306.namprd12.prod.outlook.com (2603:10b6:a03:206::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.13; Sat, 5 Dec 2026 21:39:48 +0000 Received: from BN2PEPF0000A994.namprd04.prod.outlook.com (2603:10b6:408:106:cafe::85) by BN9PR03CA0610.outlook.office365.com (2603:10b6:408:106::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.13 via Frontend Transport; Sat, 5 Dec 2026 21:39:47 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; 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 (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=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by BN2PEPF0000A994.mail.protection.outlook.com (10.167.248.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.709.6 via Frontend Transport; Sat, 5 Dec 2026 21:39:47 +0000 Received: from speedway8455host.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Sat, 5 Dec 2026 15:39:47 -0600 From: "Pratik R. Sampat" To: CC: , , , , , Subject: [Patch v2 0/4] i386/sev: SMT Protection for SEV-SNP guests Date: Sat, 5 Dec 2026 21:39:37 +0000 Message-ID: X-Mailer: git-send-email 2.43.0 X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF0000A994:EE_|BY5PR12MB4306:EE_ X-MS-Office365-Filtering-Correlation-Id: f8bbf750-43e8-4dee-da78-08df531848e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|23010399003|82310400026|376014|18002099003|261102123227099003|10067099003|260925021311599003|56012099006|260925022911599003|261028144727099003|261026140227099003|261021123027099003|261022075727099003|261021121427099003|260925021911599003|261022105027099003|261009223027099003|11063799006|6133799003|13003099007; X-Microsoft-Antispam-Message-Info: FZ1bqqIM+Hr2MXxspWimz3F706E8cgCdtlvwvpuHkytSvjk0kKHQWcblPUcuEpR95H+En0aIvsC/zWYd7dwwYJAppOsZcc2ettLK4zdxCOZ3tZqAe7Rq7RhQIK4aCQAHOl3DbQ21N77GevXSIFhugdfKT1TARuvBNPTQT70f/E/F2AqVIsVWnMYF42MRxWBneWPDoGmcgj3GpX/i5Nqgt0NYegbo18rrv/GDILRpt0q2Rjlc08jB37znYDGh8EIA/6tQYV6WFn5YyigrMRJ3iyTXYOqK8kyNbNupdOETgWEU2DJCsZXnaAHabTXfyy+2VFJNoEJWLi9GIugHAwxWNhV5NBDFLBL2GG+nj4J1pHrVXNJs14y75hV7OkDVIDJ7SQxP1eXvzaBP6kSjTIwYq6MbjwzK7OV/LhSLimTEClNIlj+E4HarHzGY3vnkzN/HLa6es5FLozBsWbNUaZiP3aQvY10KTlVoCg00d98aJyR6H6v1ccLnYHHLuvZPMGc44H3SKm3GtLT73q1ro3EMHtuKlKD/6h6J4jVT1qki8QMcw3mRhiLONfCUeqKYun7mLb8rs6wbwB7+f5LZ/mazDQku5fhbMhAMxwzNfOldRn5b0mBPzA8YmUTVQQ2PYIdpHYYpQoSmrvfbZJg5hue4CA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(23010399003)(82310400026)(376014)(18002099003)(261102123227099003)(10067099003)(260925021311599003)(56012099006)(260925022911599003)(261028144727099003)(261026140227099003)(261021123027099003)(261022075727099003)(261021121427099003)(260925021911599003)(261022105027099003)(261009223027099003)(11063799006)(6133799003)(13003099007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lQTxIoJGNOl/kuu/o7IKm/hX0jT08SRKiaG/V+Co5sHjUli5XnLyEXtiTr3xFPlODlU6+4d+Vy/2ooHvL+bz9fBi4YY6bFWmWLbfvbhR3jnRvpxK2YDnIE1MuM0/zDLe55ahQ8+u5nemGPgisiHVSG5NznM0M4LHC/ypxKtmedXww48ZdSR9DqGTEsQ553pYAPYyf115jE990B8RGk6IfAU7Ui2FCHd07mVUHggUxI9GxFUgbbYBADDN8zPvIgI35ekQSHKlGiUrQtByRkDiiCPiRJcK60gkV+7eSjc799iu9gKBsUdqSJvwaQ7aNEew9yFOmGz4EP4rSAlX3nMaKA57iomrtQlcBNR/JUtDaYEhy+vCioLIKU3LKyzogqYmN1KzygvP3veIxpLTlGmOGXgczIiMRuN0vvcJDcRlUUdcP/U4j3+dvqXgyYvGxM3/ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2026 21:39:47.6819 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f8bbf750-43e8-4dee-da78-08df531848e5 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=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF0000A994.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4306 SMT Protection (SMTP) protects an SEV-SNP guest on Zen 4+ systems from sibling side channels by requiring that, while one of its vCPUs is in guest mode, every SMT sibling thread on that physical core is HLT idle in host mode. Enhanced SMT Protection (ESMTP) is an SEV-SNP feature on Zen5+ systems that lets a guest constrain what runs on the sibling thread of the core its vCPUs execute on. Each vCPU's VMSA carries a VCPU_ID and a VCPU_SIBLING_MASK, and hardware admits a VMRUN only when the sibling thread is idle in host mode or is running a vCPU that the mask permits. This series adds support to opt-in for [E]SMTP from KVM and engages core scheduling onto the vCPUs to either mint new cookies for each vCPU for SMTP or to bundle trusted siblings in one group for ESMTP. Usage ----- Requires patched Linux and edk2 builds. Launch an SEV-SNP guest with [E]SMTP enabled on the sev-snp-guest object: -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,smtp=on Or, -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,esmtp=on SMTP and ESMTP are mutually exclusive. Both SMTP and ESMTP are opt-in because they carry a performance cost as VMRUN stalls until the sibling runs work from a trusted vCPU or is in idle. The guest reports the feature in dmesg among the SNP feature names: # dmesg | grep -i SEV ... SEV-SNP ... SMTProt ... Or, ... SEV-SNP ... ESMTProt ... v1..v2: * Added in SMT protection to support older class EPYC systems * Rebased with qemu master v1: https://lore.kernel.org/kvm/cover.1794935627.git.prsampat@amd.com/ Pratik R. Sampat (4): i386/sev: Introduce SMT Protection for SEV-SNP i386/sev: Introduce Enhanced SMT Protection for SEV-SNP i386/sev: Add core scheduling for SMT Protection i386/sev: Add core scheduling for Enhanced SMT Protection qapi/qom.json | 16 ++++++- target/i386/sev.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++ target/i386/sev.h | 2 + 3 files changed, 130 insertions(+), 1 deletion(-) -- 2.43.0