From nobody Tue Nov 26 17:32:46 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=1705928985; cv=none; d=zohomail.com; s=zohoarc; b=ZEUiPpa6bxowUvyJfJSfNOPohLKkXj4nR4eA/tKy4vxU9E7Ou4xy7ca3Dtfgh57Xq0pQAwSRAQN2p8ZG2CDIPPNYnv+OeM7X6r28XEqaJA3t/GKJBrqytrFg07C8OXOaEz0tsqgmZj5S6uCUOtaR4gDgefMhVUB5RyrNQHiQxUo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705928985; 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=bkdhpseem98U1T18GinlyhMKqzaSig5oZwtVLCYIx7A=; b=oBm7IBsGugK4OiNve17zWzLPrpn0xCFtn/tmszzPXwxZI9qnwmllfiVjg4pZPDqlewxyMaDtDJwUmTf50eL+NnaPtPQ6rS/bzmoTRB40bJ8PDX6D1xlLusZv40DJpjOXUJzFM5Q/k9XfNyCAEEvEXa932XnTljK/fnY6Amrdwno= 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 1705928985363378.8155826059658; Mon, 22 Jan 2024 05:09:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRu2S-0000Oj-E2; Mon, 22 Jan 2024 08:08:32 -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 1rRu2Q-0000Nj-LH for qemu-devel@nongnu.org; Mon, 22 Jan 2024 08:08:30 -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 1rRu2O-000134-FY for qemu-devel@nongnu.org; Mon, 22 Jan 2024 08:08:30 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.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-1.canonical.com (Postfix) with ESMTPS id 0847140C72 for ; Mon, 22 Jan 2024 13:08:23 +0000 (UTC) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-40e863cb806so30865905e9.2 for ; Mon, 22 Jan 2024 05:08:23 -0800 (PST) Received: from workstation5.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de. [178.202.40.247]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c445500b0040d62f89381sm39214456wmn.35.2024.01.22.05.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 05:08:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1705928903; bh=bkdhpseem98U1T18GinlyhMKqzaSig5oZwtVLCYIx7A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hIBg8mxN6Q4JYeLj1mSaXThcYmVZ3Gy0iuEN/ZBHuq6dLQgWNzxw4mRItWaiq87bG WBxRzokmxueT+gmSnoL8YJGwq+kewySRjP7VOC98ktKYfG+bPIJljTkG5BRW2qmvlr cIMu+phl81y54qJUwLQ11tr3yegyI/OErzYb+shlhltXA2b81DNbV598ekCg15mfJx 2LcvdCo7Y4B9svzJig8JCfgT6CsoYzDgDg4qBcG6knudeqcX9+fleSe9h4Ruyap7vo M5ZBxDvCLrk5QAcE1q/3/+Voer9t5FErwMXMrS7eCEi/9L2LiUaPLN0pgEelWokugz vC55CbLCB621Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705928902; x=1706533702; 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=bkdhpseem98U1T18GinlyhMKqzaSig5oZwtVLCYIx7A=; b=UtsVsw7rCrRmF1vd4vJ3l26GapmIWqAJNWI3TIgTtCcB4KDDBm0lXRDsv7P0yidZc5 Nnj0TV8dcru9YbgpwN9wW7tr42e9s+8uaF97v+eMpUNOqOhf23T3WTX4R7j8EbSS7QRq FKC8JkMOPiWCHCN7vAAqxrrJHW+vRYqKT7WYAkARUrhDQPfo90+Uz44qANwbS0wXEtDF 0d50Z89D7EZLCgEWj38u7zRLn8K0ramOhtIgjeGpD4gHaalihLD10EIsJ/xlq4pwz3zI 6ng1o3gLQBwyz/he3GKkELO+zA/KoWQtMF5pyTsU+NCMXBaRb1qCXzTDyLQuMGQkgfk9 heKw== X-Gm-Message-State: AOJu0Yy0Ilhkv2qOijMU7VxeCcrdToqglRMul3Qw/WQ/Y1dms6ohB2T8 VSDfSay5dxt5JJiTDCntA8ztDsalIqhy/z5myalVZVZl/wzJO9y2CeXZnuBG4amQ06iUCRucRr1 fcubYG8yFXb5knwWqx2vUEGKwpWBLNPwZhA7P+djoEHSSG/vI0P74HlyTTo8lpnbNpWXo X-Received: by 2002:a05:600c:1310:b0:40e:509b:4bcd with SMTP id j16-20020a05600c131000b0040e509b4bcdmr1150021wmf.375.1705928902165; Mon, 22 Jan 2024 05:08:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IHF4Lz4w5Q13ye8H2GDlhNKmd1wbVHb+LigwBhM4NKRNdDAuU59yatBmjHni2ZMaA2hYxQBQg== X-Received: by 2002:a05:600c:1310:b0:40e:509b:4bcd with SMTP id j16-20020a05600c131000b0040e509b4bcdmr1150013wmf.375.1705928901790; Mon, 22 Jan 2024 05:08:21 -0800 (PST) From: Heinrich Schuchardt To: Palmer Dabbelt , Alistair Francis Cc: Andrew Jones , 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 v3 1/4] smbios: add processor-family option Date: Mon, 22 Jan 2024 14:07:55 +0100 Message-ID: <20240122130758.74051-2-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122130758.74051-1-heinrich.schuchardt@canonical.com> References: <20240122130758.74051-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: -56 X-Spam_score: -5.7 X-Spam_bar: ----- X-Spam_report: (-5.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.289, 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: 1705928986348100009 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 --- v3: no change 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 ced8284863..d90bdffc7a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2686,7 +2686,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" @@ -2714,7 +2714,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 17:32:46 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=1705928984; cv=none; d=zohomail.com; s=zohoarc; b=KDxOPXnBKIWV/rfLKsqBt6WjawGSPCquDynKfmdAF1vUcWubTKSyhFMYOqECTO2ZlJ1YiAv7m2hfaiwnK7V+znN/PPyftv6iOhMQzDjhFTTTlE7HCzAQ6ZXrynSUmhYC4MDfzwB976pfwJcxA3CFuZ1MHN2LcT517vZRIp4QSIE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705928984; 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=/DdGWBKENTjZaY7KXKP1GzdLyXx7O5ZTdH2bjh80K18=; b=KlW36Vk6ibMYpo4RKf/YZyWELbCl/2kbfpEDFiFNGfkg2hTX0bv6btzasbS1diaiEcUDmD+DehOTNqhEy1Pqq9tNszGuvT8Xvhaiz2j3bC/GXcSQlGsoNOili2T8E6k89Q2qipcAmoTu8jCXCrwms0pAMEmdY/py3ECSicD9Tas= 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 1705928984709773.0693610047573; Mon, 22 Jan 2024 05:09:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRu2S-0000OK-5D; Mon, 22 Jan 2024 08:08:32 -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 1rRu2Q-0000Nm-Lr for qemu-devel@nongnu.org; Mon, 22 Jan 2024 08:08:30 -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 1rRu2N-000130-6i for qemu-devel@nongnu.org; Mon, 22 Jan 2024 08:08:28 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (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 5747340F07 for ; Mon, 22 Jan 2024 13:08:23 +0000 (UTC) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-40e74860cb0so11098855e9.3 for ; Mon, 22 Jan 2024 05:08:23 -0800 (PST) Received: from workstation5.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de. [178.202.40.247]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c445500b0040d62f89381sm39214456wmn.35.2024.01.22.05.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 05:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1705928903; bh=/DdGWBKENTjZaY7KXKP1GzdLyXx7O5ZTdH2bjh80K18=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rK9EGAp5/w5ew0FmZTrRoesOKWJVFF0RHgH15tnklh5OZ2OnJ5Wcr4CeOxjehwDqD MmT0ZLXTH+VGSRush8M/kDK2Bqv3nnb0gXtwPzM2Tdv7OFOXLQYyPukwvdCgfWXMwJ sEDoLxmHQT+kPwwro6JTjbgSMeqxkctx49HO11AcWLwB4gXvW6EBpvLGIo7VHZ+JJ1 oMrNXUByQXmOeabbSlYBl6Qw61ehJq7T9Mn1bK7fOFV5lG9Vme3NXKNrG8hda9NxW+ MTwXxxdknLMCvS/51P5g65Od9fxEtbRRo/BIWio/FEWOWFedyHd+Tz9aYc0RlS/C6h vyRwZri5MCSNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705928903; x=1706533703; 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=/DdGWBKENTjZaY7KXKP1GzdLyXx7O5ZTdH2bjh80K18=; b=Snc0iyJPR0pUneWgFxwru86X5t7+pPWsvRopWdW5hZ/aigMgit6OnpMUOtnpIUerxf W6EfUf6ZOikb1NQ4iC5sl8yc3fP+h8XGEnuuedS0h3qg+Z2y2Hk9PVmr8JtDT36SxpOT 4F526HYsSgXOQ1WJjlcKxIdzR6dtWJY/EXoQ3VVD2uNZLUuZvNt1GdbJcQLpur7ZhlWl fsDo/O0yJaajwcztPC36L6UPP+OhHbqZaFQh687y5qtbRy5Vts6+9/82DZjq4XflKSRZ atmd75YLlGKCPAa1KsojuxumR1BaRCHno/AfFygR38nk93CSbkm1m5lZoQspMRZ2hm3u ewmA== X-Gm-Message-State: AOJu0Yym4bkPzFHTyTVhLPgt3QcdVlaX4DBLze5h0USev/WBPLmuD7Rd 4tWsiMtAaLWGe5c8LLvdXByUJmqBDhVp2JMYB4GZZeBoqXB+/uiCR3ec/6AxSJva1lqpvKdzj3M 3Z4LYlSGyeBGINIdmrZeBhjNVUiq9b82LMbQxwLFwvLWk6L6MrxGEjTY2IFSbjMaWS0iz X-Received: by 2002:a05:600c:4d0e:b0:40e:75e5:4e70 with SMTP id u14-20020a05600c4d0e00b0040e75e54e70mr2192372wmp.166.1705928902908; Mon, 22 Jan 2024 05:08:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IExRT6gsEd/qOi465xI+wdYQnAJxVXrEJMllDivULizXySEff+kPZa4juN9B9iG3qjUMHDmBA== X-Received: by 2002:a05:600c:4d0e:b0:40e:75e5:4e70 with SMTP id u14-20020a05600c4d0e00b0040e75e54e70mr2192363wmp.166.1705928902659; Mon, 22 Jan 2024 05:08:22 -0800 (PST) From: Heinrich Schuchardt To: Palmer Dabbelt , Alistair Francis Cc: Andrew Jones , 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 v3 2/4] smbios: function to set default processor family Date: Mon, 22 Jan 2024 14:07:56 +0100 Message-ID: <20240122130758.74051-3-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122130758.74051-1-heinrich.schuchardt@canonical.com> References: <20240122130758.74051-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: -56 X-Spam_score: -5.7 X-Spam_bar: ----- X-Spam_report: (-5.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.289, 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: 1705928986326100008 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 --- v3: no change 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..c0c5a81e66 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 17:32:46 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=1705928995; cv=none; d=zohomail.com; s=zohoarc; b=SA8y3TrZjffRnr8Tb2mUwKz6t5WEAVpZmbSXc+DD7lUbuzZOG7pQYv3H6Nmc7YzMm4esbYZOhsJK1fsTzl+tLk+YxJM6f+iwlN4Q29KUGnQI0fFJ18YhppO2pJROVdj4zcZ43vhEFbgwH8N2DDTzf5mQCDzoS9vVDRf6DT63nyM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705928995; 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=b7X2gRLH2+ioJPNZlKzeQQwfouAWlJRwXIBwib944hk=; b=FKbasLRYC3btHGk9by3HHylcLg/elRLpyowr5lrRjtzcXqm6ydZBOwEA0YBLtB8BZHY9yYO0gFurVhtvf+zs4WXIjm1/qDmNMXOQHsObiGuhYx/eBV4Nk3DSf2SkFdK610buXGIhHfkOOwSpL+gTjPs5zBgultHxEsACsuMljpA= 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 1705928995541361.8050222243172; Mon, 22 Jan 2024 05:09:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRu2V-0000QU-5d; Mon, 22 Jan 2024 08:08:35 -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 1rRu2T-0000PR-8p for qemu-devel@nongnu.org; Mon, 22 Jan 2024 08:08:33 -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 1rRu2Q-00014o-Ck for qemu-devel@nongnu.org; Mon, 22 Jan 2024 08:08:33 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.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 DD65A40C7D for ; Mon, 22 Jan 2024 13:08:24 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-40e435a606aso24459485e9.3 for ; Mon, 22 Jan 2024 05:08:24 -0800 (PST) Received: from workstation5.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de. [178.202.40.247]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c445500b0040d62f89381sm39214456wmn.35.2024.01.22.05.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 05:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1705928904; bh=b7X2gRLH2+ioJPNZlKzeQQwfouAWlJRwXIBwib944hk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uTv/BUZCXNYrWfwQwqOzQJLIQuKMJjwfCIQ+vhFBx+aR0obbie2dOyNZ4WwYFbIUt k2cFrGs9Rr5YRbRSworWnoJEHv0BUGAR4PGAFQeQqN04XSouZ5CqnSaInb1RpE6Exr 0/3oJdqYR8vqaNcKf1LmSZMrEPwW+DVJtXnUGPYrhrNqEzVb63PdeQIu7tc6rT11IX cfgPBYzHkEsrfTFME9NHzpRe15XIHU6mjjnqikKv3lsLQD8xSFj3Y9jgx7Veq94oxk 5MtT/zleIMsGO2b54hfv8qJmd1FkQjwGU9NhEPAU2KUQ0Pb4umDGOJVK/9GMT7xuJS eG9KGbzDs0ZiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705928904; x=1706533704; 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=b7X2gRLH2+ioJPNZlKzeQQwfouAWlJRwXIBwib944hk=; b=SYPiDYGe313SXfQoSuEoR6u+wUJN0CWw1fUCJ2GS7Qr8o58etz2sY3S28JIBoJQIS2 3LaTIfdx2FP91r+34CRPLXP3swaRe2WDOvmZ1mdHMGWCHt/LeXuh/oNb1PYgu3aTo/Y4 fWfn1dk4iKpC9VhNn7pf7npUDHKmWj9jSGwaigeXTtLTiq7lPmJNFYB1Myyg+kUT7p99 KrrBIbxkW6uLRscrC5FTVRrVi6XOdziRuL9mk9Nomngq7WrssrZ9slPNlh1EJq981SnZ 2u0ULqX83NrNRFwGOZfIIx+44x4XrTraZ7d9RMk2ipK259hb3k6IEtdVUSMfRR8tPQRv BOrQ== X-Gm-Message-State: AOJu0YxdUIhwCsC1+67RR71I719uqs8q/Bvo7O5vD8xW61JSNKDbYrS+ 0Zsj8XK4ku1jO/yrNevOR1QyC12rLRAH+NQLt8wSSgnKym1gY2ngU3dg7Fl8vU9Gdxmhqxs5ser +rFeR60OzikrB31TFOypEP3Po+no7cvx3SQzRwfg02fBDNo7k34Wi3Pj9xGGkK2uXAiUQ X-Received: by 2002:a05:600c:198a:b0:40e:761d:a553 with SMTP id t10-20020a05600c198a00b0040e761da553mr2520396wmq.37.1705928903764; Mon, 22 Jan 2024 05:08:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKbjlXrSXSJepVT35Gjc2LU0DDw+dNQ9IwGbJmzfdStcDczA/bTCWkZCwkHSWcajaW3uvCjw== X-Received: by 2002:a05:600c:198a:b0:40e:761d:a553 with SMTP id t10-20020a05600c198a00b0040e761da553mr2520384wmq.37.1705928903498; Mon, 22 Jan 2024 05:08:23 -0800 (PST) From: Heinrich Schuchardt To: Palmer Dabbelt , Alistair Francis Cc: Andrew Jones , 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 v3 3/4] target/riscv: SMBIOS support for RISC-V virt machine Date: Mon, 22 Jan 2024 14:07:57 +0100 Message-ID: <20240122130758.74051-4-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122130758.74051-1-heinrich.schuchardt@canonical.com> References: <20240122130758.74051-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: -56 X-Spam_score: -5.7 X-Spam_bar: ----- X-Spam_report: (-5.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.289, 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: 1705928996058100001 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 --- v3: use misa_mxl_max to determine bitness v2: set processor family --- hw/riscv/Kconfig | 1 + hw/riscv/virt.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index a50717be87..5d644eb7b1 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 f9fd1341fc..1b333af4f0 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/sifive_plic.h" @@ -1263,6 +1264,47 @@ 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 (riscv_is_32bit(&s->soc[0])) { + smbios_set_default_processor_family(0x200); +#if defined(TARGET_RISCV64) + } else { + 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, @@ -1351,6 +1393,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 17:32:46 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=1705928990; cv=none; d=zohomail.com; s=zohoarc; b=Ss7AVMTOEhidY8z9SnhLxsJdApXX3Cp74PoqTXs6idQb8lJJ1nGUzgl21z2V7os7ftqv+ekZa7Ef4sJ5hFnmSLZneKJsF72z8Uu3R2uyrwCYJe9kzlvbj8eMiPzk8Wg3gP2fag01IOi7R4ER7a0s6nHJleWesh41FMmbihmPrhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705928990; 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=yviA7/+UMxsnToKwTGCWASxAcfmJt/l+CZbA5p4HzL4=; b=jECvOYG9r+X7JfC70rN2XtSBasqkjydUop8mVt7MJ/xHDznMCF9USRjzjTgoB9v+RwofdAklogrGXu1IQVdHVJLJm5fV88g7uZWB7HKX8sMqd7GXyGJC+Ba6VQ5/HxfETzE88fcxUJf1RsoE8HdVHa52tCWjNGkOPimx6o3ZquM= 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 1705928990122556.7659775443109; Mon, 22 Jan 2024 05:09:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRu2V-0000QT-3a; Mon, 22 Jan 2024 08:08:35 -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 1rRu2T-0000PP-6I for qemu-devel@nongnu.org; Mon, 22 Jan 2024 08:08:33 -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 1rRu2Q-00014x-Cf for qemu-devel@nongnu.org; Mon, 22 Jan 2024 08:08:32 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.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 57B5C40C80 for ; Mon, 22 Jan 2024 13:08:27 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-40e435a606aso24459585e9.3 for ; Mon, 22 Jan 2024 05:08:27 -0800 (PST) Received: from workstation5.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de. [178.202.40.247]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c445500b0040d62f89381sm39214456wmn.35.2024.01.22.05.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 05:08:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1705928907; bh=yviA7/+UMxsnToKwTGCWASxAcfmJt/l+CZbA5p4HzL4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gz1HVx8CUHxNVSEXlzbB4j5bR/WL4lZgRkxpjXz8mr12r2lnHOWUZ6FVb3Zzz5u0J RUNy36XRIHFH2PrQKhwlvRn7cM5Vd5ouIxGDI+zNWiRIKod/0VLhJc3R4UTbij++i/ PdhbbdjFtQXEv8ltQ/oh8XaTiUhfejMUGKdLj3d2hregVBWVvEglNGj14PpJ+GFb8x bqe8AqNOmpkck7NwFzC3fI+ykp2dH5jGfrb568kdTQu5v/DVtNm5IbmquYuPSoPC7x gn+mnJGeDhOsbC6KWCKuJJB/YLr4dkqfEUXFC6hf6LlckCUnO31PAdz8Vh5pXuP+iI qli5qo77h0DOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705928905; x=1706533705; 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=yviA7/+UMxsnToKwTGCWASxAcfmJt/l+CZbA5p4HzL4=; b=SpeHaae5AJ/6OYq/8TumGecDNXgOlYGbGWig//1tYTmGPAv0GK+Ezex4z/vSn47ns5 VKXIJ2gWI2LhmJwO3C8JIZGXK9p4RkIx0yT2buGUVBPjDOiMihGUF1V0Yvpd3CUEytGm /cau9NbvdzC3eflkEV5Hq9XKUH9u1gObFdPKo1+6wktcPV1sLdyzznY6Cn1He3W24wgX 5NbngqyDuXFS1VwnT7fykvC6b4J+GtoLB3pwfHGeftw2ZjaCmrzzzr4ZFbFBD5thApFk tlPYr+z6VI3qQ5jcQFip1S03L1V72MPwzu2LWMuFHXZqGoNl5Gc1ThnSatIaZpELgSw0 0GBA== X-Gm-Message-State: AOJu0YySBkBtWp150MzE353FTC+g6Wfb9Sma1KD1hQzl6/4kHurAa5KH FXFeLlUx1mF/YL+L15/alNwGJbmke1PcbwOewtsKoCXvuocvmBJPqge3fOT9YOs2c8HttZbLPL9 59qgRdrV6Z77ohUXtoHe7czyMihqv/xQkMklmw7wzU7ZhhGqKPBqWl1d4JWyh7KojTkse X-Received: by 2002:a05:600c:5195:b0:40e:a217:1706 with SMTP id fa21-20020a05600c519500b0040ea2171706mr2791812wmb.50.1705928904860; Mon, 22 Jan 2024 05:08:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGr51h6Pavea92G2vCyT4+7dd5/0CCUpbJ9footdmkB/SFIdJT6xkOSGzBaBJI9yext4mYtcA== X-Received: by 2002:a05:600c:5195:b0:40e:a217:1706 with SMTP id fa21-20020a05600c519500b0040ea2171706mr2791796wmb.50.1705928904489; Mon, 22 Jan 2024 05:08:24 -0800 (PST) From: Heinrich Schuchardt To: Palmer Dabbelt , Alistair Francis Cc: Andrew Jones , 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 v3 4/4] qemu-options: enable -smbios option on RISC-V Date: Mon, 22 Jan 2024 14:07:58 +0100 Message-ID: <20240122130758.74051-5-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122130758.74051-1-heinrich.schuchardt@canonical.com> References: <20240122130758.74051-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: -56 X-Spam_score: -5.7 X-Spam_bar: ----- X-Spam_report: (-5.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.289, 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: 1705928992081100003 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 Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Reviewed-by: Andrew Jones --- v3: no change 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 d90bdffc7a..935aec7cb9 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2697,7 +2697,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