From nobody Mon Feb 9 00:07:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1606999214; cv=none; d=zohomail.com; s=zohoarc; b=jt5QkusXvAflieT/+IHaBwVjMn+f/MsbRM+YXp2Wbg4YeYbMH3KpYqavy/L+n3p9J0Xy+8ec0HB4TsTe6A1P/K2AkzNI7muislgieoV/sYyygyx3EM42Z0AwjPw6VMv0kUjud70gBezY6EcQdQlZrWWFmImGuaK/WeQenpUaw10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606999214; 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=S6b0j5/S9UhH5grBzw+DEL2UIkvxbJ48yUt3S+Rx9jE=; b=PzyPZfCzZggrSCUD2mcIhLHD7/ed5Jv138yX+RjJbak75EHxN6o4zFlbLI/6KV6tI6VHQ5voJ5KbaEI+p7pZnsHkyW778l8AV6evCt6sVtJHeXy6tbNjKJH2YH6pWEXhsp+jb7s+rLzNf6hEv4wFr9gObG2+II52CZUr7UN66TA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1606999214716447.81579864299295; Thu, 3 Dec 2020 04:40:14 -0800 (PST) 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-261-uzhd-5rFMQWozJiwAiQvew-1; Thu, 03 Dec 2020 07:37:19 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94AFF1006C96; Thu, 3 Dec 2020 12:37:12 +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 72E0D6085A; Thu, 3 Dec 2020 12:37:12 +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 36C5D50046; Thu, 3 Dec 2020 12:37:12 +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 0B3Cb5L9003153 for ; Thu, 3 Dec 2020 07:37:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4BDD35C1C2; Thu, 3 Dec 2020 12:37:05 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id C18F55C1D0 for ; Thu, 3 Dec 2020 12:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606999211; 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=S6b0j5/S9UhH5grBzw+DEL2UIkvxbJ48yUt3S+Rx9jE=; b=hXOxLAlUgk3fM8Bv46oYaRlWBSvAOtAqfPQ2UGhNemEm+YvZbIXWJjeZ9ALjZ/CnTZmiym pb+2++nKkFU43S4VQckaJiNYweQyxP26tkygUgv+W6a8CtNXyHjq+0vVsUCwv+Kkwbt2bq qKe1G84DSNDNoQSl3DcANLDQGpn63W0= X-MC-Unique: uzhd-5rFMQWozJiwAiQvew-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 14/27] qemu_validate: Require virtio-mem device for mem model virtio Date: Thu, 3 Dec 2020 13:36:17 +0100 Message-Id: <711d5075e71742fa746f612c7f9a28dc18f779a2.1606998426.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.79 on 10.5.11.13 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" Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index fc9bc7a5b4..e4d12db3bd 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4621,6 +4621,21 @@ qemuValidateDomainDeviceDefMemory(virDomainMemoryDef= Ptr mem, break; =20 case VIR_DOMAIN_MEMORY_MODEL_VIRTIO: + if (mem->s.virtio.pmem) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_PMEM_PCI= )) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtio-pmem isn't supported by this QEMU= binary")); + return -1; + } + } else { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI)= ) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtio-mem isn't supported by this QEMU = binary")); + return -1; + } + } + break; + case VIR_DOMAIN_MEMORY_MODEL_NONE: case VIR_DOMAIN_MEMORY_MODEL_LAST: break; --=20 2.26.2