From nobody Sun Feb 8 20:35:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1677497721; cv=none; d=zohomail.com; s=zohoarc; b=F7+nP/BbRoGz6D1QC9O6F70Sdu2m4/mj4QnIR1Vkg+gKu/tQUHhSABviahFi5sHEjux6mFApGZFEGu+x9eo/LE9+qO85uqYSgbeCkOpe+DBmDW0XdX+dd2VdaF6i/ltXk9oGJY7mCdh6hp7qhbp5CpL5QwEdU/54tHutpF4jl8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497721; h=Content-Type:Content-Transfer-Encoding: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=hgf1MQODWvmco6I2HscijOXY1zyPZjmad+3M3W1CA3w=; b=OeMhXZMhWV/X7iJ3FcPuNY0InyZqh7JLTIsydjV4APYTiViAjPAPahujiLewbBP0DMT6/CV4Rbj5oaPYBonpEx10B38M9bhHbzFpIyd9dHHDYZlqPGV0zZMUCO8BdZOqkGkSS7FidR+858cIZy8Z9u3hSNYEjuJ7Zce1RSjV2QM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1677497721656504.9366545530571; Mon, 27 Feb 2023 03:35:21 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-231-X-G0DkEIMoKcozQsVWISrA-1; Mon, 27 Feb 2023 06:35:15 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0EAD995D60E; Mon, 27 Feb 2023 11:35:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7532A40C6EC4; Mon, 27 Feb 2023 11:35:12 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5016C1946589; Mon, 27 Feb 2023 11:35:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2FCFC1946586 for ; Mon, 27 Feb 2023 11:35:06 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1546C492B14; Mon, 27 Feb 2023 11:35:06 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id B02EC492B12 for ; Mon, 27 Feb 2023 11:35:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497720; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hgf1MQODWvmco6I2HscijOXY1zyPZjmad+3M3W1CA3w=; b=Ax9ncobuCRseqkUpPtf7XKQQ12wGwkwvJlfRAbOCSGtpT/GwOwmLXZ9Xh9lwzqH6loa4VJ AP5stoADSrli60GM7rmN+NeI6hLaHDJfdTzZfgnMpQT5VjlMAshTQJ/RQvXFgWCHaXh3M2 d46YNt5uo0ESDHszX/Vhkk+K1KCQrl0= X-MC-Unique: X-G0DkEIMoKcozQsVWISrA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/4] qemu: Don't error out on 'unknown' memory model in qemuMonitorJSONGetMemoryDeviceInfo() Date: Mon, 27 Feb 2023 12:35:00 +0100 Message-Id: <6e051c3c6459d3399f3746bcb2bf095646a8fb6f.1677497565.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: 1677497723497100001 Content-Type: text/plain; charset="utf-8"; x-default="true" When starting QEMU (or when reconnecting to a running one), qemuMonitorJSONGetMemoryDeviceInfo() is called to refresh info on memory devices. In here, query-memory-devices is called which returns info on all memory devices. The result is then iterated over and for some memory models runtime information is updated. The rest is to be ignored. Except, when introducing SGX support, this was turned into an error leaving us unable to start any domain with virtio-pmem memory device (as virtio-pmem is to be ignored). Fixes: ddb1bc051959eef4ad7ed6ac47b57056632bdb5e Signed-off-by: Michal Privoznik Reviewed-by: Kristina Hanicova --- src/qemu/qemu_monitor_json.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index e81b464eea..d76fea8b00 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -7243,9 +7243,8 @@ qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitor *mon, return -1; } } else { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s memory device info is not handled yet"), typ= e); - return -1; + /* type not handled yet */ + continue; } =20 meminfo =3D g_new0(qemuMonitorMemoryDeviceInfo, 1); --=20 2.39.2