Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F6E32FF661 for ; Fri, 30 Jan 2026 05:47:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769752056; cv=none; b=SZhhqh8KhzGkKAlaGetjG7ketnTDTBzynp8fX/RgSWHKidht0eTpPOoDqXgCGi/A+ti7z3Ug0i23eD5IIey58ykaREKiMEWgC4+Z3F7j1Hr5MhlUMSRjTjT1hHwYz9taYRGMau3UtApYGXtKJ735g0RLrZuWekTV4d+UgnAnZuM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769752056; c=relaxed/simple; bh=VU8Qza3S1AKHhzsNMdTyIAhFLSNWJJOZbBEXfAE9Ukw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jcr7oAK0Rdw1332qduXYOwgQUtCV4+QiV330HyhTyG0U5xNBuvUwVHxW06SF+TwbY5q/4x+SwvxnOvTqd9UtATfBXfRPXCclg97KLnYZBzLqz81p2hhI0E5j8w5NTA/Az21AIezUAT7d+9odvA/9f64tKErcwo/bFbg2lS/323w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=g6e0hMBH; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="g6e0hMBH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769752054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pKeoqLnw94ekV3SKkVoM9wLZ2GlZHZ0eY7j3K1tcDgA=; b=g6e0hMBHS9l4Aipgc2Z4MLMyKLOX/AHplBD3kxj8WZ8TsAE3+fyP7glows3c9eJ4dqc3Zj dxQ3nw7hnH+QnLW8aRts3Gl7ARCC+uO/ujEbN5pcf9als4rURfUs44tg9PpDbPUtNnBr35 RmS9gERVrmxYnLTOwWrTlNd6DGR0sLY= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-47-Xg4ZZ5_KOomfVzHsx3HC0A-1; Fri, 30 Jan 2026 00:47:30 -0500 X-MC-Unique: Xg4ZZ5_KOomfVzHsx3HC0A-1 X-Mimecast-MFC-AGG-ID: Xg4ZZ5_KOomfVzHsx3HC0A_1769752049 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AA21F1956054; Fri, 30 Jan 2026 05:47:28 +0000 (UTC) Received: from osteffen-thinkpadx1carbongen12.rmtde.csb (unknown [10.45.226.150]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3E72619560A2; Fri, 30 Jan 2026 05:47:22 +0000 (UTC) From: Oliver Steffen To: qemu-devel@nongnu.org Cc: Marcelo Tosatti , Zhao Liu , Eduardo Habkost , Ani Sinha , kvm@vger.kernel.org, Richard Henderson , Paolo Bonzini , Igor Mammedov , Stefano Garzarella , "Michael S. Tsirkin" , Gerd Hoffmann , Joerg Roedel , Luigi Leonardi , Marcel Apfelbaum , Oliver Steffen Subject: [PATCH v6 1/9] hw/acpi: Make acpi_checksum() public Date: Fri, 30 Jan 2026 06:47:06 +0100 Message-ID: <20260130054714.715928-2-osteffen@redhat.com> In-Reply-To: <20260130054714.715928-1-osteffen@redhat.com> References: <20260130054714.715928-1-osteffen@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Make the ACPI table checksum calculation function (in core.c) public so it can be reused in other parts of the ACPI code. Signed-off-by: Oliver Steffen --- hw/acpi/core.c | 5 ++++- include/hw/acpi/acpi.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index d9979b0da9..6b65e587f2 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -83,7 +83,10 @@ bool acpi_builtin(void) return true; } -static int acpi_checksum(const uint8_t *data, int len) +/* Calculate the ACPI checksum value so that if used in the corresponding + * header field, the ACPI checksum verification will be successful. + */ +int acpi_checksum(const uint8_t *data, int len) { int sum, i; sum = 0; diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index 4b8ee094c4..b036116dfb 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -203,4 +203,7 @@ struct AcpiSlicOem { }; int acpi_get_slic_oem(AcpiSlicOem *oem); +/* core.c */ +int acpi_checksum(const uint8_t *data, int len); + #endif /* QEMU_HW_ACPI_H */ -- 2.52.0