From nobody Tue Nov 26 20:36:27 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; dmarc=pass(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1703851748; cv=none; d=zohomail.com; s=zohoarc; b=UxDb/dR4JBx+AC9kIeL+maTMkVp8NkwthEVam7M1+hx0y8LMdMXj+1d0OAXsf0DtTONBUY7Urp4tDzZ5u/QQU0ZQelTG/cyqI5exkSkSzGNwwuSY6uVUy2wntCxc5tCji7PDa47cEQ5oK1U97SVGM+4wppRz2UWa07D/rZ9qZss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703851748; h=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=pGgf1wpWz9czkWxYTWfdhI7PjQQXILGRmvI6GlRv8qc=; b=nFlqvZNTUWFgQIXu8WPSFIH24QKX+sD1QRmlXv/8MCfDnwFUz5aCSKQbK9IxYkt1uO6Ib5LA38yptTkKIz06n9iGFt2ndav9QrqKeo/KzlBI23h2EsCvwxyn74+cyoWeC5+H7vfQsPeNEB0p3qFdL1JVPtw1SLTL9q4HCArK1pk= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703851748808919.3933794203126; Fri, 29 Dec 2023 04:09:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJBeM-0007lS-P5; Fri, 29 Dec 2023 07:07:38 -0500 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 1rJBeI-0007lE-Vb for qemu-devel@nongnu.org; Fri, 29 Dec 2023 07:07:35 -0500 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJBeG-0004yQ-Da for qemu-devel@nongnu.org; Fri, 29 Dec 2023 07:07:34 -0500 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 6706E3F5A0 for ; Fri, 29 Dec 2023 12:07:29 +0000 (UTC) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5558d3d179eso775936a12.2 for ; Fri, 29 Dec 2023 04:07:29 -0800 (PST) Received: from x13s.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de. [178.202.40.247]) by smtp.gmail.com with ESMTPSA id j20-20020aa7c0d4000000b005527de2aecfsm10943344edp.42.2023.12.29.04.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 04:07:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1703851649; bh=pGgf1wpWz9czkWxYTWfdhI7PjQQXILGRmvI6GlRv8qc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kh/b+W3h0bPjGsnH0eGUSZum9A9k/J23OkQ9WjDSeDGj72/pkZi+BoOl729IF/Rtu jubUkCjkk62YQY4QBjwwMyrBgixlRNfGcc9rhdYu0oKoiaQCO94STqCJ7ipYKO5lKC n5zaRaNU2SqQUPPqqIEUREHXbhIs2JR/czLd83aU2TKPoOgylAOdmIRM+ytOs3tqRL Pof8nId1m3BpWsl5UonhotkBmrWZn7aApmHcfRrd0ZSc1CaQWvha5gAGkXWi4Jc3lQ pVSKdJNzCNZuD6YcDUCaGQcG69KH6leGGuOs3bmszbC6b1A/88YumQlo3ZgrqlZ//M 6MDIIZbuLijPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703851649; x=1704456449; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pGgf1wpWz9czkWxYTWfdhI7PjQQXILGRmvI6GlRv8qc=; b=jjst4D5DbNnArfYouxpta6GyppWZRFpcIB+r6HIQjy7c1GnnXDeP9EfIy/RG7mNGA0 EYrF6oqva6+3UvDeAb8w6LxJ/9kcIzoczAfPFMc14AgH+mSARevxbXgika6W/PwuJbN4 4pb7qQXpnhNfcqb2zCNgR0QvAFuZYCx9SKBjHI9GxXWFRnAnAjtfXn+HTxAYIzQ5C+YB t+/A0Lt3eHYIAubRO/IcS/wTnZPh+cQnb7mCCsA8EV0X7OPFsR4tXDywDXgRfRW8H7XU y4GIxRnkuRU5ZAn6kvUrEz6aJ6r8GInG2nztK77sjMsnPd7jgjhUv3k/GdH/ArqS5liU 12bg== X-Gm-Message-State: AOJu0Yx2U1smwTyN852QPtfdeXmwF4ysx/s2MddMu8U/3AJmN/JmnIIv /ba6TrSW7V0WueogFobJdBXtrIFlucXd/lnag8vQQWyxHWbnGSHLK6HgUONWpVx/5nL4n5tMnCe HPhQYiFoPHDAarkf475n8LdTWJsnydOy/KQ/qCG4= X-Received: by 2002:a05:6402:4306:b0:552:e52f:944f with SMTP id m6-20020a056402430600b00552e52f944fmr8720990edc.56.1703851649111; Fri, 29 Dec 2023 04:07:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKtkP9I56djALZdyds52h6QCcSlIsN2FDsDg5tG/s/KktteQ7TeJQgHIrtCYMKmU8FW1VeRA== X-Received: by 2002:a05:6402:4306:b0:552:e52f:944f with SMTP id m6-20020a056402430600b00552e52f944fmr8720987edc.56.1703851648874; Fri, 29 Dec 2023 04:07:28 -0800 (PST) From: Heinrich Schuchardt To: Palmer Dabbelt , Alistair Francis Cc: Paolo Bonzini , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, Heinrich Schuchardt Subject: [PATCH v2 1/4] smbios: add processor-family option Date: Fri, 29 Dec 2023 13:07:21 +0100 Message-ID: <20231229120724.41383-2-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231229120724.41383-1-heinrich.schuchardt@canonical.com> References: <20231229120724.41383-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 client-ip=185.125.188.122; envelope-from=heinrich.schuchardt@canonical.com; helo=smtp-relay-internal-0.canonical.com X-Spam_score_int: -69 X-Spam_score: -7.0 X-Spam_bar: ------- X-Spam_report: (-7.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.553, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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 @canonical.com) X-ZM-MESSAGEID: 1703851749898100006 Content-Type: text/plain; charset="utf-8" For RISC-V the SMBIOS standard requires specific values of the processor family value depending on the bitness of the CPU. Add a processor-family option for SMBIOS table 4. The value of processor-family may exceed 255 and therefore must be provided in the Processor Family 2 field. Set the Processor Family field to 0xFE which signals that the Processor Family 2 is used. Signed-off-by: Heinrich Schuchardt Reviewed-by: Alistair Francis Reviewed-by: Andrew Jones --- v2: new patch --- hw/smbios/smbios.c | 13 +++++++++++-- qemu-options.hx | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 2a90601ac5..647bc6d603 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -102,6 +102,7 @@ static struct { #define DEFAULT_CPU_SPEED 2000 =20 static struct { + uint16_t processor_family; const char *sock_pfx, *manufacturer, *version, *serial, *asset, *part; uint64_t max_speed; uint64_t current_speed; @@ -110,6 +111,7 @@ static struct { .max_speed =3D DEFAULT_CPU_SPEED, .current_speed =3D DEFAULT_CPU_SPEED, .processor_id =3D 0, + .processor_family =3D 0x01, /* Other */ }; =20 struct type8_instance { @@ -337,6 +339,10 @@ static const QemuOptDesc qemu_smbios_type4_opts[] =3D { .name =3D "part", .type =3D QEMU_OPT_STRING, .help =3D "part number", + }, { + .name =3D "processor-family", + .type =3D QEMU_OPT_NUMBER, + .help =3D "processor family", }, { .name =3D "processor-id", .type =3D QEMU_OPT_NUMBER, @@ -726,7 +732,7 @@ static void smbios_build_type_4_table(MachineState *ms,= unsigned instance) snprintf(sock_str, sizeof(sock_str), "%s%2x", type4.sock_pfx, instance= ); SMBIOS_TABLE_SET_STR(4, socket_designation_str, sock_str); t->processor_type =3D 0x03; /* CPU */ - t->processor_family =3D 0x01; /* Other */ + t->processor_family =3D 0xfe; /* use Processor Family 2 field */ SMBIOS_TABLE_SET_STR(4, processor_manufacturer_str, type4.manufacturer= ); if (type4.processor_id =3D=3D 0) { t->processor_id[0] =3D cpu_to_le32(smbios_cpuid_version); @@ -758,7 +764,7 @@ static void smbios_build_type_4_table(MachineState *ms,= unsigned instance) t->thread_count =3D (threads_per_socket > 255) ? 0xFF : threads_per_so= cket; =20 t->processor_characteristics =3D cpu_to_le16(0x02); /* Unknown */ - t->processor_family2 =3D cpu_to_le16(0x01); /* Other */ + t->processor_family2 =3D cpu_to_le16(type4.processor_family); =20 if (tbl_len =3D=3D SMBIOS_TYPE_4_LEN_V30) { t->core_count2 =3D t->core_enabled2 =3D cpu_to_le16(cores_per_sock= et); @@ -1402,6 +1408,9 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) return; } save_opt(&type4.sock_pfx, opts, "sock_pfx"); + type4.processor_family =3D qemu_opt_get_number(opts, + "processor-family= ", + 0x01 /* Other */); save_opt(&type4.manufacturer, opts, "manufacturer"); save_opt(&type4.version, opts, "version"); save_opt(&type4.serial, opts, "serial"); diff --git a/qemu-options.hx b/qemu-options.hx index b66570ae00..7bdb414345 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2694,7 +2694,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios, " specify SMBIOS type 3 fields\n" "-smbios type=3D4[,sock_pfx=3Dstr][,manufacturer=3Dstr][,version=3Dstr= ][,serial=3Dstr]\n" " [,asset=3Dstr][,part=3Dstr][,max-speed=3D%d][,current-s= peed=3D%d]\n" - " [,processor-id=3D%d]\n" + " [,processor-family=3D%d,processor-id=3D%d]\n" " specify SMBIOS type 4 fields\n" "-smbios type=3D8[,external_reference=3Dstr][,internal_reference=3Dstr= ][,connector_type=3D%d][,port_type=3D%d]\n" " specify SMBIOS type 8 fields\n" @@ -2722,7 +2722,7 @@ SRST ``-smbios type=3D3[,manufacturer=3Dstr][,version=3Dstr][,serial=3Dstr][,as= set=3Dstr][,sku=3Dstr]`` Specify SMBIOS type 3 fields =20 -``-smbios type=3D4[,sock_pfx=3Dstr][,manufacturer=3Dstr][,version=3Dstr][,= serial=3Dstr][,asset=3Dstr][,part=3Dstr][,processor-id=3D%d]`` +``-smbios type=3D4[,sock_pfx=3Dstr][,manufacturer=3Dstr][,version=3Dstr][,= serial=3Dstr][,asset=3Dstr][,part=3Dstr][,processor-family=3D%d][,processor= -id=3D%d]`` Specify SMBIOS type 4 fields =20 ``-smbios type=3D11[,value=3Dstr][,path=3Dfilename]`` --=20 2.43.0 From nobody Tue Nov 26 20:36:27 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; dmarc=pass(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1703851749; cv=none; d=zohomail.com; s=zohoarc; b=HBMtSLbeXvb0gOyALvihEysCa2SPC+Ac5PpdUrQrCM+IxcvlB3ZPRI/yRX2Kg3tHXenoCeEO0DfzrVwyoYzX7d5J7Pnf65kOVn2Qi5wLySYh2FxYWtPy+0mwzGQvLSQsEmtpIJI1bhIDQF1RM02Dn9dBn15x0pOu7gUvUwNLf+0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703851749; h=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=s14UZKIRamkFLlhaFGm4Uw4f4/c+w2rqs+mbTkZJg4Q=; b=kNRbpBgiDHqJ+Ey7XggWk0/FBnujoJRTeFCzzWCFjnGj8wJHPCc4mAD3V6RVdHZoO0HFV+Bz2PD3fmIys+Fbux8VNTkK5RlDvsE+f96so0ZW3aycw7gnyz3BYKy5IcqDSpA83W9quYWHK3Rktxoo6ua5fYB3fB5LP95f8/0QSMw= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703851749371614.9408559140162; Fri, 29 Dec 2023 04:09:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJBeU-0007p8-Tc; Fri, 29 Dec 2023 07:07:46 -0500 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 1rJBeP-0007mR-Lz for qemu-devel@nongnu.org; Fri, 29 Dec 2023 07:07:41 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJBeL-00050h-VX for qemu-devel@nongnu.org; Fri, 29 Dec 2023 07:07:39 -0500 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A25473F73A for ; Fri, 29 Dec 2023 12:07:30 +0000 (UTC) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-55369c474e1so3996747a12.0 for ; Fri, 29 Dec 2023 04:07:30 -0800 (PST) Received: from x13s.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de. [178.202.40.247]) by smtp.gmail.com with ESMTPSA id j20-20020aa7c0d4000000b005527de2aecfsm10943344edp.42.2023.12.29.04.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 04:07:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1703851650; bh=s14UZKIRamkFLlhaFGm4Uw4f4/c+w2rqs+mbTkZJg4Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HHRDcV1/9I/ygSI0v51rDoZU9nAB9GYPV4zlKFH280a2RqS3gMfcxaJ5A2BsISQwV tSRbW7GskXkqQ5++T5C6cTUsHhCa6+RqaIevYv+mwzLqnre8h2xpyNWGsAOmcZi0Dn NsnbXTKkT+Z6H5xSdvNb0D1dWH+ZiIhRUoydBUv4GP3mOVXzv8o0tEAKGHckv7U4gu tqf3mS8Fac0Z+8cptZ7E2WDUSmavpdwh9CTUJmfZSdYslgzY6/ltN6sitYzjUOkLX8 aeqD+/R3GDXcAh905ojm3/m2GtpPZQP5bDnweRvfMpheAk1Gr7MmRYZu5VLHy360Or QYk+x1HKdoNkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703851650; x=1704456450; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s14UZKIRamkFLlhaFGm4Uw4f4/c+w2rqs+mbTkZJg4Q=; b=puC98nbj7DxwHx6z3CUOpOhj0CsVPoF/7eP29hub8BZlADCdSNq22AR9eL1Oajmwse pUAvi52xv2EbIor2VaoMUDuP/034xGa4sTnGqtZG00I481Dtjp1y5P2zEh/9yIWvgX1w klYGBLq88bGfyIoWDqYz5zw/7B6RLNphtwxLXTZ/cUhE0H8OdZniyT9waseN8sdHbKZb YCAsGC2Wlof0SZnVbHP734ww65DWpzocEYklLv7ALXQuB15/JLnF7uwJ9rb72cqlmFR6 4XS9cmOvPFU5rDoYHYxYMucFE9APxCTfETYkC0rE/V69rBKnoQlbRWAI0fKuBiGOKWcd 3yIw== X-Gm-Message-State: AOJu0Yy3oNei0XQKsWWsargfWbIgpm7RtxEbhs54ETySh2u5JcCuFIDw eIppfiBI2NiQfTaisqBijmCr1+k+pbHgaNTgP7zDjhC4dVZWj3tszDh3bBJeJ6KuzpaW5ZTXinO mR12nZOIhwO2HtKmz5ByQrtt7933J1neCnnJReeY= X-Received: by 2002:a05:6402:2c9:b0:555:ba0d:f5a with SMTP id b9-20020a05640202c900b00555ba0d0f5amr268698edx.123.1703851650080; Fri, 29 Dec 2023 04:07:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnMAoH5Zdij2HsmiFhNYuijcdbfoTJ5d7H8EdOtH7zAeKtc8CGnf2gv00S4ar//jPyieQBAw== X-Received: by 2002:a05:6402:2c9:b0:555:ba0d:f5a with SMTP id b9-20020a05640202c900b00555ba0d0f5amr268693edx.123.1703851649784; Fri, 29 Dec 2023 04:07:29 -0800 (PST) From: Heinrich Schuchardt To: Palmer Dabbelt , Alistair Francis Cc: Paolo Bonzini , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, Heinrich Schuchardt Subject: [PATCH v2 2/4] smbios: function to set default processor family Date: Fri, 29 Dec 2023 13:07:22 +0100 Message-ID: <20231229120724.41383-3-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231229120724.41383-1-heinrich.schuchardt@canonical.com> References: <20231229120724.41383-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 client-ip=185.125.188.123; envelope-from=heinrich.schuchardt@canonical.com; helo=smtp-relay-internal-1.canonical.com X-Spam_score_int: -69 X-Spam_score: -7.0 X-Spam_bar: ------- X-Spam_report: (-7.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.553, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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 @canonical.com) X-ZM-MESSAGEID: 1703851749885100005 Content-Type: text/plain; charset="utf-8" Provide a function to set the default processor family. Signed-off-by: Heinrich Schuchardt Reviewed-by: Andrew Jones --- v2: new patch --- hw/smbios/smbios.c | 7 +++++++ include/hw/firmware/smbios.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 647bc6d603..03fe736565 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -989,6 +989,13 @@ void smbios_set_cpuid(uint32_t version, uint32_t featu= res) field =3D value; = \ } =20 +void smbios_set_default_processor_family(uint16_t processor_family) +{ + if (type4.processor_family <=3D 0x01) { + type4.processor_family =3D processor_family; + } +} + void smbios_set_defaults(const char *manufacturer, const char *product, const char *version, bool legacy_mode, bool uuid_encoded, SmbiosEntryPointType ep_type) diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h index 7f3259a630..6e514982d4 100644 --- a/include/hw/firmware/smbios.h +++ b/include/hw/firmware/smbios.h @@ -295,6 +295,7 @@ void smbios_set_cpuid(uint32_t version, uint32_t featur= es); void smbios_set_defaults(const char *manufacturer, const char *product, const char *version, bool legacy_mode, bool uuid_encoded, SmbiosEntryPointType ep_type); +void smbios_set_default_processor_family(uint16_t processor_family); uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length); void smbios_get_tables(MachineState *ms, const struct smbios_phys_mem_area *mem_array, --=20 2.43.0 From nobody Tue Nov 26 20:36:27 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; dmarc=pass(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1703851764; cv=none; d=zohomail.com; s=zohoarc; b=NUaY2RkwwUXtZ4fR2MHx5kppSHbEfAHg7aEGtrTGiB/xfYzmwNjgXyx9Zte/mpfZhSsYtvJaZmM8b3ZTG4SU2GJGW1BmEi4BQwjGAcPiUmJZFTxMKSNitaAhtRGnGcpioJp/zofUuU5PautGA+9T9ZhG4dsGwyhnETR04X2B6gk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703851764; h=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=vemdfnw4fuVMX6G6P9tHcMdWkK1pe467+6wedQ7UONs=; b=Gu1gCLlRYGBgisfWHs/0W4+FY0SSfyNX5W9l+paLHxsaK3beJeJ4uPTlvYVxB1cfOlrbNNb3CRgHqqn+goKdosvgwP8jHRYTC+RRWJtjoHwrcQs43F7JeX+F5P8ZU6QMdqPaM7nMJ4D+wlry2pyDTqr0ZTVHfUx5o3UXpBN90yQ= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703851764903115.05585895854585; Fri, 29 Dec 2023 04:09:24 -0800 (PST) Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJBeW-0007uP-D1; Fri, 29 Dec 2023 07:07:48 -0500 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 1rJBeR-0007nJ-1a for qemu-devel@nongnu.org; Fri, 29 Dec 2023 07:07:43 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJBeP-00053U-7h for qemu-devel@nongnu.org; Fri, 29 Dec 2023 07:07:42 -0500 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 236243F62F for ; Fri, 29 Dec 2023 12:07:38 +0000 (UTC) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-554db6c03daso2267086a12.2 for ; Fri, 29 Dec 2023 04:07:38 -0800 (PST) Received: from x13s.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de. [178.202.40.247]) by smtp.gmail.com with ESMTPSA id j20-20020aa7c0d4000000b005527de2aecfsm10943344edp.42.2023.12.29.04.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 04:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1703851658; bh=vemdfnw4fuVMX6G6P9tHcMdWkK1pe467+6wedQ7UONs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Low88jdCimMODqu9PcrokdOX9DjvHJqz+WRXm1b5wbSRfHNkJk+eEcU+GwWqWWRP/ SRzMrBiv/+aSxwi4BRKkfUyKPgfEpyiSeL9GjmQ08hgtF5xH3c+3ABfqYe9ZihrUkS kaHcpA4RE7jiLbEGsPqvwvHtNTaQU6n+PcgH8u08prWrPGXyckntOI2/Vv0D+wX1QM PIM3Fv99nCKK19vN9EBwkMi0eMviyRf5otX4WMfqeVHct0ZqEHqeRD+9rFjKVvMc7y od06mWWj1XJLCQLo8YOZjhE6WiF6QZeU02Z6pvfByJMNtV3nKtBKEM0xUCB4tEpnU2 EaJfIkn7P5ChQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703851651; x=1704456451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vemdfnw4fuVMX6G6P9tHcMdWkK1pe467+6wedQ7UONs=; b=HjMt6ZiuXAyd7xFUAr5RugEHIonWA7Akppv9W1sWyneGHibQGqLNCvBsIgkDsNUsoP HgGIibnakVzJonqTs208QZtup3BdiAdk1R5Wzfz/6g2vvq/VC5ea7K5LC+e9v29rtb/U tleKexTPzfXnrlmRmLTFUzZR2VS/O2PN7rHz65gTTxJyZW0Sn2ynWeCER7bKEVv9frJj mFhramelAtacax13MNWyul5u5HOIoVTLbtnoDLkjprs1LSdf6kSjqvUm/9ioF0AFMG5u SbJVDFSj0Nf4AUH/VmKE9yDEl0pE6DHuKWyz+Y/XZkHQvLrPRowoa1AhhgDDbLtlEg2t lviA== X-Gm-Message-State: AOJu0YyA4bMNdFoe6W4fkerDMiPWOklYjVCQ1FWVedyNM5zI4EbQpbgd dBXLPj9w6l7hagnUVHKQTaNmNBeWqP2mqLOaZGGOSe+ojX/uyNWDCni6jByGWPgrkaskcGyxs8j z3mtt/Dzcyg8pYPuEmzEN2LmsrpB7VgsUFTb1ejA= X-Received: by 2002:aa7:d592:0:b0:553:8a0a:f053 with SMTP id r18-20020aa7d592000000b005538a0af053mr5134882edq.39.1703851651056; Fri, 29 Dec 2023 04:07:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9JKnUW3UpSebinoLxEPUFyKK44kliTvqEam9lUE/DJ2bFkoorpyotsfBbD5KpKg9TibBpnA== X-Received: by 2002:aa7:d592:0:b0:553:8a0a:f053 with SMTP id r18-20020aa7d592000000b005538a0af053mr5134871edq.39.1703851650825; Fri, 29 Dec 2023 04:07:30 -0800 (PST) From: Heinrich Schuchardt To: Palmer Dabbelt , Alistair Francis Cc: Paolo Bonzini , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, Heinrich Schuchardt Subject: [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine Date: Fri, 29 Dec 2023 13:07:23 +0100 Message-ID: <20231229120724.41383-4-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231229120724.41383-1-heinrich.schuchardt@canonical.com> References: <20231229120724.41383-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 client-ip=185.125.188.123; envelope-from=heinrich.schuchardt@canonical.com; helo=smtp-relay-internal-1.canonical.com X-Spam_score_int: -69 X-Spam_score: -7.0 X-Spam_bar: ------- X-Spam_report: (-7.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.553, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 @canonical.com) X-ZM-MESSAGEID: 1703851766224100006 Content-Type: text/plain; charset="utf-8" Generate SMBIOS tables for the RISC-V mach-virt. Add CONFIG_SMBIOS=3Dy to the RISC-V default config. Set the default processor family in the type 4 table. The implementation is based on the corresponding ARM and Loongson code. With the patch the following firmware tables are provided: etc/smbios/smbios-anchor etc/smbios/smbios-tables Signed-off-by: Heinrich Schuchardt Reviewed-by: Andrew Jones Reviewed-by: Daniel Henrique Barboza --- v2: set processor family --- hw/riscv/Kconfig | 1 + hw/riscv/virt.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index b6a5eb4452..1e11ac9432 100644 --- a/hw/riscv/Kconfig +++ b/hw/riscv/Kconfig @@ -41,6 +41,7 @@ config RISCV_VIRT select RISCV_IMSIC select SIFIVE_PLIC select SIFIVE_TEST + select SMBIOS select VIRTIO_MMIO select FW_CFG_DMA select PLATFORM_BUS diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index d2eac24156..a876dd8f34 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -36,6 +36,7 @@ #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" #include "kvm/kvm_riscv.h" +#include "hw/firmware/smbios.h" #include "hw/intc/riscv_aclint.h" #include "hw/intc/riscv_aplic.h" #include "hw/intc/riscv_imsic.h" @@ -1249,6 +1250,45 @@ static void create_platform_bus(RISCVVirtState *s, D= eviceState *irqchip) sysbus_mmio_get_region(sysbus, 0)); } =20 +static void virt_build_smbios(RISCVVirtState *s) +{ + MachineClass *mc =3D MACHINE_GET_CLASS(s); + MachineState *ms =3D MACHINE(s); + uint8_t *smbios_tables, *smbios_anchor; + size_t smbios_tables_len, smbios_anchor_len; + struct smbios_phys_mem_area mem_array; + const char *product =3D "QEMU Virtual Machine"; + + if (kvm_enabled()) { + product =3D "KVM Virtual Machine"; + } + + smbios_set_defaults("QEMU", product, mc->name, false, + true, SMBIOS_ENTRY_POINT_TYPE_64); + +#if defined(TARGET_RISCV32) + smbios_set_default_processor_family(0x200); +#elif defined(TARGET_RISCV64) + smbios_set_default_processor_family(0x201); +#endif + + /* build the array of physical mem area from base_memmap */ + mem_array.address =3D s->memmap[VIRT_DRAM].base; + mem_array.length =3D ms->ram_size; + + smbios_get_tables(ms, &mem_array, 1, + &smbios_tables, &smbios_tables_len, + &smbios_anchor, &smbios_anchor_len, + &error_fatal); + + if (smbios_anchor) { + fw_cfg_add_file(s->fw_cfg, "etc/smbios/smbios-tables", + smbios_tables, smbios_tables_len); + fw_cfg_add_file(s->fw_cfg, "etc/smbios/smbios-anchor", + smbios_anchor, smbios_anchor_len); + } +} + static void virt_machine_done(Notifier *notifier, void *data) { RISCVVirtState *s =3D container_of(notifier, RISCVVirtState, @@ -1337,6 +1377,8 @@ static void virt_machine_done(Notifier *notifier, voi= d *data) riscv_setup_direct_kernel(kernel_entry, fdt_load_addr); } =20 + virt_build_smbios(s); + if (virt_is_acpi_enabled(s)) { virt_acpi_setup(s); } --=20 2.43.0 From nobody Tue Nov 26 20:36:28 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; dmarc=pass(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1703851764; cv=none; d=zohomail.com; s=zohoarc; b=BAkIXJ8MmuLKXjIqIf6YJndQfYTxf2Z4izJhW6+yaKi6gvyK81CGPBWQ7IlbnMg2ZlbZBp2tSfOHrxzsu0lTcSjefhp3K4gfODm+oJvZ0AXqJclQc18YrSeTqG2aX02gtYuKHnxHUiQdSpTRsSehYDM1B7ixLnpQonBGkxKyA+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703851764; h=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=SEH1cXhIuqvfvUI/EzQ5KABDAy9IZVCjqX/d3LE2DB0=; b=C290LzOaKEB9jqBYhM+7u/1h88LZes6JJV3NYlaHX+WaK8+oF+McO5E53hj6corHtupMCxLIv+CtGD8IjCRQAEKWC25AC71QaRcVCAAQVrv3h9y7Gfl/Lx0bXkbAsuoqF47SXVq37xvSkddBTAKQRIkIpJry0lRbmhtS6We/9tw= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703851764121832.7116561534406; Fri, 29 Dec 2023 04:09:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJBea-00081J-Qk; Fri, 29 Dec 2023 07:07:52 -0500 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 1rJBeT-0007o0-0r for qemu-devel@nongnu.org; Fri, 29 Dec 2023 07:07:45 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJBeP-00053b-H8 for qemu-devel@nongnu.org; Fri, 29 Dec 2023 07:07:43 -0500 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id C15653F756 for ; Fri, 29 Dec 2023 12:07:38 +0000 (UTC) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5552b98855bso1433404a12.2 for ; Fri, 29 Dec 2023 04:07:38 -0800 (PST) Received: from x13s.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de. [178.202.40.247]) by smtp.gmail.com with ESMTPSA id j20-20020aa7c0d4000000b005527de2aecfsm10943344edp.42.2023.12.29.04.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 04:07:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1703851658; bh=SEH1cXhIuqvfvUI/EzQ5KABDAy9IZVCjqX/d3LE2DB0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZrCak12s5+Pix70ijRLpGOsyW/XiVgjJwmhzdZlLxlA1E5uryY3+tLqBEqECMfCB1 1uJE1kh5M4eGbqekBfrMjNx4LPvNPr/B9leF/gpdocULLqZcYl4gatg2B7p3Fg5nxA ZwIj5g6MZYA7Q1ZPls+VqWwGYyL7CjEnxMoFasotlfX/vXTmO+a/whOVWf+5B8gk4W j3dVn5XyENU3qbfjC5bo9e1EjpabeOKlqE1eo+Bz4otXwUe1dXSm1iv+Gz2tH/nDKQ b7JYayOeUy1c7DJ9AxDVIJvb+06pOR2iapLXTbp/3D2feuJtlMSTb6idtuA00ntK6d z5ERc2roWOk9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703851652; x=1704456452; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SEH1cXhIuqvfvUI/EzQ5KABDAy9IZVCjqX/d3LE2DB0=; b=D5HKJh0aJuKuiL7DFQVjQCJyDqbPzlKqP3sdG5OzmUgWHrf2lXPfqo6QdOQwqrE42d ZU1l/DK/OtDRjvK7i7KrFSePNKSWY+DHwOh5qEDrGRbkXKhs20Hn58m35vgSxe4tEyfM kIPOEkXPG3nHhtMB4aQkFdUVLDXXoiwzz1NHxlIAmdg3orL0PnaX5Of1jlNu2W51zqmr ZII31dDBOMmMaz58mwnS0F9L4yyvpK1Dguqk6WYFEsRuzlC+6lwo9GgN7/yokFzyyfnk 03vrT6qWAysMN2pfKkR5K4EUTiXitS4lS/ws10GyWYsd68ov1frQRDkKpLhjoZNk8iIR MnTQ== X-Gm-Message-State: AOJu0YxnkaYztRAVntHCu7rSXO69iVBpTAgSuRWMMhJNjH/gRul+y97b Xpm00ERWlOw9cBy2O+sndxbAGHjcfmuKNDH1Z7K45Ud2PiUe1GdbL7ArE0tSP1/FllCUsDZwAqG g5B9HRVtbycka7OYZqrU5yPDUnangrVb71sa5B3E= X-Received: by 2002:a50:999c:0:b0:553:721b:81c7 with SMTP id m28-20020a50999c000000b00553721b81c7mr7308060edb.45.1703851651977; Fri, 29 Dec 2023 04:07:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7psCERK1hHsBpfgqNTDEU7miceNbfo+sGfOEnKqiV+mJ0nvSPaGOGrEnVC4zJGpEpvBP+gA== X-Received: by 2002:a50:999c:0:b0:553:721b:81c7 with SMTP id m28-20020a50999c000000b00553721b81c7mr7308047edb.45.1703851651734; Fri, 29 Dec 2023 04:07:31 -0800 (PST) From: Heinrich Schuchardt To: Palmer Dabbelt , Alistair Francis Cc: Paolo Bonzini , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, Heinrich Schuchardt Subject: [PATCH v2 4/4] qemu-options: enable -smbios option on RISC-V Date: Fri, 29 Dec 2023 13:07:24 +0100 Message-ID: <20231229120724.41383-5-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231229120724.41383-1-heinrich.schuchardt@canonical.com> References: <20231229120724.41383-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 client-ip=185.125.188.123; envelope-from=heinrich.schuchardt@canonical.com; helo=smtp-relay-internal-1.canonical.com X-Spam_score_int: -69 X-Spam_score: -7.0 X-Spam_bar: ------- X-Spam_report: (-7.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.553, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 @canonical.com) X-ZM-MESSAGEID: 1703851766218100005 Content-Type: text/plain; charset="utf-8" With SMBIOS support added for RISC-V we also should enable the command line option. Signed-off-by: Heinrich Schuchardt Acked-by: Alistair Francis Reviewed-by: Andrew Jones Reviewed-by: Daniel Henrique Barboza --- v2: new patch --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 7bdb414345..5ed82df11f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2705,7 +2705,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios, " specify SMBIOS type 17 fields\n" "-smbios type=3D41[,designation=3Dstr][,kind=3Dstr][,instance=3D%d][,p= cidev=3Dstr]\n" " specify SMBIOS type 41 fields\n", - QEMU_ARCH_I386 | QEMU_ARCH_ARM | QEMU_ARCH_LOONGARCH) + QEMU_ARCH_I386 | QEMU_ARCH_ARM | QEMU_ARCH_LOONGARCH | QEMU_ARCH_RISCV) SRST ``-smbios file=3Dbinary`` Load SMBIOS entry from binary file. --=20 2.43.0