From nobody Sun Feb 8 01:30:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1584654281; cv=none; d=zohomail.com; s=zohoarc; b=H5wXm9hQchwnF2FHjzZq17821YaI4fuO7olG3/R+hYS0ZYbaErHpDhT6YTpwxLd7d8cUhPfdMrxcyAbeCTOAqyijp8lVTFOPt3fA14S+aB1K3tt+bUPnVhONKjin+yvXFpYQ0lmmWDr5ReUQRRffjE6PphdA/RyWKZMVsUfA2k4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584654281; 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=8Hz9G1pKEBQtx9ozU5lC8fjVDOPN3zVJIT+pgFRUFU4=; b=ZA3yJG7tiL2BRInGN8wcNSToWGlkcZHB0rHR/G2TgO/DxTf8yF3ycYtPNH/BZpXE7xPyzh2Sd4KF1o2daEi0tm286oapVBjh7Tli05Dk7V46pymIIGwoPDiw58thTF3b9x3AP87M4frVsPc8tawD3ow+2PKdJBBMjJ55Nd8HTNg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584654281269215.491842967774; Thu, 19 Mar 2020 14:44:41 -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-246-2Yz4gThANXmvbnrIX1GFoQ-1; Thu, 19 Mar 2020 17:44:37 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E54E61005510; Thu, 19 Mar 2020 21:44:31 +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 452175D9CA; Thu, 19 Mar 2020 21:44:31 +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 E802118089C8; Thu, 19 Mar 2020 21:44:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02JLiN8e024889 for ; Thu, 19 Mar 2020 17:44:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 839FB1711C7; Thu, 19 Mar 2020 21:44:23 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7F7B11711C4 for ; Thu, 19 Mar 2020 21:44:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (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 EE797101A55D for ; Thu, 19 Mar 2020 21:44:22 +0000 (UTC) Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-6Uyd2H4pOFiBoYBhnCDcHw-1; Thu, 19 Mar 2020 17:44:20 -0400 Received: by mail-qk1-f196.google.com with SMTP id c145so4821947qke.12 for ; Thu, 19 Mar 2020 14:44:20 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:a54:94b:6faa:a6b0:6b1b]) by smtp.gmail.com with ESMTPSA id c12sm2316347qkg.30.2020.03.19.14.44.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 14:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584654279; 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=8Hz9G1pKEBQtx9ozU5lC8fjVDOPN3zVJIT+pgFRUFU4=; b=h3Nxg5KLpXyR6agJ14xocuKGKDMmxpl6VE5KCuPNrnWUV0Nx+K6BU8smvv6zUaMwaqWnZ9 m8r635EsVNTXBLpbR+hVzqMRI/hqFpgIKAsxM+Rr/91OwiRdtPjs/HJBYk2LrXKV/pCFNs Y9squwR0vAg+tI5Zbd4lFHXhw/MO4Wc= X-MC-Unique: 2Yz4gThANXmvbnrIX1GFoQ-1 X-MC-Unique: 6Uyd2H4pOFiBoYBhnCDcHw-1 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=AYzHBzBnQQ9r4RKJHSn/N46ZiVWNDM3fIUcRq5oARgU=; b=P//NBVT3CkfspIp3QLDhBNF5W5Uren/cJga6nTcWsMq2hJfOaNrdcVmOK74mGe1JZd 46K8AChjwSuIhvBLCzs0aUFx1NEejysr1LGGQfdSYDUmx+3UKmtDbQV8gMFgqkLTr6x+ uaETW0afjffd0L+pNc7aUTA5eciFOADqi5QS7RZeOJBTuBbVWmw9GR4/IwpA4a3mAY76 QBjXC/lkN0R16zeBt3nx71GBwwzlerwKuxymegl5gj+9vOjOQDDFaDuy4O5HzUPoUWFu IKgqlYZPLvnoWSn8Bz16R/I8XYFIrhFPbu/aUYIHmOVopIcKwdUCZBwVC6/8hhfEXIBA SHJg== X-Gm-Message-State: ANhLgQ1cofHjFw7QdbKq9y68crmFA+cy/tKvoCgsBwy+SM6k8z8NNN1/ qKNyR5V/NCGSw4b091TWeUOlKUzY X-Google-Smtp-Source: ADFU+vv9XVHCwRVj0M6R6umU883e8NnHiVjFmpFRNeDdroHTl/U579al73KroZ6vy3btiRhS/gshTw== X-Received: by 2002:ae9:e894:: with SMTP id a142mr5267672qkg.379.1584654259726; Thu, 19 Mar 2020 14:44:19 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 1/4] qemu_domain.c: do not launch ppc64 guests with APIC-EOI setting Date: Thu, 19 Mar 2020 18:44:04 -0300 Message-Id: <20200319214407.714006-2-danielhb413@gmail.com> In-Reply-To: <20200319214407.714006-1-danielhb413@gmail.com> References: <20200319214407.714006-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02JLiN8e024889 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza 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.14 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" The "" feature, although it's not available for pseries, can be declared in the domain XML of ppc64 guests without errors. But setting its 'eoi' attribute will break QEMU. For "": qemu-kvm: Expected key=3Dvalue format, found +kvm_pv_eoi A similar error happens with eoi=3D'off'. One can argue that it's better to simply forbid launching ppc64 guests with "" declared in the ppc64 XML - it is a feature that the architecture doesn't support and this would make it clearer about it. This is sensible, but there are ppc64 guests that are running with "" declared in the domain (and A LOT of guests running with "" for that matter, probably reminiscent of x86 templates that were reused for ppc64) that will stop working if we go this route. A more subtle approach is to detect if the 'eoi' element is being set for ppc64 guests, and warn the user about it with a better error message than the one QEMU provides. This is the new error message when any value is set for the 'eoi' element: error: unsupported configuration: The 'eoi' attribute of the 'apic' feature is not supported for architecture 'ppc64' or machine type 'pseries'. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index edc8ba2ddb..381b62b96a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5262,8 +5262,26 @@ qemuDomainDefValidateFeatures(const virDomainDef *de= f, } break; =20 - case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_APIC: + /* the declaration is harmless for ppc64, but + * its 'eoi' attribute isn't. To detect if 'eoi' was + * present in the XML we can check the tristate switch + * of def->apic_eoi */ + if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ABSENT && + def->apic_eoi !=3D VIR_TRISTATE_SWITCH_ABSENT && + ARCH_IS_PPC64(def->os.arch)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("The 'eoi' attribute of the '%s' feature " + "is not supported for architecture '%s' o= r " + "machine type '%s'"), + featureName, + virArchToString(def->os.arch), + def->os.machine); + return -1; + } + break; + + case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_VIRIDIAN: --=20 2.25.1