From patchwork Sat Jun 3 03:22:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 13266058 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54ED5C77B7A for ; Sat, 3 Jun 2023 03:24:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5Hrh-0004j5-Ao; Fri, 02 Jun 2023 23:23:41 -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 1q5Hrg-0004iw-6V for qemu-devel@nongnu.org; Fri, 02 Jun 2023 23:23:40 -0400 Received: from mail-bn8nam11on20600.outbound.protection.outlook.com ([2a01:111:f400:7eae::600] helo=NAM11-BN8-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 1q5Hrd-0002yQ-77 for qemu-devel@nongnu.org; Fri, 02 Jun 2023 23:23:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eixLZ/GJT7omYwzoc1TF38X9dTPO7ePUzAtHxLi5mxCDfRuOD1ARwFWJk6AdjZLBZdZXlfJ9mP3xpzkmCSlkX2btu+aX+nOiOm+ZPcelowmFnx4dWTyM+aKQRPRZHSeFOroXXB5jtrC+U6Nu+QhG64dnVKorUmhevjohx8Qj10093yVOG8/kZQjj93AZlNlQW2fiDY9qbTig+3B2HLYeayYXWl0R6BZg+rUGkfTgJIWfFLZmye+D7E2bsBm1PRePRgL01JbxgSaZH05rGvaB5vKOEj2S97QKLOwuKPOjUFP18KLgyeiht+GjTRzBy11JoUfjSV309JI3V2ZlITAONA== 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=IFhxDCRF8GeMrrS0ZI/crF3sNgmkXLGkAy9E/tO6Tuc=; b=affqTDKQupcDqe1IKTHUCIB5GwxGCmzdHe3iR9dmylN8Gzy6Rz8m5IHJxnDo9b+t8IOMw3TDlWRnUCinngYmx922PPhtPp/lR//iam/CjtGH1smoIxbvVFJhGKcDjFZuK/nV+xvO9bRlJ1syJP7r+JH422SYaXndyFbSXo6aQ4agTWU5q+A2qjILI/PLUaWM/DmPHgmIBTTT6o/e5iYyYRojnzCmUytjuYWi3uh4BuB0etLmQDF+RTU6x0uNmS8fiW0hlSSN/8tNhXGhb3++XPaufY6OOgON/NemT/TVWwKcgLO/siPzKdyeWL9jzuzzRT+685PphqS9mRYY+/EZ1w== 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 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=IFhxDCRF8GeMrrS0ZI/crF3sNgmkXLGkAy9E/tO6Tuc=; b=BuhixTyRbo5UOgERrUVvyCtxLrv43In4e3LFMy8qQOiCsaNIMOLKQ8mWjKiDLTjZ8Ion9zzl0wRH17gS4tGgS/RyeebuPXr6B3+DfhGu5QAP+vIGp35vr/BZyB1lMMTPjD0WJV/VtnUbOs+vgcFCzGV1FdnRZZ8LCJAiTfukULA= Received: from MW4PR03CA0098.namprd03.prod.outlook.com (2603:10b6:303:b7::13) by CH0PR12MB5170.namprd12.prod.outlook.com (2603:10b6:610:b9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.28; Sat, 3 Jun 2023 03:23:28 +0000 Received: from CO1NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b7:cafe::c8) by MW4PR03CA0098.outlook.office365.com (2603:10b6:303:b7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Sat, 3 Jun 2023 03:23:27 +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=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT036.mail.protection.outlook.com (10.13.174.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.26 via Frontend Transport; Sat, 3 Jun 2023 03:23:27 +0000 Received: from ruby-95f9host.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 2 Jun 2023 22:23:26 -0500 From: Suravee Suthikulpanit To: CC: , , , , , , , , , , , , Suravee Suthikulpanit Subject: [PATCH v3 1/2] hw/i386/pc: Default to use SMBIOS 3.0 for newer machine models Date: Fri, 2 Jun 2023 22:22:54 -0500 Message-ID: <20230603032255.517970-2-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230603032255.517970-1-suravee.suthikulpanit@amd.com> References: <20230603032255.517970-1-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT036:EE_|CH0PR12MB5170:EE_ X-MS-Office365-Filtering-Correlation-Id: 5127c72a-fe31-4011-55f6-08db63e1e5f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p98h5zIMLhqS88lnPZyZcCsc7v+3eBgAxdm1LbOaxI21rdL784QKyOvomDQVAmCsFUe+3FR/FA1uX0XKKEbhch8JwXiMkM+Ud8kmWAg4lrImKac4LhqLRUCpIfTxfoChCAUu/um+NaNLCo05Uu/mSjtK2lsiXiBlcSXBRqAGI0L+39HGEkw9cDLjzpQsjcYklcvZOgVyZrPaknw7fBTetE5J80seh43BYHHpM3eJatd7PSejnPWSCXPLGw3GJ4tNEImU2m/B2k47ptlBLPC8W3ilWKu5uqcn9YTNSc+quLVjBuSvpNh69SpgbaAP3DlR0Qu3OY4vKbZSfOjun6GrCWNQKKEwwVJc2SZrDxdc4eDoVAQc+xTp2SMRTSjjeKmLG6k54O5k66AtOmvilRTEgMummbN/lsjZwC8o/MYNrEaDtMUGRKTYD6I8H5P2wI4CdHCAczAml++rM+336aqaJQj/tmjh18XX/zH7q+ybGkkMZaeC4wLQEWKyfp/xEewZRyT9VnbixVplpby54v/Cl/qyia1HnakByVpK7Oxyq6tN7RseT4cD0ixQU+lpqwd6bEqmLk/I1/Cy2fc40i6KPXtkn/fsUyqN5p/IzccCKxrNCeQMG/QJFClAwQjgEuzge1Hx2mVY/KEYmghEIYzEHN+yql05lVK8agzDwU5OsUoQyZ1y9MlvEIjceeODd/jpd/A4XhPdAS+r3FVGnRT1lnvSvZ/sT0ZF1WxHp/qKEv52TfkUD2w2twGS4+MSuozMmLtdF/PSI5HsfeBLbe7JHJUwgTou5F+NDxBqCE36UHk= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(346002)(376002)(396003)(136003)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(82310400005)(7696005)(40460700003)(6666004)(26005)(1076003)(40480700001)(83380400001)(47076005)(426003)(336012)(36860700001)(16526019)(186003)(36756003)(2616005)(86362001)(82740400003)(356005)(81166007)(44832011)(7416002)(54906003)(5660300002)(316002)(41300700001)(8676002)(8936002)(6916009)(4326008)(70586007)(70206006)(478600001)(2906002)(170073001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2023 03:23:27.8437 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5127c72a-fe31-4011-55f6-08db63e1e5f4 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5170 Received-SPF: softfail client-ip=2a01:111:f400:7eae::600; envelope-from=Suravee.Suthikulpanit@amd.com; helo=NAM11-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Currently, pc-q35 and pc-i44fx machine models are default to use SMBIOS 2.8 (32-bit entry point). Since SMBIOS 3.0 (64-bit entry point) is now fully supported since QEMU 7.0, default to use SMBIOS 3.0 for newer machine models. This is necessary to avoid the following message when launching a VM with large number of vcpus. "SMBIOS 2.1 table length 66822 exceeds 65535" Note that user can still override the entry point tyme w/ QEMU option "-M ..., smbios-entry-point-type=[32|64]. Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc.c | 5 ++++- hw/i386/pc_piix.c | 14 ++++++++++++++ hw/i386/pc_q35.c | 14 ++++++++++++++ include/hw/i386/pc.h | 2 ++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index bb62c994fa..fced0ab0eb 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1770,7 +1770,10 @@ static void pc_machine_set_smbios_ep(Object *obj, Visitor *v, const char *name, { PCMachineState *pcms = PC_MACHINE(obj); - visit_type_SmbiosEntryPointType(v, name, &pcms->smbios_entry_point_type, errp); + pcms->smbios_use_cmdline_ep_type = + visit_type_SmbiosEntryPointType(v, name, + &pcms->smbios_entry_point_type, + errp); } static void pc_machine_get_max_ram_below_4g(Object *obj, Visitor *v, diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d5b0dcd1fe..2905b26666 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -199,6 +199,14 @@ static void pc_init1(MachineState *machine, pc_guest_info_init(pcms); if (pcmc->smbios_defaults) { + /* + * Check if user has specified command line option to override + * the default SMBIOS default entry point type. + */ + if (!pcms->smbios_use_cmdline_ep_type) { + pcms->smbios_entry_point_type = pcmc->default_smbios_ep_type; + } + MachineClass *mc = MACHINE_GET_CLASS(machine); /* These values are guest ABI, do not change */ smbios_set_defaults("QEMU", mc->desc, @@ -453,6 +461,7 @@ static void pc_i440fx_machine_options(MachineClass *m) PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pcmc->pci_root_uid = 0; pcmc->default_cpu_version = 1; + pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_64; m->family = "pc_piix"; m->desc = "Standard PC (i440FX + PIIX, 1996)"; @@ -476,11 +485,16 @@ DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1", NULL, static void pc_i440fx_8_0_machine_options(MachineClass *m) { + PCMachineClass *pcmc = PC_MACHINE_CLASS(m); + pc_i440fx_8_1_machine_options(m); m->alias = NULL; m->is_default = false; compat_props_add(m->compat_props, hw_compat_8_0, hw_compat_8_0_len); compat_props_add(m->compat_props, pc_compat_8_0, pc_compat_8_0_len); + + /* For pc-i44fx-8.0 and older, use SMBIOS 2.8 by default */ + pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; } DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0", NULL, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 6155427e48..2d1bb5fde5 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -199,6 +199,14 @@ static void pc_q35_init(MachineState *machine) pc_guest_info_init(pcms); if (pcmc->smbios_defaults) { + /* + * Check if user has specified command line option to override + * the default SMBIOS default entry point type. + */ + if (!pcms->smbios_use_cmdline_ep_type) { + pcms->smbios_entry_point_type = pcmc->default_smbios_ep_type; + } + /* These values are guest ABI, do not change */ smbios_set_defaults("QEMU", mc->desc, mc->name, pcmc->smbios_legacy_mode, @@ -359,6 +367,7 @@ static void pc_q35_machine_options(MachineClass *m) PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pcmc->pci_root_uid = 0; pcmc->default_cpu_version = 1; + pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_64; m->family = "pc_q35"; m->desc = "Standard PC (Q35 + ICH9, 2009)"; @@ -387,10 +396,15 @@ DEFINE_Q35_MACHINE(v8_1, "pc-q35-8.1", NULL, static void pc_q35_8_0_machine_options(MachineClass *m) { + PCMachineClass *pcmc = PC_MACHINE_CLASS(m); + pc_q35_8_1_machine_options(m); m->alias = NULL; compat_props_add(m->compat_props, hw_compat_8_0, hw_compat_8_0_len); compat_props_add(m->compat_props, pc_compat_8_0, pc_compat_8_0_len); + + /* For pc-q35-8.0 and older, use SMBIOS 2.8 by default */ + pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; } DEFINE_Q35_MACHINE(v8_0, "pc-q35-8.0", NULL, diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c661e9cc80..f754da5a38 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -50,6 +50,7 @@ typedef struct PCMachineState { bool i8042_enabled; bool default_bus_bypass_iommu; uint64_t max_fw_size; + bool smbios_use_cmdline_ep_type; /* ACPI Memory hotplug IO base address */ hwaddr memhp_io_base; @@ -110,6 +111,7 @@ struct PCMachineClass { bool smbios_defaults; bool smbios_legacy_mode; bool smbios_uuid_encoded; + SmbiosEntryPointType default_smbios_ep_type; /* RAM / address space compat: */ bool gigabyte_align; From patchwork Sat Jun 3 03:22:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 13266060 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED76BC7EE2E for ; Sat, 3 Jun 2023 03:29:17 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5HwW-0006B5-48; Fri, 02 Jun 2023 23:28:40 -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 1q5HwV-0006Al-F9 for qemu-devel@nongnu.org; Fri, 02 Jun 2023 23:28:39 -0400 Received: from mail-bn1nam02on2055.outbound.protection.outlook.com ([40.107.212.55] helo=NAM02-BN1-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 1q5HwT-0004BA-OU for qemu-devel@nongnu.org; Fri, 02 Jun 2023 23:28:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PCtAopJMv9bUE5GRPZOl10CaUxaM5nPVs+EvD39iITPmkspxrept+omXdyYZ6F/n5sH3Ul4HgVTWsjbROW1Z9sYl9QOPQkEIDmxrdl/kqo+QjY4nyynb339exJlpcs+SLBQkYAPn4W59b/1fdHWtKhc0Sa0UkS+UHmSNLP4UXXVIXUTMdIo5L33rKUPX/2hQ2P68PypG4oDlO33yxFGoq95ApWlYzMvToQur/mnG6YWbUcfjgsshXT4SyRpIspg+kp58w1IQ+6LBtgrsv7hBY+TLKbEGrKKA/VMuXsIDMZgjcqAWw0WCBdChDXv8JPSCoonyXvts2gWufPITiVIKTg== 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=2AUH5ZzbbZrnJLCPeVg0EBQY4hBBai9hokh+P52e6iQ=; b=LqiJo3uHQykw4i3d8OoIq5SXzwYxsqbrOC9MG0b/NebN1J3PFMZHRxeJcHlM5VyYqKi0CAzeALCNMNH3aCDjSMlZ4cPAZGKV9tENMRuQQHxYH2NZIV+J2yBrEZwI5+uxxtM9lETCkLDe/h9zxZ9D5nnCrVwrGHIcYn1BXxE+kbXYUZrMr7eN2ljv51yF9U7IRcsn384Tc5jaFxY/PvK5mWytlErDZdlT/j8LhUP0uZDri7tDQuKpddnZ8oVf4g2nxKYuuqA5PGvpEfExP40EA4KuBpBWe3nDWo+LtDx9EhWWuyxHXcqY9Ip6rQ3wgbmktuOkp52L1UC4bM2XNcscFQ== 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 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=2AUH5ZzbbZrnJLCPeVg0EBQY4hBBai9hokh+P52e6iQ=; b=R2yZTNxBeY9y0M6xzH8tbwWT3TrSIkJA7JoBy3RFh3dgpZTzDhfNulzI7rYBFV94F+3nIMaTim6JbrMBmYqV1zvAwDIfPgqjQrIuMvReS4gFnIvm3XpMgjQRWm/5nYkRpQTU3FssVeZxhpHmg2D4mulFjJL4yQC/oPPbjIW83/s= Received: from MW4PR03CA0096.namprd03.prod.outlook.com (2603:10b6:303:b7::11) by SA3PR12MB8024.namprd12.prod.outlook.com (2603:10b6:806:312::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.27; Sat, 3 Jun 2023 03:23:29 +0000 Received: from CO1NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b7:cafe::7f) by MW4PR03CA0096.outlook.office365.com (2603:10b6:303:b7::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Sat, 3 Jun 2023 03:23:29 +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=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT036.mail.protection.outlook.com (10.13.174.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.26 via Frontend Transport; Sat, 3 Jun 2023 03:23:28 +0000 Received: from ruby-95f9host.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 2 Jun 2023 22:23:27 -0500 From: Suravee Suthikulpanit To: CC: , , , , , , , , , , , , Suravee Suthikulpanit Subject: [PATCH v3 2/2] pc: q35: Bump max_cpus to 1024 Date: Fri, 2 Jun 2023 22:22:55 -0500 Message-ID: <20230603032255.517970-3-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230603032255.517970-1-suravee.suthikulpanit@amd.com> References: <20230603032255.517970-1-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT036:EE_|SA3PR12MB8024:EE_ X-MS-Office365-Filtering-Correlation-Id: fc441dd2-7fc8-449a-e0a7-08db63e1e698 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I1g20r1WWviOw00tcxHiVQVvl1zr/Xfs4cq+84v5jMzgMSYyAAvnCD+ct3ZK9mF1ZmWF4LzAL8b4NPoO+VEaS1pCA/B1L2nLZ1Ck4HsNtrXqYzmJOV/siDYcGiyaGNWFVw4gsSlQSGR5jAzz24/DPHxW+y5xbotDUflolBo3yX48cRjhwPK1Z5uAlGA4hoy48SWpnJ2Zs3W1F41qtUt7iRV96AN/EYaQzccZJQg7h0gKZGEPn4IKU4aYt0PbZlT7tXj0jHy8NG7CyP1ugKhjdB1KPWZ23NQmcOSFUb5L4BThk+QCPNufxyaSWrHKOkFKlT9dcVyDIQ0b658WEBergo2EWCgbsXxQ32Sy9emYUYQ0dWB8puqX68ZIifuC3+a9GQnR/LGpmjQ1beSCcXN7UiaRaFnhfE0OAw9srRWik0OzoHTP5Lz2cPH8NmxwlhcEVv1Gv+pm3RFUATruJx56ENDDunKeMUdxnBuD/JgNKR7L+oIbNTUtMt52vNGqIlvaBTpsL/+Zc2z423QNeh5jSDdnZzLLUbz9XctDvO/HdgNEd3iP3WS/Y9tH7Oc/Rz+2TZtVZ5Z0NIyEHjq5UTJFR3lUgr+LMQQzrICx7y2jV3iNk+phIr/MBCPmGdq5c0bSgkLso7+wba7+YrU6csNY25fSRj/T8yAxLmIb0hqTWYUSIqmWD3P5e57VupdjhEBP9MlwSxIqxrQdZen1lYekgiVYRJZqO1XfN/T03X/JzaAH9MrarDT2bAT56XjZ2YnH6h/R8jda6RJJjryK0KB340j49ebddj6ZYQ3sZYAC/64= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(346002)(376002)(39860400002)(136003)(396003)(451199021)(46966006)(40470700004)(36840700001)(6666004)(478600001)(54906003)(70206006)(70586007)(2616005)(426003)(336012)(83380400001)(40480700001)(47076005)(40460700003)(36756003)(36860700001)(2906002)(82310400005)(186003)(1076003)(26005)(7696005)(16526019)(81166007)(86362001)(41300700001)(356005)(6916009)(316002)(4326008)(82740400003)(8936002)(8676002)(5660300002)(7416002)(44832011)(21314003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2023 03:23:28.9221 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc441dd2-7fc8-449a-e0a7-08db63e1e698 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB8024 Received-SPF: softfail client-ip=40.107.212.55; envelope-from=Suravee.Suthikulpanit@amd.com; helo=NAM02-BN1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as shown in arch/x86/include/asm/kvm_host.h, update QEMU limits to the same number. In case KVM could not support the specified number of vcpus, QEMU would return the following error message: qemu-system-x86_64: kvm_init_vcpu: kvm_get_vcpu failed (xxx): Invalid argument Cc: Igor Mammedov Cc: Daniel P. Berrangé Cc: Michael S. Tsirkin Cc: Julia Suvorova Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 2d1bb5fde5..2124ada58d 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -382,7 +382,7 @@ static void pc_q35_machine_options(MachineClass *m) machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE); - m->max_cpus = 288; + m->max_cpus = 1024; } static void pc_q35_8_1_machine_options(MachineClass *m)