From nobody Mon Nov 25 07:55:58 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=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1717068277; cv=pass; d=zohomail.com; s=zohoarc; b=JEbMyYU0cURhCk9uvi8232RGhMdNd5Zwn+Kq0bdaSJdQSjla9n+K9uwCnxaJ8IrS6H83CkGCQldc7zfOmFTUXa1yooYlZvMa6lDKbniA/W/SaMHSBEvPTIeOWpbHoAl4DHH3I/6Ps3aNan8g2XdpJxM+a68Ot+dkSufFEQI6zNQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717068277; 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=0MUj7HUGNMWagF8RJh+gApWGW5TbAFgo1Owe6jlLlh8=; b=fXWu2mbzSxIYr9HH39YFRTxlDiauyMIsGoJhNH1lZQxceCWRF0jljZPkFh1YBXjwHTTMith+E4Ba996R85f+oAPsG4rw0NBFycgM/8FeSVqsjctWVuWF+tXDS113XikaZEKbYjzcEZnjJzAeo5yvof5Gwbor/SCPjjzVJ1YZk3c= 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=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717068277535887.5894313545193; Thu, 30 May 2024 04:24:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCdmL-0005xt-2N; Thu, 30 May 2024 07:17:05 -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 1sCdmI-0005vw-Vf for qemu-devel@nongnu.org; Thu, 30 May 2024 07:17:02 -0400 Received: from mail-co1nam11on20601.outbound.protection.outlook.com ([2a01:111:f403:2416::601] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCdmD-0001Qy-W2 for qemu-devel@nongnu.org; Thu, 30 May 2024 07:17:02 -0400 Received: from BN1PR14CA0016.namprd14.prod.outlook.com (2603:10b6:408:e3::21) by MW3PR12MB4476.namprd12.prod.outlook.com (2603:10b6:303:2d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Thu, 30 May 2024 11:16:53 +0000 Received: from BN2PEPF00004FBC.namprd04.prod.outlook.com (2603:10b6:408:e3:cafe::28) by BN1PR14CA0016.outlook.office365.com (2603:10b6:408:e3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30 via Frontend Transport; Thu, 30 May 2024 11:16:53 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BN2PEPF00004FBC.mail.protection.outlook.com (10.167.243.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7633.15 via Frontend Transport; Thu, 30 May 2024 11:16:53 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 30 May 2024 06:16:51 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 30 May 2024 06:16:51 -0500 Received: from pankaj-M75q.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 30 May 2024 06:16:51 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SioOTpnvwdHphJ1sp0uHuuWbfDb/sXyY48L6m84zyGTt85e4A5ag/khSexaoOuqPuZoGutK55SuzYPwPO7in8cihcZsPAmrBAaPDbJ7xgGvyTYKxsBHy5ubcXa2tNbXqO6dN99DWOln55nf/8Zo/6yRC75tiRpprjUxKZekS2o9Nl+ces4CrAVEDJl+fHRoEZt55Di3ksCuRgZwCmgmpdkjk4zlmNciqsuBw3F8g6jpNxMM2fIPq/rKXf/A7l8ViOSsYnM1iSbZNTn1ES82tSGjeDlr/b1oUKbScz/yQWKxz7x1QK7WquCM4bfNJWFndIYsTggNNosSeZ3YOeoiM8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=0MUj7HUGNMWagF8RJh+gApWGW5TbAFgo1Owe6jlLlh8=; b=J/d4+85NR3EYquQGaLQ9KCJBYpRB76xT0GMqYDpOqRHGeLvuAvkbJwn4fh2n4L7HSSuwrMj0QsRPW+SD3D4L9MvckYQ+osr+pIm/FANd0PH5fS/00+zxL9G4erxbTJl/GdT3U1kqLzV5XNeMweNLp+UcTkBmeYdlD8dd2AFNv25y9JEooMYUGrfpdR0vlEx2Tly0o3ncpZFUXhz9APoe3hxqG2y5CUMOqO/+aiNuaj8lCU/Wt4tSLmjFLuIeEctWXm71nxbL66/x4b2+/TNLqVAqVz2Nm/ZcLqAwfhUOK2us/J1ws3LTp91xUBdwuztiaUgK8Uf0ToHsDHtsFr0ROg== 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=0MUj7HUGNMWagF8RJh+gApWGW5TbAFgo1Owe6jlLlh8=; b=eSCo7WVYKyuIZ3R7KjHsLlC8PVii4XIVEfwUryrZ2HGgT328qsc8f9uNPbMwMvJKOWoCpn/cmfY/+4uH1ZvrIhNtpOUwujjo1CSy/DwUT7ytv4HGFqiTslveJysWpCDcX3vdWt6EM32Rg3Ul8XImOje0OYVPKqEACawp3SQ+MMk= X-MS-Exchange-Authentication-Results: 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 (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 (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=SATLEXMB03.amd.com; pr=C From: Pankaj Gupta To: CC: , , , , , , , , , , , Subject: [PATCH v4 11/31] i386/cpu: Set SEV-SNP CPUID bit when SNP enabled Date: Thu, 30 May 2024 06:16:23 -0500 Message-ID: <20240530111643.1091816-12-pankaj.gupta@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240530111643.1091816-1-pankaj.gupta@amd.com> References: <20240530111643.1091816-1-pankaj.gupta@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FBC:EE_|MW3PR12MB4476:EE_ X-MS-Office365-Filtering-Correlation-Id: fa116370-f440-4c39-5fc0-08dc809a023d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|36860700004|376005|1800799015|82310400017; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ZPh7fvzv+MlEoPZ+Y1Op4PGot8xx3x/IJMq/VlpyVOsKwMAEtpBM/ENFcA1r?= =?us-ascii?Q?QpznHNrKkvQrAhiTqKfk7L9nYE8a2+wtnlqieUW5zK0r53r17taQxGkgVVPS?= =?us-ascii?Q?MqcXd08UaZYZMV0hDIDHYAlupZ2/I5MAgZ9UQPOguom0w2AfijA6M8uhlTNW?= =?us-ascii?Q?cvZBuBBEfvlpZrI9R8nSmA70haCofjKcnD97RAsb6w0snIREoIF3EhEb83U2?= =?us-ascii?Q?Jnmmp+mW2oK3lIVfNkB2BFk0IotIgx6SdweDvulsV4s5x9lYjHQypyBqtPYv?= =?us-ascii?Q?DTXPEdnyKgFCg+yjPCTIJW8v8DzuxUgO8pG/E1UOD1/3Ov/8X2OenfJ+ZbCa?= =?us-ascii?Q?tquThROw4EsCRcC/00fAt3fHUKlLPquQAW+vsuu4L8ZJwDx355rUxTYyGANj?= =?us-ascii?Q?UBCTMlhpKhI+ECd4oAoZRPsdX9PTRZXeHTUS/ZHmwlx7Tt1CkdYcTUvdqdcj?= =?us-ascii?Q?JK2Y328y4BDm0yysR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QJBQr?= =?us-ascii?Q?mVzliuJro2jUWJNQk1ILVGGL77Zm?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(36860700004)(376005)(1800799015)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 11:16:53.0350 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa116370-f440-4c39-5fc0-08dc809a023d 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FBC.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4476 Received-SPF: permerror client-ip=2a01:111:f403:2416::601; envelope-from=Pankaj.Gupta@amd.com; helo=NAM11-CO1-obe.outbound.protection.outlook.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.085, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 @amd.com) X-ZM-MESSAGEID: 1717068277968100005 Content-Type: text/plain; charset="utf-8" From: Michael Roth SNP guests will rely on this bit to determine certain feature support. Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- target/i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index bc2dceb647..914bef442c 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6979,6 +6979,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, = uint32_t count, if (sev_enabled()) { *eax =3D 0x2; *eax |=3D sev_es_enabled() ? 0x8 : 0; + *eax |=3D sev_snp_enabled() ? 0x10 : 0; *ebx =3D sev_get_cbit_position() & 0x3f; /* EBX[5:0] */ *ebx |=3D (sev_get_reduced_phys_bits() & 0x3f) << 6; /* EBX[11= :6] */ } --=20 2.34.1