From nobody Mon Feb 9 17:35:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628170887; cv=none; d=zohomail.com; s=zohoarc; b=ELPqSiN0ogmRScw+mJAXgGALha4QsZSdeAlDSqO1gZcgR2SKnh/iDkGm7vTHsM8JQVWLsPmcaUqaju8+NaJNcn06Ew+pytQpX7n2efUJmbWGQ0H3PFj7wq2GxNRPHyIcBpIFpik3jOziaepvyc+iUs/HEwxDKmkfg4UXmkRMOzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628170887; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TYf1GFFuwBAYf+Mq6eIvqg16aKV8svAGHXJNhjMg4ZU=; b=N30PvCrZxteeKGEltHQeiArFl/MHVewFA0/CFm2TMlH3/vvbpf2mbxY6M75zMAiVNiAFrwl3nPH1/XWj1HbCPDZbWs9VJSG8KKpXE5clws6DndX6KS24ZYILRurvGyQ9YafnTonqPxLFJgwFEefGWE+t6qwqj03MBh/hscDt9QM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1628170887101822.7744194532391; Thu, 5 Aug 2021 06:41:27 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-556-dTUGaC7PMOWAQImcROYCKg-1; Thu, 05 Aug 2021 09:41:24 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 83B071800D41; Thu, 5 Aug 2021 13:41:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 39C9760BF4; Thu, 5 Aug 2021 13:41:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 04199181A3F2; Thu, 5 Aug 2021 13:41:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 175DalJ6011939 for ; Thu, 5 Aug 2021 09:36:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id BCBE45C1C5; Thu, 5 Aug 2021 13:36:47 +0000 (UTC) Received: from work.redhat.com (unknown [10.39.194.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id 119B75C1A1; Thu, 5 Aug 2021 13:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628170885; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TYf1GFFuwBAYf+Mq6eIvqg16aKV8svAGHXJNhjMg4ZU=; b=dZSkSjn1iziQiw8BsD0l4RxHc2vgmsNy5BvRJ7JPrJLlZwR2R2xSdsN0VGq/yULj1rO69t 0gWOBR7v9cqGKHs6bYCK6Hh/DYTJLpPpSBtriaBAxTQqEArtXjT2D75EHHMCYnoSnA/C+B 8bb+3qXTds66Tpa32rFtoIQCl4yny3A= X-MC-Unique: dTUGaC7PMOWAQImcROYCKg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] virQEMUCapsCachePriv: Add kernel command line Date: Thu, 5 Aug 2021 15:36:39 +0200 Message-Id: <20210805133640.57947-3-twiederh@redhat.com> In-Reply-To: <20210805133640.57947-1-twiederh@redhat.com> References: <20210805133640.57947-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628170889106100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/qemu/qemu_capabilities.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 21b7e8050b..c2a885351f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4096,6 +4096,7 @@ struct _virQEMUCapsCachePriv { virArch hostArch; unsigned int microcodeVersion; char *kernelVersion; + char *kernelCmdline; char *hostCPUSignature; =20 /* cache whether /dev/kvm is usable as runUid:runGuid */ @@ -4112,6 +4113,7 @@ virQEMUCapsCachePrivFree(void *privData) =20 g_free(priv->libDir); g_free(priv->kernelVersion); + g_free(priv->kernelCmdline); g_free(priv->hostCPUSignature); g_free(priv); } @@ -5649,6 +5651,9 @@ virQEMUCapsCacheNew(const char *libDir, if (uname(&uts) =3D=3D 0) priv->kernelVersion =3D g_strdup_printf("%s %s", uts.release, uts.= version); =20 + if (virFileReadValueString(&priv->kernelCmdline, "/proc/cmdline") < 0) + goto error; + cleanup: VIR_FREE(capsCacheDir); return cache; --=20 2.31.1