From nobody Tue May 7 16:02:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613728478; cv=none; d=zohomail.com; s=zohoarc; b=nF/cwEshtdE690cDoTe/06p0dTqVD2gremfy2pGufHoxKtwBKcFPHE6RvYXik2XF2hY4UB0bOvu/df05NxqBmTM/LioLHWeO8cQEmcTlSETt75UdpztXTxKGjuI5bfOwNpFunWFchysknZrRl6gUUye0V8GE9a6AdKh0vOtMcV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613728478; h=Content-Type:Content-Transfer-Encoding:Cc: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=z4mR9Z3vM7ThPsagxmCrkv8iL4I+Gr7RfqOhpmtoDaE=; b=biqHPL980WHCfNCJNv+TSnCtAlASxzepkW60NtNumMdtwctqk0TG38aoLe6EAkPsgFcc2/e0GaYdimwIEn39V61pmNsfnXteFvNM0BDVvyflEPQVvKo8JI9LgASJ3L3RV/B6wvryBt2v58Nm8PYOmVJODdP/ST8nmmKp0bGbPBY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613728478373202.0703718180589; Fri, 19 Feb 2021 01:54:38 -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-240-djkLWF8ONhS_stBT7QVc9Q-1; Fri, 19 Feb 2021 04:54:35 -0500 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 E7B04100CCC5; Fri, 19 Feb 2021 09:54:29 +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 B75ED100164C; Fri, 19 Feb 2021 09:54:29 +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 15AA118095CB; Fri, 19 Feb 2021 09:54:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11J9s6ZB026777 for ; Fri, 19 Feb 2021 04:54:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5710F10016F6; Fri, 19 Feb 2021 09:54:06 +0000 (UTC) Received: from work.redhat.com (ovpn-113-33.ams2.redhat.com [10.36.113.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B532100164C; Fri, 19 Feb 2021 09:54:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613728477; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=z4mR9Z3vM7ThPsagxmCrkv8iL4I+Gr7RfqOhpmtoDaE=; b=BnLhOjG/3yZ3hUxRexlhLHKT/ZiyH8M0AckLZXzNkTRiNe+gubQ4si9zlbxdNjDHjCzikz NulAw8kJmU6xIQdGr1vsoN8IwlYDOXA4autydREeLJFKP9EHsEBmlvL++q6jhlkbIydeik cyWpip8lu8XM7ruywLNsdInUXFLzsNc= X-MC-Unique: djkLWF8ONhS_stBT7QVc9Q-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/1] qemu_validate: Allow kvm hint-dedicated on non-passthrough VMs Date: Fri, 19 Feb 2021 10:54:00 +0100 Message-Id: <20210219095400.10328-2-twiederh@redhat.com> In-Reply-To: <20210219095400.10328-1-twiederh@redhat.com> References: <20210219095400.10328-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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" A VM defined similar to: ... ... is currently invalid, as hint-dedicated is only allowed if cpu mode is host-passthrough or maximum. This restriction is unnecessary, see https://bugzilla.redhat.com/show_bug.cgi?id=3D1857671 Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_validate.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 2541ae856a..b9971b66bb 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -253,17 +253,6 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, } break; =20 - case VIR_DOMAIN_FEATURE_KVM: - if (def->kvm_features[VIR_DOMAIN_KVM_DEDICATED] =3D=3D VIR_TRI= STATE_SWITCH_ON && - (!def->cpu || (def->cpu->mode !=3D VIR_CPU_MODE_HOST_PASST= HROUGH && - def->cpu->mode !=3D VIR_CPU_MODE_MAXIMUM)))= { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("kvm-hint-dedicated=3Don is only applicab= le " - "for cpu host-passthrough / maximum")); - return -1; - } - break; - case VIR_DOMAIN_FEATURE_VMPORT: if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ABSENT && !virQEMUCapsSupportsVmport(qemuCaps, def)) { @@ -336,6 +325,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, } break; =20 + case VIR_DOMAIN_FEATURE_KVM: case VIR_DOMAIN_FEATURE_XEN: case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: --=20 2.26.2