From patchwork Tue Apr 16 18:59:27 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: 789262 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp440461wrb; Tue, 16 Apr 2024 12:05:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVBevPLgAokzSjJBgssPm2rnVsE225xZVmG4BzvECBsTs8BV02EhN+6b56T6fWZ+cypoV5F9+VSphnggEXIOUH7 X-Google-Smtp-Source: AGHT+IEtRnvagycvRM1OJQYxN7JKehVd44I5X7fieGGGdxCLRINN4EvuReoBP6N/HvUBDBv8RX1e X-Received: by 2002:a05:6102:3f49:b0:47b:9854:ce8e with SMTP id l9-20020a0561023f4900b0047b9854ce8emr2655779vsv.31.1713294337024; Tue, 16 Apr 2024 12:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294337; cv=none; d=google.com; s=arc-20160816; b=JPlNSvMYABQKYzLIWjC+cgITJbrSyg8hUxzo+3FVePQt258n5lfKEyZgzqaTipMXYv VWkesWeM6Wki5dZwjSlhavzJTzvhYL2x9oyzZ5CE6gMi1G1XPJVibwnh8dXdLOkW8/wA pu4pmwlG2dOQDh1mUxFQx1F+Gi6aB4/Hk5ILIjHRCiAFVhq7CmKxzS2GZLgs3x0BZtWM 4mehYYFKfS8QFUCEZC6BgP2dldEa7h/odLX4kLV3CVQzJSMUV9ijjnGJiF+HmLxy11Jd tvelKmeylTuVudzajuogPa2yivFVzuwogmlLKbBhek5mGLx9mGCtcHfenbZrnwIFBjAV OtJg== 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=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; fh=m06YJTXWY3YNrV6Ha5103g33U3xQqwvDxTxEyWcxDGI=; b=qaPOKXqrKqYVQExkMAf42A9Bf16FKbA+rnDwehoTwPN0aGZL5odOpgtHfnSHXV0K8E ICuazEmHtbwWqxpdsWsE/BU+PkHvo+/R3cKPOcshl3w0Y/5ZM7XcOIViSNjWqPZhMXdc /ieXG0VZhj7RQDlUnV3axR+yQuICHKpWGufqu1fl6GCNzEKzHOE8OlXBJHjuHocoNy0t 3ekdzq/Ecx0qhxQBtgHJfPxTLAku8jLJNa7ii4p25gf4FOq1gZg08bJGhpm/3NelP+vF qjl1YrBI0+PAkcvz4ZC8/hDQTefSawaHwa5pp6KmoWUc/3/gUB2v9VKMYLPQVMKZqwgp dj1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=po+ugPiH; 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 o4-20020a05610232c400b0047b9680ed4asi500994vss.456.2024.04.16.12.05.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:05:37 -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=po+ugPiH; 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 1rwo3Q-0001ey-58; Tue, 16 Apr 2024 15:01:16 -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 1rwo3C-0001HA-Dy for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:03 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo39-0005hM-2R for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:02 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5176f217b7bso8397459e87.0 for ; Tue, 16 Apr 2024 12:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294056; x=1713898856; 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=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; b=po+ugPiH/hwIDI+jUzrJjYMNf5ieN7DI1Tc+vjUzMvx0oa9WORx5arvHpKLmypjSpj vMNpu/XNQ1ds10WOqkHn8iPAtlqLapoYlCB8lmL4l+gSupJcG2apa4e6uk8sPeSREebR HqvSYev/kwoy4SeEHHAJa5CP48uHpQmYPoJd2Sqbk4OQZK1IefB44XJxK0yPqLgpX2yz qSzEDxhs13mPrd+yxuUwrHvvo+JC4nE7RR6478gPNqJEigYzSTIEKT9Z4s/y8Uo6qL0A eRS76yPVYg2kreEpNpE7QguLCIqKKE2TPHUY0wLHcjix7RZCqJ+tq286XoEpvTV51/n4 9VPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294056; x=1713898856; 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=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; b=hfTjrAS81tec1fcMmYx+1qIlqvAAShLuq2UESASwwEhWUN4Qx89Skb8f4NQwwqjOLO 4gJ7Q5gS/PgAlD30Pp03WQEjhFnz6kWfVv0WKZWBbfCEN878NqI5zQnEQOOw7YK9R1dY Um0Ib8/IghJfloj1CqV91zTkkqrQDLQLEmqWFkMI3TFAVv4mFNBO4BU94hSSdTPYuqyk qOVSmOuS+kX6zmXYr0/Njm1vK82oEmi9f84/dDCby0/Dz3JAPde4oruKCn/z8OQnlhpM LgmiWkA3U8NSdNfllzvmAspOoEZ19m51VrsjaOCn35EHiBP486rb1dtfQaWLMHXjWalr gJow== X-Gm-Message-State: AOJu0Ywkc0REo5Qent+YmLGmVffRlSM7GHkp71+NB5JhT1KSartV6xmi TAhDW/mRmthDxLwxHw+WnU9NK5freyolDy1pp4QISx9/PN0S/3XC5qrgGHWYoy1CDoZWefeiNxb K X-Received: by 2002:a05:6512:158d:b0:518:c59b:4fa9 with SMTP id bp13-20020a056512158d00b00518c59b4fa9mr8481593lfb.50.1713294056253; Tue, 16 Apr 2024 12:00:56 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id g17-20020a170906349100b00a4e2dc1283asm7167171ejb.50.2024.04.16.12.00.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Peter Maydell , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Song Gao , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Ani Sinha Subject: [PATCH v4 11/22] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Tue, 16 Apr 2024 20:59:27 +0200 Message-ID: <20240416185939.37984-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.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 true, 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);