From nobody Fri Apr 26 21:59:47 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1550502124825190.10403707493208; Mon, 18 Feb 2019 07:02:04 -0800 (PST) Received: from localhost ([127.0.0.1]:60050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvkQi-0005fM-Pm for importer@patchew.org; Mon, 18 Feb 2019 10:02:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvjxN-00063M-A7 for qemu-devel@nongnu.org; Mon, 18 Feb 2019 09:31:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvjxE-0002ra-S1 for qemu-devel@nongnu.org; Mon, 18 Feb 2019 09:31:36 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:42255) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gvjx7-0002eu-LS; Mon, 18 Feb 2019 09:31:28 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 4435rj3bFrz9sQs; Tue, 19 Feb 2019 01:31:00 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1550500261; bh=zZFbNM9DOFLJvET8vnmInuTbysc06i0ByXomhnqsAI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LKfU8voIHRtUmfhYH7b+y0MQIDCoPnO6DvB+ip9S1BlDV0T9VAEDriY7CR832WP3t wapJ4X88oEmKlmUv5Ri6QVm6yByB60T/O2CuS05S+4ciedUdIGQ0eIYwFgLslhInAx XorZ6PYUjy3H6qCVRWm0eTjxq6cQxM0H/3ujP62Y= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 19 Feb 2019 01:30:22 +1100 Message-Id: <20190218143049.17142-17-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218143049.17142-1-david@gibson.dropbear.id.au> References: <20190218143049.17142-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 16/43] spapr/irq: remove the XICS offset adjustment 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: clg@kaod.org, David Gibson , qemu-ppc@nongnu.org, groug@kaod.org, qemu-devel@nongnu.org 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: C=C3=A9dric Le Goater Now that we have changed the XICS and the XIVE interrupt backend to have different size for their IRQ number space, we do not need to align their source numbers anymore. Remove the offset adjustment and wire the dual 'qirq' handler to the 'qirq' handler of the current interrupt mode in use. Signed-off-by: C=C3=A9dric Le Goater Message-Id: <20190213210756.27032-3-clg@kaod.org> Signed-off-by: David Gibson --- hw/ppc/spapr_irq.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index da52a46e80..48d6b2daed 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -453,17 +453,6 @@ static void spapr_irq_init_dual(sPAPRMachineState *spa= pr, int nr_irqs, return; } =20 - /* - * Align the XICS and the XIVE IRQ number space under QEMU. - * - * However, the XICS KVM device still considers that the IRQ - * numbers should start at XICS_IRQ_BASE (0x1000). Either we - * should introduce a KVM device ioctl to set the offset or ignore - * the lower 4K numbers when using the get/set ioctl of the XICS - * KVM device. The second option seems the least intrusive. - */ - spapr->ics->offset =3D 0; - spapr_irq_xive.init(spapr, spapr_irq_xive.nr_irqs, &local_err); if (local_err) { error_propagate(errp, local_err); @@ -500,21 +489,7 @@ static void spapr_irq_free_dual(sPAPRMachineState *spa= pr, int irq, int num) =20 static qemu_irq spapr_qirq_dual(sPAPRMachineState *spapr, int irq) { - sPAPRXive *xive =3D spapr->xive; - ICSState *ics =3D spapr->ics; - - if (irq >=3D spapr->irq->nr_irqs) { - return NULL; - } - - /* - * The IRQ number should have been claimed under both interrupt - * controllers. - */ - assert(!ICS_IRQ_FREE(ics, irq - ics->offset)); - assert(xive_eas_is_valid(&xive->eat[irq])); - - return spapr->qirqs[irq]; + return spapr_irq_current(spapr)->qirq(spapr, irq); } =20 static void spapr_irq_print_info_dual(sPAPRMachineState *spapr, Monitor *m= on) --=20 2.20.1