From nobody Sun May 19 17:57:59 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=1610981013; cv=none; d=zohomail.com; s=zohoarc; b=JQ3Sa6edBBAQ5upOxPgS5wTn51p4kO79gjkh7f1w4U0Bn+7BVRYLjhj65eOGg1tFL0cni1P2jlMoLl3dD0v6FPzE/cgRlqZFVGO3laK1pHqEk+9SfGyTTwux+NLW8gCDUisQ1s2kuVVzP5KWcHTV5c/e/IWGPvBNC7cl8A9FAUs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610981013; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=bJ2pd08zuBT6L0wKjv08WZf8Jt4ZuZhMOQ+nnEP85Eg=; b=DUstX4Orj/SrQ7fVLBUR4oGY/EYpPFw8QMkD92ecpYWsX9J8RQxqXiSMxI8GaiMfTOXZdmgkt9txFl5Qwhu3Vn3JcbIqQ6yxkkxV484xnjB3PIhk3/H9cKZMc4dzA4brxEeADjt9am6Cr714pricwqZ6ykGo5FJXVRfjoa9kSeo= 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 1610981013511117.8329308543722; Mon, 18 Jan 2021 06:43:33 -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-542-OSowfEdTN2GJmpzltH1GZA-1; Mon, 18 Jan 2021 09:43:30 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1CB7C100C665; Mon, 18 Jan 2021 14:43:24 +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 8BF641BCEE; Mon, 18 Jan 2021 14:43:23 +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 4B7394A7C6; Mon, 18 Jan 2021 14:43:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10IEhIwV031830 for ; Mon, 18 Jan 2021 09:43:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id C8F6C60C78; Mon, 18 Jan 2021 14:43:18 +0000 (UTC) Received: from work.redhat.com (ovpn-112-237.ams2.redhat.com [10.36.112.237]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18AEA60C75; Mon, 18 Jan 2021 14:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610981012; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=bJ2pd08zuBT6L0wKjv08WZf8Jt4ZuZhMOQ+nnEP85Eg=; b=iJacHDjSfRLr+pxmLqEwmKkCHfEEHOyD7EAnpGnPay89mlJYZp2/2vm2cvgF243+NmlWdG PXITTJRP87+uZfK4I5Y99vWGb6sU4QzvYZbu8t9jEb788umtp7063lIWQO+Z8EfGAQAl7h Ug8eb/eqLNYaijU9hKHNBafMD+QicXc= X-MC-Unique: OSowfEdTN2GJmpzltH1GZA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu_validate: Allow kvm hint-dedicated on non-passthrough VMs Date: Mon, 18 Jan 2021 15:43:14 +0100 Message-Id: <20210118144314.39582-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.79 on 10.5.11.15 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. This restriction is unnecessary, see https://bugzilla.redhat.com/show_bug.cgi?id=3D1857671. Signed-off-by: Tim Wiederhake Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index a060bd98ba..c58d221cf8 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -253,16 +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_PASSTH= ROUGH)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("kvm-hint-dedicated=3Don is only applicab= le " - "for cpu host-passthrough")); - return -1; - } - break; - case VIR_DOMAIN_FEATURE_VMPORT: if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ABSENT && !virQEMUCapsSupportsVmport(qemuCaps, def)) { @@ -335,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