From nobody Mon Nov 25 12:52:07 2024 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; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1601653146; cv=none; d=zohomail.com; s=zohoarc; b=KZKDsPTYcCYUlGPinnMKsgQDMJYPPain/4WawBQZK7bmt0i/rMgVskYAV9zZa7O+1ZQsy8QEi2baU+DGtAu+i6X9x/mx+UwvyeznwOr+1/j/33oPqN17EtZpy5BUQjxb6bNpQUfQs70+bXY34jG4XJwEDXWzUORN4g61LD9KsQs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601653146; h=Content-Type:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=mUmMxFFTAZCzIIk2EwiUrnlse4VlTnphhZo18/8Mla8=; b=NpGqktfljbiPvQBn5ge8TzvOlX8vmWp/Y0kqDbGZD45+9VyREUYLJf1G0gTuSfDcIPV3kd9XF0f0m+N7SMis99qKIJdBLL8l6tqMeX0bMKs3ZtO27Hwb+NUFf4eUsD+NY3TdFugGwefbSvawFgrEEnV2do3BhSK8jGVQ13EHaB8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail 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 1601653146627390.14095402790485; Fri, 2 Oct 2020 08:39:06 -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-331-36FSxYpUPjONJIA6NUsb2Q-1; Fri, 02 Oct 2020 11:39:03 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97A8B420E7; Fri, 2 Oct 2020 15:38:55 +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 99BD519C78; Fri, 2 Oct 2020 15:38:54 +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 A5BEF18095FF; Fri, 2 Oct 2020 15:38:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 092FVgmo004031 for ; Fri, 2 Oct 2020 11:31:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id A75F62022E00; Fri, 2 Oct 2020 15:31:42 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1C362014E17 for ; Fri, 2 Oct 2020 15:31:40 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 78F0C805C1E for ; Fri, 2 Oct 2020 15:31:40 +0000 (UTC) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-300-jk0CjxBgORyNf7zfQgvVjw-1; Fri, 02 Oct 2020 11:31:35 -0400 Received: by mail-qt1-f170.google.com with SMTP id o21so1546454qtp.2; Fri, 02 Oct 2020 08:31:35 -0700 (PDT) Received: from gabell (209-6-122-159.s2973.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [209.6.122.159]) by smtp.gmail.com with ESMTPSA id z9sm1266936qta.95.2020.10.02.08.31.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Oct 2020 08:31:33 -0700 (PDT) X-MC-Unique: 36FSxYpUPjONJIA6NUsb2Q-1 X-MC-Unique: jk0CjxBgORyNf7zfQgvVjw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=mUmMxFFTAZCzIIk2EwiUrnlse4VlTnphhZo18/8Mla8=; b=Jm3BXgFLAdqA55TyD+IhQNN+SyTzcMvj58YhYRdWz9qgQ0DzfM6ga/ex68jaNn6rcS JbJPssn/b/JC8wCmAjiTdbHl6HRT5U1JS/rsFFk0w2bcmuGxW5o3V4998Eed9GqvLmWa E/oyD25PBDXONAtZzIRJZrU2XZwgsHX95PgElCDf03beJshaTUYSeh/TrWMlrL+vqpQp 7vr7e1VgeCJXBlaNzzoH1zpfaa5YyXAPInA8ZYyJT/sBfTz7NyuD7cO88LyM7r/x6mlL RYcWBW+g25ACsx4/ws+KRlqylgdfgb1gFdwoTV5ioO8buSXaG89r4aujtjLTyxm7++lF Z4IQ== X-Gm-Message-State: AOAM531eXNd+TBHYf6u4jUVtIBXVorThsW1R+4j8Uz2gkUGUjBdVff4R wQ1s2GFbdNSxO/O+3p/QmbV474sbWQ== X-Google-Smtp-Source: ABdhPJyVm+iISKXR7tRknHg2IzU6zh1melfwrHSsyjMGvEd51a2EL1vx3NSlG1ntCJ8ylDXuOnuVkg== X-Received: by 2002:ac8:178d:: with SMTP id o13mr2812195qtj.103.1601652694534; Fri, 02 Oct 2020 08:31:34 -0700 (PDT) Date: Fri, 2 Oct 2020 11:31:32 -0400 From: Masayoshi Mizuma To: =?utf-8?Q?J=C3=A1n?= Tomko , Michal =?utf-8?B?UHLDrXZvem7DrWs=?= , libvir-list@redhat.com Subject: restrictions for virtiofs (related to commit: 88957116c9 for libvirt 6.9.0) Message-ID: <20201002153132.e64p256p5vy3gsnq@gabell> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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.23 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-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hello Jan, and Michal, commit: 88957116c9 ("qemu: Use memory-backend-* for regular guest memory") = gets the system memory sharable without numa config. The qemu options with the patch will be like as: -machine pc-q35-5.2,accel=3Dkvm,usb=3Doff,vmport=3Doff,smm=3Don,dump-gues= t-core=3Doff,memory-backend=3Dpc.ram \ -object memory-backend-file,id=3Dpc.ram,mem-path=3D/var/lib/libvirt/qemu/= ram/2-Test/pc.ram,share=3Dyes,size=3D17179869184 \ So, we can remove the numa restriction of virtiofs, right? The patch to remove that is the bottom of this email. And, 88957116c9 seems to introduce another restriction which we cannot create numa nodes on the machine. I got the following message when I set the numa config and started the VM: 2020-10-02T00:31:46.780374Z qemu-system-x86_64: '-machine memory-backend= ' and '-numa memdev' properties are mutually exclusive qemu rejects the -machine memory-backend' and '-numa memdev' because it may cause crash. commit: ea81f98bce ("numa: prevent usage of -M memory-back= end and -numa memdev at the same time") introduced the check. Do you have any ideas to solve above? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D From: Masayoshi Mizuma Date: Fri, 2 Oct 2020 10:50:06 -0400 Subject: [PATCH] qemu: Remove the number of numa restriction for virtiofs virtiofs requires at least one numa node to access the system memory as shared memory. 88957116c9 ("qemu: Use memory-backend-* for regular guest memory") gets the system memory sharable without the numa config. Let's remove the number of numa restriction for virtiofs. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_validate.c | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index a212605579..b5372e7499 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3475,36 +3475,36 @@ qemuValidateDomainDefVirtioFSSharedMemory(const vir= DomainDef *def) size_t numa_nodes =3D virDomainNumaGetNodeCount(def->numa); size_t i; =20 - if (numa_nodes =3D=3D 0) { + if ((!numa_nodes) && (def->mem.access !=3D VIR_DOMAIN_MEMORY_ACCESS_SH= ARED)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("virtiofs requires one or more NUMA nodes")); + _("virtiofs requires shared memory")); return -1; - } - - for (i =3D 0; i < numa_nodes; i++) { - virDomainMemoryAccess node_access =3D - virDomainNumaGetNodeMemoryAccessMode(def->numa, i); + } else { + for (i =3D 0; i < numa_nodes; i++) { + virDomainMemoryAccess node_access =3D + virDomainNumaGetNodeMemoryAccessMode(def->numa, i); =20 - switch (node_access) { - case VIR_DOMAIN_MEMORY_ACCESS_DEFAULT: - if (def->mem.access !=3D VIR_DOMAIN_MEMORY_ACCESS_SHARED) { + switch (node_access) { + case VIR_DOMAIN_MEMORY_ACCESS_DEFAULT: + if (def->mem.access !=3D VIR_DOMAIN_MEMORY_ACCESS_SHARED) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtiofs requires shared memory")); + return -1; + } + break; + case VIR_DOMAIN_MEMORY_ACCESS_SHARED: + break; + case VIR_DOMAIN_MEMORY_ACCESS_PRIVATE: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("virtiofs requires shared memory")); return -1; - } - break; - case VIR_DOMAIN_MEMORY_ACCESS_SHARED: - break; - case VIR_DOMAIN_MEMORY_ACCESS_PRIVATE: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("virtiofs requires shared memory")); - return -1; =20 - case VIR_DOMAIN_MEMORY_ACCESS_LAST: - default: - virReportEnumRangeError(virDomainMemoryAccess, node_access); - return -1; + case VIR_DOMAIN_MEMORY_ACCESS_LAST: + default: + virReportEnumRangeError(virDomainMemoryAccess, node_access= ); + return -1; =20 + } } } return 0; --=20 2.27.0 Thanks, Masa