From patchwork Thu May 30 11:16:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gupta, Pankaj" X-Patchwork-Id: 13680186 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2066.outbound.protection.outlook.com [40.107.220.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5041416F0F3 for ; Thu, 30 May 2024 11:16:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717067811; cv=fail; b=DPWnKE7xYwIoF43n7jNIOprgCRLDj1h+xJ++lwzBnuLg0Nr7D9Gopp8NPwZcLUiCa17VbITZLr4oZO8g5zexnqhTyHDsMTJ9ygvdGcPmeBPJR2WkWouYUdwGj4bF2mwujqB+4lMD2IXaZyqLk/sT5p9gWgqbW1dqjDzgjgEyrVM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717067811; c=relaxed/simple; bh=OlU79fW+oAqIF8r4+Q1tIBUS5LmkzdX+wV6EyWSbnHg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VUuL9P7DpdORdTaF9+b1XrnRRazmSYSgD/3G3iv/VsNh1RlrS6Nd58p0ufWSe+ZpXerAayh+F7VG7XoFsLZaaifI+oXihpIKzoR5PUAqShbp3qwrG6wyVsqAbUhvvwdE/UednY271XJiD7wTN40iIXscD2Su4N5rL1TlZMFSDCs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=1L5ZO1qf; arc=fail smtp.client-ip=40.107.220.66 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) header.d=amd.com header.i=@amd.com header.b="1L5ZO1qf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bmg4yI4X0hR5wxxil6w6dwHF24qvhP+DRKZNLe0JV7p6JMHjg8NrAV2eRF0btQ8ttJgeLbwVkhX0iDWdhTgkB9Ahuu1EjlPYolY8YwIPD2bsGbi55UdDtbvo84rK5BkKE096icXEDTIISReGCa1NqH7dtaXnIC3QLV7GaSMWlYl8AYar95+JWFZawhBGxMUzzpj4xDHndvGdh/g9nmlwcBEBBMykZmQdBz73mNOB3lYtmR5QUimBbOsXpPz7sL8th8DUqSv3BfY6oiIJzHpkipdrIlglkgdmmftS7bop0cqYoWDin/HKaXCsVUfCuJFjFZhTmh3tpBDI4BF3f97s2Q== 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=IHDPUk3qDcJUq2+XauMilZ6tBTfb5QzNxjQVcPify5U=; b=naVuXZW/gqis8LzNym8UGdNAHmBLQ+FOmPMJuaZhkUEADRlW85WFNf7wPnIaKv5d4IVK8u7a1sU0NN1EYaQHUSDxltzkumkCL4PHa38d5RDz5wwhtVK5XkUkO9iSNWp9YJ0kp0MPudXHP+kBLTVbb6q//61XijOLfh9KuHfY5ks+8HVDYvIjTQyyu9APp0Ck4Pro6UIe7wqUuXcGQH7lQ0Uhj2KteKjX3kaCNwgRko5eP5MAsWUngHTmVdV06AenlIz+TCtNdnBfnOieE3+Yx32RHTMh/KCoVSqRcUo7z/tQrGnPvve7ai1Q5MJcuTliSLU5p9SPZZw1lum1eLs3zA== 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=IHDPUk3qDcJUq2+XauMilZ6tBTfb5QzNxjQVcPify5U=; b=1L5ZO1qfsmHjHUF/C2F7CmN3M+U1pgthcs3hPAeXWDzvheDkW/gxVeb1Qs7/MgAcDXNwKx9m/itY/E7quAiGpnvE/ykkTqL7KPitsRS4TEywq6m7VJ8BZrRpPEetWYcjAAJv/JPamtPKUsrGjrKFlLOi8drQHUz3R8DvHn/YTps= Received: from BL0PR02CA0137.namprd02.prod.outlook.com (2603:10b6:208:35::42) by DS7PR12MB6262.namprd12.prod.outlook.com (2603:10b6:8:96::7) 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:45 +0000 Received: from BN2PEPF00004FBD.namprd04.prod.outlook.com (2603:10b6:208:35:cafe::50) by BL0PR02CA0137.outlook.office365.com (2603:10b6:208:35::42) 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:45 +0000 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 (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 Received: from SATLEXMB03.amd.com (165.204.84.17) by BN2PEPF00004FBD.mail.protection.outlook.com (10.167.243.183) 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:45 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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:44 -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:44 -0500 From: Pankaj Gupta To: CC: , , , , , , , , , , , Subject: [PATCH v4 01/31] i386/sev: Replace error_report with error_setg Date: Thu, 30 May 2024 06:16:13 -0500 Message-ID: <20240530111643.1091816-2-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> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: pankaj.gupta@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FBD:EE_|DS7PR12MB6262:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f98420b-847b-4f10-32a2-08dc8099fd8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|82310400017|376005|36860700004; X-Microsoft-Antispam-Message-Info: BA2Ft6ME4jmqtZN/fU6pUCOLAsMt5ivr0OoAmH+RF7EjCpMP1MnfMPpTGHcoC/4ghJuU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Wm6UYhEfsmcaEJSJMcNEldPLgYk1pgoy4YNypEP5+HknFDGwq51jIoK2c27HQVdQCq4w0SwRLgjfCi608YAp1bWVqRicYVQqJ8wcd6gB288RlXDWIthGNld5M3JzBQ0fo/2ExlXG+JO3ZOcIwAUzZGl2IUt1c9HqG4S5OuCnnvNLguEc0JIDawe435rkIoZC+KrTuFtisXmgKwWspzgNp/4w800JakjXvdpk7FM8NyM8g= 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)(1800799015)(82310400017)(376005)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 11:16:45.1605 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f98420b-847b-4f10-32a2-08dc8099fd8e 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: BN2PEPF00004FBD.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6262 Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index d30b68c11e..67ed32e5ea 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -952,13 +952,13 @@ static int sev_kvm_init(ConfidentialGuestSupport *cgs, Error **errp) if (sev_es_enabled()) { if (!kvm_kernel_irqchip_allowed()) { - error_report("%s: SEV-ES guests require in-kernel irqchip support", - __func__); + error_setg(errp, "%s: SEV-ES guests require in-kernel irqchip" + "support", __func__); goto err; } if (!(status.flags & SEV_STATUS_FLAGS_CONFIG_ES)) { - error_report("%s: guest policy requires SEV-ES, but " + error_setg(errp, "%s: guest policy requires SEV-ES, but " "host SEV-ES support unavailable", __func__); goto err;