From nobody Sat May 18 17:16:02 2024 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=1650357914; cv=none; d=zohomail.com; s=zohoarc; b=VEIoQ6J/O5AUvjBvtKksH/k+s47wHW7xBS0/51o+sLBleFleYftIUBBNPJOH6lbUQRUYdD/PttGPShiu5lmmN/HFqZUR7idhld2yxSqLpFqHhe1W36wf4LwKvcrHuJClw+VxdMKztFohq7To1PbMkH1jDlithnQCnZX5ujBs8Tw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650357914; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=F0corDsSw27DiteeWcRMDNuLGM7Uj646L/45eYoXxUg=; b=fkx+nYekqAICD/Y34gybM0obkUsKQpbP8ZV5dq3zFximem+qlATBhpaUFcXkcnk+/qTeNL5N2cHk39iQ4eRAGnngXp2IymtwxsHgwERPLbY/GSLQGLr0Q8O04nFkSjChtmTPGkC+sI6T3C6pEO4idc0M8Iv9wRyxhetfWWCoawQ= 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 1650357914333425.06398494869836; Tue, 19 Apr 2022 01:45:14 -0700 (PDT) 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-193-HLuUZyFOO8qzPx8yxtscVQ-1; Tue, 19 Apr 2022 04:45:07 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 278F7189FFFA; Tue, 19 Apr 2022 08:45:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82171C28123; Tue, 19 Apr 2022 08:45:02 +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 1471E1947BBD; Tue, 19 Apr 2022 08:45:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C590B1947BBB for ; Tue, 19 Apr 2022 08:45:00 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id AB1DC215CDD2; Tue, 19 Apr 2022 08:45:00 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id 528E5215CDD1 for ; Tue, 19 Apr 2022 08:44:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650357913; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=F0corDsSw27DiteeWcRMDNuLGM7Uj646L/45eYoXxUg=; b=i1q/94LHE1x3N916KTXHkyv7SXee1glofEdyxRCIS5wtA4+dYpiXacSyjyPTvMjp4zRWVE uCNwqCywJXdjKa2/Cfh1tKtBTgoMnE7JMSznDRorfcfRpRvJd9NZD2jvy2Vr8krgr+1GEJ R7QsS96t4W5zS7vKzVlyaCVede6z6Vc= X-MC-Unique: HLuUZyFOO8qzPx8yxtscVQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] qemu: Fetch info on NVDIMM-s too when updating memory devices Date: Tue, 19 Apr 2022 10:44:52 +0200 Message-Id: <5e43e82be348ad4094ce42c756ea3e977f310a02.1650357892.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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 2.85 on 10.11.54.8 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: 1650357916486100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Sometimes it may come handy to learn what address is a NVDIMM mapped to inside a guest. While users can provide an address they want to have NVDIMM mapped to, it's optional. Fortunately, when a domain is being started we issue the 'query-memory-devices' monitor command and the reply is the same for 'dimm' and 'nvdimm' types. Therefore, updating NVDIMM address is trivial. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index d5622bd6d9..68ee322ad9 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -7484,7 +7484,7 @@ qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitor *mon, meminfo =3D g_new0(qemuMonitorMemoryDeviceInfo, 1); =20 /* dimm memory devices */ - if (STREQ(type, "dimm")) { + if (STREQ(type, "dimm") || STREQ(type, "nvdimm") ) { if (virJSONValueObjectGetNumberUlong(dimminfo, "addr", &meminfo->address) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", --=20 2.35.1