From patchwork Tue Jun 18 15:59:33 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: 805216 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271511wrx; Tue, 18 Jun 2024 09:03:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtXBiHcdKjG6RT99t2FLnSsC1H06kvRXIEigzk3/sRM0UEKj/BSjLeYwkRxs7brVs6/TfWByPzectn2kwIHXIo X-Google-Smtp-Source: AGHT+IHD6yVernjaSnbK2CXYdzmnx1kE6ymTCj+V1oVlCm3Vr2IYhqLRPFniB/UBU2gddbk9F1dB X-Received: by 2002:a05:6808:2223:b0:3d2:27ef:264f with SMTP id 5614622812f47-3d51b9663f9mr242044b6e.10.1718726638640; Tue, 18 Jun 2024 09:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726638; cv=none; d=google.com; s=arc-20160816; b=mdv+XhsU9Ou+HB7nCqf2+g4i9yE38tNzhsaOfApzzMA7SlRRTmj/QWAsmFhsZntlWX o/ZwRIAG40bNiTpzFXjqbG/5irdY1tgTQVKRB/yve9HmBb95PTZdBYvY0JEqLyQ5LRg9 CWJJYJPTz6pm3KGGiinwn87oNETZ9e6zKkvRt/BzKoBU5J2+SvK076pNTTBjZ4bKB4Er o2rW2YHNBUW/5iflEZV1nLTxZzrDbKn5IXzSHfRYZ167do8iu3UId/LZaQribXCibFyH ZotCxObtiiJzT7pp789EY+m+ACPTkucD6udZnOfjmmKJt4s0bFnoswmvWJYpVanH4fuz NFYw== 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=7l4PL09eKxeC8JrLL1GKj11eH/AENxSskGBoK9GFtHM=; fh=qIwwf5yzYdGUjWHfLdZ1pY/abUtmNziDEAnYJGhPICo=; b=gyktsPWFvhJ3pWQSpbpm8ZIh+vIZnuReJ4SQkxvRp8lPH0xk5mofxB1drwXBwHSy/3 v3T8FRyoG7TTe2ylG/P7O5ZPSgqG5qvOdF6UAjS+XimESszWkRrCXyGHV7FfytkQ14ww 4cr3qAu/lXffYL/tnIDIaDv8ysBalvGYwQLLROTezHSrTQoXgsLw1UG/84J6ZrJiVwA6 r/Vl9RBD8EXF37VtEA/qnB15F9mtoVsxZOVqrl/d9zkYQlFpwPSDsJua0F5wHw7MnVTp 8UlSCzvnUc5cEKxZ3aY6CjRV3gZuFOKIslJOsrdK/ySGdDtbaqVdRmty+2D62kDze7LB /ofQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F5Rv+76h; 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 71dfb90a1353d-4ed41c25215si1806726e0c.300.2024.06.18.09.03.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:03:58 -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=F5Rv+76h; 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 1sJbHU-0004OV-35; Tue, 18 Jun 2024 12:02:02 -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 1sJbHM-00048l-RR for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:53 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHI-0006uI-Q0 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:51 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a62ef52e837so724265866b.3 for ; Tue, 18 Jun 2024 09:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726507; x=1719331307; 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=7l4PL09eKxeC8JrLL1GKj11eH/AENxSskGBoK9GFtHM=; b=F5Rv+76hO1dDz6pdtsbSDhqZ5q//djbZcXEBqWMZl7VQOG9T5dJGBv0EV5/lND5z5H YmogFposPIwQXjrcXkhPjIbgfA8erLI9ySEUTPmXTka0aEcjJwmZMQ/bL9ohuyhtn7cQ NDMqeSXFHJaDhcg3bt9gHuHUTyUFvjgp1i9TVPT1ICWvQuXC1H0YGfJD3pu1iN7qlyyM 7g6b+3hwXeQ/oQcfly6w5usgi3A1oZ7Qfk6S25bYp7xeWbnrIxG4a9CUleMTHgjFwOr7 NGC2M6R3scqSbp3k6YX/PT/nRO67aKoEZf3OmZ0QFzPJ7X4K/l5RBXyzKz5LmsJmcfCu BEng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726507; x=1719331307; 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=7l4PL09eKxeC8JrLL1GKj11eH/AENxSskGBoK9GFtHM=; b=X5YuP9R7qm5q6uK0yeNs9geN67UnNHbmLKUHmabeTa7KLmEZdllRbynt+SjmOIoA1k 7WSN02NRAe2sFchKJmFlgxEug4zUXOVJ0zewDx6GSNum2BXvdBgCtvoSF8bhNvGWjG5r td1n533FSMxBCM8OeJtEJjz+j/fmFBmWDb9OsJUHs6mAAU9upMYObR/AdNNOQF/TYuxv H/y+fnapTXG1Nua2S4vLhoapWT85pzxgHLHOTqyfHhDmYn6eteVM1LNyXN7EdJ2bBO25 sOP5LaWrtRtjU/nkKFBxfr5BZuoCzc7hCasHBVjuqY+uqYTmgjp14umunzR6u11NHKaG syKg== X-Gm-Message-State: AOJu0YxaIqz1J3W0BAsk/xO+/W7Er4TZxK9TCBg3iS6eVGXUC3rhXphO GvffZhE8NOlJL72eT3l2GTUmSkbBYQre+D30qEsyC8d5SGL7aEJy1BphEZ8eHN8vUh9JyGmZAcT w X-Received: by 2002:a17:906:99d0:b0:a6f:7834:d3fa with SMTP id a640c23a62f3a-a6f7834d5dfmr861808966b.18.1718726506966; Tue, 18 Jun 2024 09:01:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db6dfesm624580866b.87.2024.06.18.09.01.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Igor Mammedov Subject: [PULL 11/76] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Tue, 18 Jun 2024 17:59:33 +0200 Message-ID: <20240618160039.36108-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-12-philmd@linaro.org> --- 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 3c93c0c0a6..268b25e332 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1677,8 +1677,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 f9e8af3bf5..7c43c325ef 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 66cef201ab..b7ea17d5f3 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -556,7 +556,7 @@ static void virt_build_smbios(LoongArchVirtMachineState *lvms) 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 4fdb660525..5676d66d12 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);