From nobody Sun May 12 08:26:06 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=canonical.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 171148434096385.22724617350138; Tue, 26 Mar 2024 13:19:00 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B8AFE1A0F; Tue, 26 Mar 2024 16:18:59 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8DF4F1A3A; Tue, 26 Mar 2024 16:18:06 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7BF2718C9; Tue, 26 Mar 2024 16:17:59 -0400 (EDT) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8856719B8 for ; Tue, 26 Mar 2024 16:17:58 -0400 (EDT) Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.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 6ED4B3F829 for ; Tue, 26 Mar 2024 20:17:56 +0000 (UTC) Received: by mail-io1-f69.google.com with SMTP id ca18e2360f4ac-7cc0370e9b0so672224639f.0 for ; Tue, 26 Mar 2024 13:17:56 -0700 (PDT) Received: from rip.. (024-177-159-071.res.spectrum.com. [24.177.159.71]) by smtp.gmail.com with ESMTPSA id n14-20020a6b770e000000b007cf21c6ad7bsm3167797iom.20.2024.03.26.13.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 13:17:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711484275; x=1712089075; 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=CW/HYkf7n0vbzWeWFd2rFM2HJzHc7HICUXjwjRvy5uA=; b=YUAzZSPYXaP8KQYQMIIv6XJLaCbrxAfXh4geKlB8U7IfIXUNhgf4AfAPXa9DLupmsy o9ZxZOZFlxl8XGcA827Oo0mO0MpNMTL9tLwdyM2PmRPnyxdpKTxc32nnWDi7L9oznYqc UMCV1x2yr0ZcJGpKCwMbz/A1eyq9NBX8vkAtXkWJgYIY4D2tGexD7OCSdX+aqzysna1c HjCKeYh9EBqC4AZhdY+A2K9ajWCTDWPA3ujjn8+vNEdBgyW9eirZ3o+3aGjseHU42Ug3 B/zeX7cYqLMrVyH/U/Su126tdthPWddYwMWy33B0II3K7hdlioCNnclhp7wojpLYZqjW YHUQ== X-Gm-Message-State: AOJu0YzAut9hAwX5ThZ5ry3JydmdkOrivE48tqiK/QXsp062KLO2FdCS Aty4Q8Su1mUy2hK2VMKpmIcmrMAf3qokmjgTj7PcfhyQT9HYClinDJq4Pn5dqk4CbgdktfVB5LO kk5Fd/AmUfQ2hbEjZMuuK1X+AReLjSI2C14ZdAH8ZU5SEAaGzT2ozjigkeQzDJXE0WKvAQNjbOM 1BFVs= X-Received: by 2002:a05:6602:f42:b0:7cc:7d9f:b659 with SMTP id hm2-20020a0566020f4200b007cc7d9fb659mr12298106iob.12.1711484274905; Tue, 26 Mar 2024 13:17:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7061pmyMPivQkw6RdX5Oeq1EWvi+zkRoWKkx64rwjTkFfnFCs1kTmxDR2wQQHFJCu4JdLlg== X-Received: by 2002:a05:6602:f42:b0:7cc:7d9f:b659 with SMTP id hm2-20020a0566020f4200b007cc7d9fb659mr12298094iob.12.1711484274683; Tue, 26 Mar 2024 13:17:54 -0700 (PDT) From: brett.holman@canonical.com To: devel@lists.libvirt.org Subject: [PATCH] virsysinfo: Try reading DMI table Date: Tue, 26 Mar 2024 15:14:14 -0500 Message-ID: <20240326201743.60415-2-brett.holman@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240326201743.60415-1-brett.holman@canonical.com> References: <20240318222906.98149-1-brett.holman@canonical.com> <20240326201743.60415-1-brett.holman@canonical.com> MIME-Version: 1.0 Message-ID-Hash: VV2B42TVA3WLFLBK55HITZPIAUBX2HWD X-Message-ID-Hash: VV2B42TVA3WLFLBK55HITZPIAUBX2HWD X-MailFrom: brett.holman@canonical.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: khanicov@redhat.com, Brett Holman X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1711484342693100001 From: Brett Holman Add DMI support for risc-v and mips. Attempt to read dmidecode and fall back to old behavior if that fails. The SMBIOS specification[1] officially supports both RISC-V and LoongArch. Some mips-based Loongson-3 processors also have SMBIOS. [1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.= 7.0.pdf Signed-off-by: Brett Holman --- src/util/virsysinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 4a03fc3246..0d9083c891 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -1249,6 +1249,8 @@ virSysinfoRead(void) (defined(__x86_64__) || \ defined(__i386__) || \ defined(__amd64__) || \ + defined(__riscv__) || \ + defined(__mips__) || \ defined(__loongarch__)) return virSysinfoReadDMI(); #else /* WIN32 || not supported arch */ --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org