From nobody Wed May 15 05:50:11 2024 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=1621521423; cv=none; d=zohomail.com; s=zohoarc; b=H/yEdFoJLL6PxrWD+885nAT5Q/bW8YHEZOXzeyacrVheD0SOB1II8T9W9JNtKwt8J58GH6xzqDNxxGqYEQ0GKMsTfknOjPIyO9GE3BMtazGDDaKjbX2eV1Xl+T6ks94vBazyHuhz03eekv8SnDOAsTzRV930nIQR4hzH+2+gZ04= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621521423; 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=fxXNWH5oDLByHUJxw2UUla8KjOvBCoBdrbk3UJywsvQ=; b=jbjX2kjjhGBsh0/97RTr8Zs0OMdCmOsD7VTdEW0nTRl7c5PqOkDGActB/z4KB5QZnsXQyj0tH8Uk+17BblKd+6qUwghkHX9owAaOoGvkXYZ4GUAX0GNB6UGPh9Ty2FYqgA3NW1xt6mw8gEkjO/v98Zwp6XE47Z7Pi4byMND9nHY= 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) header.from= 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 1621521423101427.9624163074866; Thu, 20 May 2021 07:37:03 -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-120-S0zEizG_MymNufdyI5sGDg-1; Thu, 20 May 2021 10:37:00 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2910350202; Thu, 20 May 2021 14:36:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3EDDC10013C1; Thu, 20 May 2021 14:36:53 +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 BA85255353; Thu, 20 May 2021 14:36:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14KETQvD013226 for ; Thu, 20 May 2021 10:29:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 072BC18A50; Thu, 20 May 2021 14:29:26 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.193.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id 434E66062F for ; Thu, 20 May 2021 14:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621521422; 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=fxXNWH5oDLByHUJxw2UUla8KjOvBCoBdrbk3UJywsvQ=; b=i1EqPbycJtZHRVZVRiZt+rnxThu12bAUdDe298yBdHrscH4J7lbd1nSlAsVJln6BqKf+t4 MdXKKo6vY0uLijZDsqohRRomhLhoGLgVJDgET7NczTbZGBtTY1EaM0mKR6L/sD0or26Ksk /F2OJoMln3DBJW1S18AqH3RDXe/HBTc= X-MC-Unique: S0zEizG_MymNufdyI5sGDg-1 From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH] qemu: Add check for needed paths for memory devices Date: Thu, 20 May 2021 16:29:05 +0200 Message-Id: <0307d6c4bf36626f516ce5f3fa6385f0ee4ed0ca.1621520857.git.khanicov@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" When building a commandline for a DIMM memory device with non-default access mode, the qemuBuildMemoryBackendProps() will tell QEMU to allocate memory from per-domain memory backing dir. But later, when preparing the host, the qemuProcessNeedMemoryBackingPath() does not check for memory devices at all resulting in per-domain memory backing dir not being created which upsets QEMU. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1961114 Signed-off-by: Kristina Hanicova Reviewed-by: Michal Privoznik --- src/qemu/qemu_process.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index b69a9d1927..35213f81ec 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3938,6 +3938,11 @@ qemuProcessNeedMemoryBackingPath(virDomainDef *def, return true; } =20 + for (i =3D 0; i < def->nmems; i++) { + if (def->mems[i]->access !=3D VIR_DOMAIN_MEMORY_ACCESS_DEFAULT) + return true; + } + if (mem) { switch (mem->model) { case VIR_DOMAIN_MEMORY_MODEL_DIMM: --=20 2.31.1