From patchwork Wed Mar 27 09:51:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 783116 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2108095wrt; Wed, 27 Mar 2024 02:55:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUxt3LRRYnnOfs7qem5jWIe7temrRpiIvTBDNI8Sp7TDgm7Iu0Seu7NZL6N+0Axa4TS0qM6LOAbfQmrHQf1883H X-Google-Smtp-Source: AGHT+IHGeFWo4PjhK39rCh2nugbeM2UgCb4rh3NcknJlHSM0OYdgApiOK5KSoG3hnJPl88IO3DPe X-Received: by 2002:a05:620a:12c8:b0:78a:270d:cf9e with SMTP id e8-20020a05620a12c800b0078a270dcf9emr665960qkl.47.1711533355723; Wed, 27 Mar 2024 02:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533355; cv=none; d=google.com; s=arc-20160816; b=wEJIuS05b4SqYYFaEeoGGivGh0jWoqwWWOLu4LPpxxYvbT8cDyJRoUoleHvFqIa2Zy Jh+FtAcvXBk7GEwQreKBDD/gF4G16PpA/z0tz2hjqfQvl+cKmmiKYf5fmDtJSYyd17zd dCTSrxvJUe9mXwpR1C/j5vuBOSgI3kQhZfjACWBlEHuwDfsURHIbaw+Otb0Bil4g/J7A syfvlqcJaZ/x0L2NBrz4T8cVPoJB8KYk9owapQ3sf64sv7Q/cZDXWuc1fQOxUSRL8TYT 4PBrLQLA+wAW18KCCxnmeg8UHWlOuN2vmHfXjR+aSu9vTvj9IZKkxWWS5zvDeFa3uBAe 2Qeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PbL9DbUU/VwqkR1vuLb4yIgDr+6Vr1z3If7UjhII6YI=; fh=9wFtJOsbzEJZUDkN1ciDLPLsgnH0XeEQynw7AVbE7r4=; b=leKWbK7ov65RztWVufUCKs68L7NBoqU7qWHBuvm/UNokUS7oR2dkXbrxvJ5yl2zyev n3VMD1/IaFOsQ88c/e+9onQhmrV5EFdkpPf6SiVePUc19nT0RYjjRKfQ+IqXnQp2tS1R ePkNQdCYiu04yzEMwil5wV6Cq1zPF9glmYj7RM3XRm5oV2ZOIAiWphrIyRt0W3kVfJUl BF1xzMjhlDL45iCXLmAb7N/s4e9j8duMLDtoz4zg3FhI2PSdw81Grxk1lxd3Tq0SCXIT ZEitgXHPVzNRdmaEkUwNccYwqH86FxX3rLbhA2THFGTWaOTHYnlV6B377nG+x4b6tt6v zNew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oshKLjFL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bj6-20020a05620a190600b0078a3d28988fsi11315743qkb.267.2024.03.27.02.55.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:55:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oshKLjFL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxX-0004Sy-2h; Wed, 27 Mar 2024 05:52:39 -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 1rpPxU-00048Y-GI for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:36 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPxO-0006ns-7C for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:31 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a2f22bfb4e6so857620966b.0 for ; Wed, 27 Mar 2024 02:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533148; x=1712137948; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PbL9DbUU/VwqkR1vuLb4yIgDr+6Vr1z3If7UjhII6YI=; b=oshKLjFLYApqxWaVs1GZ40igalfXY7g+8FwJhTvrmvj7zFS+DOyxqJicvcr9o741z+ K/zMyEI2i3nB7tdgSKfOJ1jqs37eh6Vo8WrWp0lBBDtA3HGv6t3rFpZ7sfJ6xqamJ1tY BoOHNjhBIcji2bv/Xld3uIXlqs1YSTpDPMosq2RqhhY6BXTi+QfbVTJjlWFbQr+2nxnk hR9wwlthGTa3ClUIONVmMZAOb56ZJ7lb3c1W6V8V8yAEuIzOW+j8fr40p/CNE5Qfp6Tl e1XXaUUdSU/kG+xW+msvmT/MuO9JqpFtHC7GOzChFPLYy6fI7hy1qNb+/nutF5zUfEKg e6Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533148; x=1712137948; 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=PbL9DbUU/VwqkR1vuLb4yIgDr+6Vr1z3If7UjhII6YI=; b=oRJ+Dogp82t3XvdHQ6usMA2QK2P8qunIuMqBcSdeC0+dMi6bodtTUYzWj8T6XyeszF CgLJS4AtMlfTSX7BDGea3tD1bYypahJwIA077yC7XaWpn8BsYsVj3iRukr+M48UzzwIT NvwGhYFXAFnrlyNroidEIj87FEkfbv+5Fq3PPtvWswdGJkj8Z6xKud0fQ6RBYxpOeKkf i6gdd/LEB0U0v+MG5yXRogzRI2Tt6K2bvZysO0e3cECiGNaPI/dxXXw2Ze5X+Z1Z1hip ki+wCqRfwZKZoC9Mn4kWeCBR7oc10HyGvca/PL+KbQN3ad33VvYvfUPDD0Cf7pURizUO cYRg== X-Forwarded-Encrypted: i=1; AJvYcCXiq15NcsHKNij9CmspkWovJtebNeTU+5bAABHohC9/uQnrKQyZvlURvDIrVUZCgQj6Lbgvw9vGNu6yaCUHRlGHg86BMNY= X-Gm-Message-State: AOJu0YzFfl4ynYGBcBfxH8pzNuSRmKNlAtN+ByPgxaifp3KpJXrkkXbo s3Rvv+Wglzvewr3UYuMNLmmkwgwa5AISmTrQNH6xkHvXzU3+ley1x0kJvSqbhoA= X-Received: by 2002:a17:906:2998:b0:a49:dfe7:834f with SMTP id x24-20020a170906299800b00a49dfe7834fmr492717eje.59.1711533148505; Wed, 27 Mar 2024 02:52:28 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id e10-20020a170906504a00b00a4735e440e1sm5219836ejk.97.2024.03.27.02.52.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Song Gao , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , qemu-arm@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH-for-9.1 v2 10/21] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Wed, 27 Mar 2024 10:51:12 +0100 Message-ID: <20240327095124.73639-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'uuid_encoded' is always NULL, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/firmware/smbios.h | 3 +-- hw/arm/virt.c | 3 +-- hw/i386/fw_cfg.c | 2 +- hw/loongarch/virt.c | 2 +- hw/riscv/virt.c | 2 +- hw/smbios/smbios.c | 6 ++---- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h index 8d3fb2fb3b..f066ab7262 100644 --- a/include/hw/firmware/smbios.h +++ b/include/hw/firmware/smbios.h @@ -331,8 +331,7 @@ void smbios_add_usr_blob_size(size_t size); void smbios_entry_add(QemuOpts *opts, Error **errp); void smbios_set_cpuid(uint32_t version, uint32_t features); void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded); + const char *version); void smbios_set_default_processor_family(uint16_t processor_family); uint8_t *smbios_get_table_legacy(size_t *length, Error **errp); void smbios_get_tables(MachineState *ms, diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a9a913aead..a55ef916cb 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1650,8 +1650,7 @@ static void virt_build_smbios(VirtMachineState *vms) } smbios_set_defaults("QEMU", product, - vmc->smbios_old_sys_ver ? "1.0" : mc->name, - true); + vmc->smbios_old_sys_ver ? "1.0" : mc->name); /* build the array of physical mem area from base_memmap */ mem_array.address = vms->memmap[VIRT_MEM].base; diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index f7c2501161..ecc4047a4b 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,7 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, true); + smbios_set_defaults("QEMU", mc->desc, mc->name); } /* tell smbios about cpuid version and features */ diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 441d764843..00d3005e54 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -355,7 +355,7 @@ static void virt_build_smbios(LoongArchMachineState *lams) return; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); smbios_get_tables(ms, SMBIOS_ENTRY_POINT_TYPE_64, NULL, 0, diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index d171e74f7b..1ed9b0552e 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1277,7 +1277,7 @@ static void virt_build_smbios(RISCVVirtState *s) product = "KVM Virtual Machine"; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); if (riscv_is_32bit(&s->soc[0])) { smbios_set_default_processor_family(0x200); diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index eed5787b15..8261eb716f 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,7 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static bool smbios_uuid_encoded = true; +static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -1017,11 +1017,9 @@ void smbios_set_default_processor_family(uint16_t processor_family) } void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded) + const char *version) { smbios_have_defaults = true; - smbios_uuid_encoded = uuid_encoded; SMBIOS_SET_DEFAULT(smbios_type1.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(smbios_type1.product, product);