From patchwork Tue Apr 16 13:52:40 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: 789222 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297712wrb; Tue, 16 Apr 2024 06:57:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbW7MyMhgQhmJizfmq8NV0Vg++0JcKXifJovMI8DvLKtePW71ewo7KhIBesgA5eN5nHUZP4dwBafahybHuh+Ms X-Google-Smtp-Source: AGHT+IH0YRPtoDVKQoUqyI6t2ccrP1dooSpdgdF0IrBSpvVwIceOb8hb0sZUhtzQjRCKQlszQDc1 X-Received: by 2002:a9d:6b82:0:b0:6eb:83a8:daa4 with SMTP id b2-20020a9d6b82000000b006eb83a8daa4mr5077149otq.3.1713275836940; Tue, 16 Apr 2024 06:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275836; cv=none; d=google.com; s=arc-20160816; b=wO1g+PE4RYzhcvMSi269KKWK68j8kfCn3YFqDFLInYv+Dho0pe86IbRHvI0J5Pv41h E/fiNNXmchXsWQ/QRIblHxR4IbnkQMGJGDlqo77EIg5g2TcbKYQpOSNdLF6GQkEMeLh4 IbJ7v5U38WZMvbV8MIZEt2seyK93gXqWTIzkGPJe7CULz0TU/fMsspqPmFUfecTSIoiv NeHDnOYjCxLsNEkuezyjQnVbyRbi6a02/8aysmfR/WOjLgxz6HbrTPt89COLY4iB6YG3 vW7wO5wRU4hiVRqs5zWbMxMAGsy6lEBFQU4OIXDfEMJdDv2mKcjk68JAsg2wP1oOhNIO PVtw== 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=aEG8B3D8lFaau9WZ1Gr1cvkEZloMGi/YhvjNhFJdC3Q=; b=HzZQR1uC5zQKAAmGrUWbxH8y2BeGFgZ4GgYqVieJbEd6tnY8PiAftB0kgNquv2i6qr yv2c8pEybFG9Fwxn3ZtsP+Q334DJrR3j/9j8aXGsXfReoLnoOru2W0YEhhG4+kGcuLOS 1vf59WYGtgXWjhuzzlOVAXC6nB9smqNNmqky9csRciBzIZsF7hkSCBcGHUZoE4DLiihi 5poT2EoXFXMuBjq7JfkoZzE+WbITTzAThgO73hJ2RWYiJLzJ/bWQtSj4MsKm1OpSJGfj YZQz/6ob+QgCAjsB0k86StXIQKmOQNxikpdhtuOTEw52Cc75wCTuIAzsJ2Xof6m14/Dx ueNA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eKE+BoUe; 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 qp6-20020a05620a388600b0078bcec2939asi12580637qkn.38.2024.04.16.06.57.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:57:16 -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=eKE+BoUe; 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 1rwjGO-00037k-KS; Tue, 16 Apr 2024 09:54:20 -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 1rwjGF-0002ok-Ul for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:12 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGC-0001r0-G9 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:11 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-56e69a51a33so4328417a12.1 for ; Tue, 16 Apr 2024 06:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275646; x=1713880446; 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=eKE+BoUebL5WjsIkKju9B9igNMd8zk94zRmWT9YlQ1bQcklpByc2mQ3Jpghr+bumm4 4PGzTW8yFFL+PfGYZstYO6J8J9Vwx0gvo4gQxFnc+b85dVAP2t8QRGFFNjXp6z6wrAdM KGLn3RMrMIyly+hpWHDC7lgJZvB6gBKqT7HePnN+RYWHKqkFPwBJaUClmV4N+LitzM0i OU+w4V4Y1bmZK14aDs4Y/Wv0WzREcXOn4ABoUSAeKKhQVQOupzZ/Z/sMezmMnnOJinrT Br8KKSzKqwmlwc0dv8Pgr5h9yAf1QDABmvNxUjq9zFMaZpQ4dg5111OVp8vMHCusTMO9 Z2Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275646; x=1713880446; 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=JS/H7zkYuapZ7ejnsvLirFTJeCBziP/QDT2S0sFVrzwTyHaQSmIVyZrk5VahhS38Ns JIxtPv+Y+WqCN8/tJUmCxxwpZFvJIid3C3aowFeDHmMhVVwKQWv35/k6OHjZNQCr41Ou /eoUosVixi2TCZFmhtmGWc4HIbuP2MdQ6kjUwDKtFvqZWwlQkb2PqJI2LBmV1DxLn6bb vNzsSe5qv5pj5gEReeop7KbQy80SLgYrDUCyQ9Z7P/mfMBiQ/zjZL/evCmMz6XamUmzp m4lQiIdyT9t3UgSdhGLc2rS3T8jM0P44TdVFKO/Cul6yeU9rDFQmXEy7S940e7ayzXNg qPtQ== X-Gm-Message-State: AOJu0YzUOLhB65uta5biDre0ayZ2M7F/K73F968imd9oOI93WT+ULzAP xluXF8ehqQwxg9isqxK0mokiQ85Cms4pU0v2rpAT6ki7Nlv5XnEQCV58g/e7ovjrWLN8rUTJB70 Q X-Received: by 2002:a50:d55d:0:b0:566:d333:45e8 with SMTP id f29-20020a50d55d000000b00566d33345e8mr8949322edj.20.1713275646553; Tue, 16 Apr 2024 06:54:06 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id ee42-20020a056402292a00b005701550ddc5sm3802566edb.90.2024.04.16.06.54.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?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 Subject: [PATCH v3 11/22] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Tue, 16 Apr 2024 15:52:40 +0200 Message-ID: <20240416135252.8384-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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);