From nobody Mon Feb 2 05:59:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1768488237; cv=none; d=zohomail.com; s=zohoarc; b=KtujSLFr0v7dvkkL5vVsDRjmDbTy96QTi6x0Ti39DWz4hx2tKgOD8fwVcoftPJPenOX63rSq9vYBB5YI5UnyADHEkGB2OB85kzczrKuSzBCO8OiusecrzguSYrL/iElfwQIn+ESvTFzZ66OHYkgRFso/EsE/Wddzqgx3iR5FPb4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768488237; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=HRPIyOq47kVxnzvPVtbudTMIxRDCDFuwy84qomXjOvM=; b=Qmwgd77z7yCAGErcnDQjNLzlvO7zTUkx2O9dgS8iL/53/z82g3t35qw6m7VrSwPFI189HKTFflXhDdxG3Iku9F/oQv42IxH+qC7/ymSZ6ijIaMlnqInujYaDh1NRY6kMtCyjhkNCcNbBdNYoBheKo8DLgYKMELOriKA2YK6YRWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1768488237601506.39685483149833; Thu, 15 Jan 2026 06:43:57 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 93B80417E9; Thu, 15 Jan 2026 09:43:42 -0500 (EST) Received: from [172.19.199.83] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id A15FF41C7D; Thu, 15 Jan 2026 09:43:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 1ED453FBC4; Thu, 15 Jan 2026 09:42:36 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id BD9CB41B58 for ; Thu, 15 Jan 2026 09:39:16 -0500 (EST) Received: from mx-prod-mc-03.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-567-QFyWmq5eM3uB9frifSJpvw-1; Thu, 15 Jan 2026 09:39:15 -0500 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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3E79419560B5 for ; Thu, 15 Jan 2026 14:39:14 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9B6FE19560BA for ; Thu, 15 Jan 2026 14:39:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768487956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HRPIyOq47kVxnzvPVtbudTMIxRDCDFuwy84qomXjOvM=; b=LpFQczkSZJpZjEy5oaRy9T6GhE7dm15O8aEPPwlMT5IZm9qjPX5XVI0QwF5tN2MMuqtqbP BCm4BHSXNpQMBgwV1+LBEssueWZ9K5k1F93SA3Ysby4/78j9nVbu5Og/9rSlgGLR1weC5W +c1g1mlSIfv6IPS6XmMX+4bkUvZrvBE= X-MC-Unique: QFyWmq5eM3uB9frifSJpvw-1 X-Mimecast-MFC-AGG-ID: QFyWmq5eM3uB9frifSJpvw_1768487954 To: devel@lists.libvirt.org Subject: [PATCH v2] domain_logcontext: Don't assume remote driver is always available Date: Thu, 15 Jan 2026 15:39:11 +0100 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: PnNXUmfHikrFMe34s32D8o2pfa-m3CtROdfv2FiEp04_1768487954 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TA7UCH364R7WJ46RWHKG7J3DQ3IP4XQE X-Message-ID-Hash: TA7UCH364R7WJ46RWHKG7J3DQ3IP4XQE X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768488239500158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Some functions inside of domain_logcontext.c call virLogManager APIs. But that one is available only when remote driver is enabled. Therefore, make domain_logcontext.c conditional, just like log_manager.c is: if config.has('WITH_REMOTE'). Resolves: https://gitlab.com/libvirt/libvirt/-/issues/842 Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- v2 of: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/7HSM= 5JB5C7GLBJWXH5A2N2NNAGWXRQFC/ diff to v1: - Instead of #ifdef-ing virLogManager APIs, just make the whole domain_logcontext.c compiled conditionally. src/hypervisor/meson.build | 7 ++++++- src/libvirt_logging.syms | 7 +++++++ src/libvirt_private.syms | 7 ------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/hypervisor/meson.build b/src/hypervisor/meson.build index c32703af88..91eaefbebc 100644 --- a/src/hypervisor/meson.build +++ b/src/hypervisor/meson.build @@ -2,11 +2,16 @@ hypervisor_sources =3D [ 'domain_cgroup.c', 'domain_driver.c', 'domain_interface.c', - 'domain_logcontext.c', 'virclosecallbacks.c', 'virhostdev.c', ] =20 +if conf.has('WITH_REMOTE') + hypervisor_sources +=3D [ + 'domain_logcontext.c' + ] +endif + stateful_driver_source_files +=3D files(hypervisor_sources) =20 hypervisor_lib =3D static_library( diff --git a/src/libvirt_logging.syms b/src/libvirt_logging.syms index e2a1a7109f..5e867703cb 100644 --- a/src/libvirt_logging.syms +++ b/src/libvirt_logging.syms @@ -3,6 +3,13 @@ # =20 =20 +# hypervisor/domain_logcontext.h +domainLogContextGetWriteFD; +domainLogContextMarkPosition; +domainLogContextNew; +domainLogContextReadFiltered; +domainLogContextWrite; + # logging/log_manager.h virLogManagerDomainAppendMessage; virLogManagerDomainGetLogFilePosition; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 4e57e4a8f6..51f4d6db24 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1695,13 +1695,6 @@ virDomainInterfaceStopDevice; virDomainInterfaceStopDevices; virDomainInterfaceVportRemove; =20 -# hypervisor/domain_logcontext.h -domainLogContextGetWriteFD; -domainLogContextMarkPosition; -domainLogContextNew; -domainLogContextReadFiltered; -domainLogContextWrite; - # hypervisor/virclosecallbacks.h virCloseCallbacksDomainAdd; virCloseCallbacksDomainAlloc; --=20 2.52.0