From nobody Thu Sep 19 02:10:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549271096844345.8535138285729; Mon, 4 Feb 2019 01:04:56 -0800 (PST) Received: from localhost ([127.0.0.1]:38918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqaBO-0002LG-Qz for importer@patchew.org; Mon, 04 Feb 2019 04:04:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqa8f-0000bH-UN for qemu-devel@nongnu.org; Mon, 04 Feb 2019 04:02:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqa8e-0007dA-9T for qemu-devel@nongnu.org; Mon, 04 Feb 2019 04:02:01 -0500 Received: from ozlabs.org ([203.11.71.1]:43963) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqa8d-0007FS-SG; Mon, 04 Feb 2019 04:02:00 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 43tMC74jzzz9sN1; Mon, 4 Feb 2019 20:01:37 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1549270899; bh=41EF82bEmlit8FVUCyXobycWbL7ZdLsEuMOP8ZG0690=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jh2YolkQSBp+JYkmTDYLFjStD1R00XM8/4mjF7qe34Z0mIUwmOMjL53oB1ZzHJBdl aryBM9Slkchx5+ZJ3SgNzGh3KzvHwq3FSBsf9gNllN/RzMxfltiL3YGy6ERaO34tJp J4GqcPhWj36dgxors5UfR7LzDvkSwm8D9+P1Nbkg= From: David Gibson To: peter.maydell@linaro.org Date: Mon, 4 Feb 2019 20:01:00 +1100 Message-Id: <20190204090124.26191-14-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190204090124.26191-1-david@gibson.dropbear.id.au> References: <20190204090124.26191-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 13/37] spapr: Forbid setting ic-mode for old machine types X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-devel@nongnu.org, groug@kaod.org, spopovyc@redhat.com, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Greg Kurz Machine types 3.0 and older only know about the legacy XICS backend. Make it clear by erroring out if the user tries to set ic-mode on such machines. Signed-off-by: Greg Kurz Tested-by: C=C3=A9dric Le Goater Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: David Gibson --- hw/ppc/spapr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 71fe552c83..a217c7f7a6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3127,6 +3127,11 @@ static void spapr_set_ic_mode(Object *obj, const cha= r *value, Error **errp) { sPAPRMachineState *spapr =3D SPAPR_MACHINE(obj); =20 + if (SPAPR_MACHINE_GET_CLASS(spapr)->legacy_irq_allocation) { + error_setg(errp, "This machine only uses the legacy XICS backend, = don't pass ic-mode"); + return; + } + /* The legacy IRQ backend can not be set */ if (strcmp(value, "xics") =3D=3D 0) { spapr->irq =3D &spapr_irq_xics; --=20 2.20.1