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: 13632376 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2B8D13473F for ; Tue, 16 Apr 2024 19:00:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713294059; cv=none; b=jqBtj2J6oOMiLWZ7YLhaEe/mH4HDGW5wmeBkYmht9B5aptL+iIGoMz3VtN1w1it6G0wvYjNKBpYBNb0KI0PCon5fcmPPrisbbJQgzS0L6lVZuN+0bmgUEhVSKETih4KhNFzZHrk1vNLgsDkqsum/f7eNyGRJ05RL3tQAS7boXIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713294059; c=relaxed/simple; bh=rMcTD0LEHby8jL8jilQsu6UDinvXj3I/MOn9cbEDiHY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ky8nhwT0SfPR9A84XnnBcRas1J4+eGMOcOD9QmPx2qLyIJWTLGIv95ziIBjwe1o5bmJ9c9eE2Ou5QiCHhvAAFXZ/zBwlYIDaGaRKzZiMEUEXaFHw+D/bKVm/eQqN+tCzXR+rghq/yKBYrJDHEvadhBJ/VHKQYCCccvip3MX9YYE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kqETOtcv; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kqETOtcv" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-518e2283bd3so4238752e87.1 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=vger.kernel.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=kqETOtcvEJcJY58VfYr199Z7Us1qhhUQkEYpC0jnetcm/y777H0hsIKSFqINcorgKQ ABWikjlT+m5K01r28VVSA9wJk/NYYSmpnpfmT7b48gYeTEqsp3hLTK3/347+S2Ziow56 h/6q/YVCEqVtRzASjUjdStraoZ6dmCF6Pl3F+hNyLsenRciiessxNzYWyX80zWxamAdO cU040tE7A/dPiMSpBDXSnk37a2oACbktu1uWkxvAtZI26C0VYJwmqJbofWo/WNPdtx0z bjggPB+VlOO6gQwV2cPYXAw5Wf0/gXvckcVwHu855ZRZxGweQMM+s8m1paDcEfn/+D4r Cj7w== 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=sEejTkFtLOI1NyafhDQEfB0nR/3M8NE4n7LEpnV+sE/CI20PWi5/umSLfxSJWq/jGY cISDcwg5OM5LUjsfJBgBQsOy3UOXKsU3EBpAovHz0bh+1BZRx9jcGY+bv1K0T4NHn6vh 0ZJKnXl9XhZcHdRbeC2drIJ2uiwz/YUYXz7u4XTemV1E0XCwCh6bK5eqJpJnKbXj6SyS QaKdu6KkDR04yf0ctYCWjGTNEEocMt21nJnZqytPCAkNo9LgH1lR68j3jdl21lxonXRO L7m4WPUsONlhvgHsU6ZiwmXrU71NaXSjmYWsho6a8qasNoYo215jVLOaHkqi6EiGlBHj tvkQ== X-Forwarded-Encrypted: i=1; AJvYcCWU+JPPhePchp1ptf/SBTzkM54tL07SHEo8vj66slNfKDQ2ZntE+0F08ZN7De3knmGtjj+oiX9f197FRHXZ9fdBcRy0 X-Gm-Message-State: AOJu0YyojaJd0qHlgM51U4cwy/yNZWt9nRCUOC1/6n9VigsDJB/JK59G 8afs8jI9aqbjWB2SO7cwCmocY2Kd+k3zf+uQv8jsub5xmoTIt0OrKg7S2qAE8cE= X-Google-Smtp-Source: AGHT+IG1FZVocW1TT1LaE4TnKm6GW66mYhxJUhe6LV7zFSRJXa0dXAPuxXWVIiAcjn4r+uQvOHwYFA== 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> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 '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);