From nobody Sun Feb 8 14:53:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1575933378; cv=none; d=zohomail.com; s=zohoarc; b=jK0WSH4zdFhVkskJ79FQVzr+S8Oq8QPtgzv4IX618zo60urnJIbPGhSHDj5toQeDubFOg2nhtEd7O4RwMsUh8QTpSHPFtHXtBTXYIdZrP19i/MQESi4GbKxSt15ohJxu1cIqTNQbVq3loiX8CgueJBnnQG8y4xdcasjsRAS+Tj4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575933378; 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=KCkqA28DplWqzbBKPuSWm+jYUhPdzRxO2wInoQTIdV4=; b=huyqeAtrIyAzU+d+QEbT+PSHBps31J96VwXOSVTuKhVFNEyvU9/+JaoepR97psO57QMZTPQCv6imMrb7QLJOFbHxUybqfuHl2eXHCoFhDtx9VJKE3katubYQXod7JtPWcCHX85f3zQ8Fzhl0rBrUAot++aFGJLRroDe+Hy2+Eo0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1575933378748852.9925934573604; Mon, 9 Dec 2019 15:16:18 -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-352-7GuVHR87N6S5B-fIK-ok4w-1; Mon, 09 Dec 2019 18:16:15 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9C8791083E84; Mon, 9 Dec 2019 23:16:07 +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 73C4F5C241; Mon, 9 Dec 2019 23:16:07 +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 36C701802027; Mon, 9 Dec 2019 23:16:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB9NFsXm008316 for ; Mon, 9 Dec 2019 18:15:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 357B710A2504; Mon, 9 Dec 2019 23:15:54 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3055B1006B55 for ; Mon, 9 Dec 2019 23:15:54 +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 16A5E18E9774 for ; Mon, 9 Dec 2019 23:15:54 +0000 (UTC) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-14-MQ964bPAOF-V7jOgJAPS9w-1; Mon, 09 Dec 2019 18:15:52 -0500 Received: by mail-qk1-f194.google.com with SMTP id c16so6374181qko.6; Mon, 09 Dec 2019 15:15:51 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:fe5:8243:c780:f073:3beb]) by smtp.gmail.com with ESMTPSA id e130sm352436qkb.72.2019.12.09.15.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 15:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575933377; 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=KCkqA28DplWqzbBKPuSWm+jYUhPdzRxO2wInoQTIdV4=; b=CZmQuXpJXYoARXi+5ff3L8oLehII2547pRIeMgFvUin1bMSWnGjmNPA52pZSc/wmvLKZGX kTC/jUYo9rLckCfe79t+UGLC7F6dnvgDI087N3VxBKdGk1IvLcsTqPSYytMOFdMqhrdv++ 6DpVEpSWcgcHV/kp12r64iToWwiSDdQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jF4NsGi/4K2uyWh/shTW/5bN7FzFXcMeSVZqUi5iQxg=; b=Wt1oF2weI+RUuQD9wT8WSaBkL+azruOWLvm0bLCK6SINWSD5yn20u3VO96etwEyfmH 4ayvcGjfeCI13GPP9YGNjz9x4CQIP/sE2J0i88ZpF8wCc+Gp7MmG44nj3VT5oarEcGSK T5YeD5W+EkhCP5di0f7bKWiP+2hciIDjdubfNyB2b/Q44x3mffrBONVD5nIIWDPwp38C P/ZvsrCdddN0WdKWldSL2b15YPsGo8MNnm6bkGzj7kjhx4HHV9slJ4yHO97fBeODamOK iQlWy659YiIHem42e6Mttzt4YifOcpPTbm79RNza/PlsP1F+Liym5HyxVzoGlQCi2C8K 3eHw== X-Gm-Message-State: APjAAAXUbJBeEDBrAjcYW5Qo4UJHKcUH0CafK32ET7G9/hwEsHBSZ44Q JlzgAH+Bb7LD++c94Yus4aUEQG8XGzg= X-Google-Smtp-Source: APXvYqyi5autbRLI0bisEIAAMTB7lGZ0Ehx3IH7mAJy07QUvkvzNGq38xApmN36IjqwJYjKEkKqbVA== X-Received: by 2002:a05:620a:210d:: with SMTP id l13mr13047202qkl.51.1575933351452; Mon, 09 Dec 2019 15:15:51 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 9 Dec 2019 20:15:10 -0300 Message-Id: <20191209231531.2423222-6-danielhb413@gmail.com> In-Reply-To: <20191209231531.2423222-1-danielhb413@gmail.com> References: <20191209231531.2423222-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: MQ964bPAOF-V7jOgJAPS9w-1 X-MC-Unique: 7GuVHR87N6S5B-fIK-ok4w-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xB9NFsXm008316 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , crobinso@redhat.com Subject: [libvirt] [PATCH v1 05/26] qemu_command.c: move I/O APIC validation to qemu_domain.c 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.16 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Validation of MACHINE_KERNEL_IRQCHIP and MACHINE_KERNEL_IRQCHIP_SPLIT QEMU caps are now being done in qemuDomainDefValidateFeatures(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 12 ------------ src/qemu/qemu_domain.c | 42 ++++++++++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 25886bf49a..37339d6f0d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7186,20 +7186,8 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, } =20 if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] !=3D VIR_DOMAIN_IOAPIC_NO= NE) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("I/O APIC tuning is not supported by this " - "QEMU binary")); - return -1; - } switch ((virDomainIOAPIC) def->features[VIR_DOMAIN_FEATURE_IOAPIC]= ) { case VIR_DOMAIN_IOAPIC_QEMU: - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP= _SPLIT)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("split I/O APIC is not supported by this " - "QEMU binary")); - return -1; - } virBufferAddLit(&buf, ",kernel_irqchip=3Dsplit"); break; case VIR_DOMAIN_IOAPIC_KVM: diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 8eb0905f22..b77b3cf845 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4931,15 +4931,39 @@ qemuDomainDefValidateFeatures(const virDomainDef *d= ef, =20 switch ((virDomainFeature) i) { case VIR_DOMAIN_FEATURE_IOAPIC: - if (def->features[i] !=3D VIR_DOMAIN_IOAPIC_NONE && - !ARCH_IS_X86(def->os.arch)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%s' feature is not supported for " - "architecture '%s' or machine type '%s'"), - featureName, - virArchToString(def->os.arch), - def->os.machine); - return -1; + if (def->features[i] !=3D VIR_DOMAIN_IOAPIC_NONE) { + if (!ARCH_IS_X86(def->os.arch)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("The '%s' feature is not supported fo= r " + "architecture '%s' or machine type '%= s'"), + featureName, + virArchToString(def->os.arch), + def->os.machine); + return -1; + } + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQ= CHIP)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("I/O APIC tuning is not supported by " + "this QEMU binary")); + return -1; + } + + switch ((virDomainIOAPIC) def->features[i]) { + case VIR_DOMAIN_IOAPIC_QEMU: + if (!virQEMUCapsGet(qemuCaps, + QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_S= PLIT)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("split I/O APIC is not supported = by this " + "QEMU binary")); + return -1; + } + break; + case VIR_DOMAIN_IOAPIC_KVM: + case VIR_DOMAIN_IOAPIC_NONE: + case VIR_DOMAIN_IOAPIC_LAST: + break; + } } break; =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list