Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68DBFC433E1 for ; Thu, 20 Aug 2020 16:34:12 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 376E92054F for ; Thu, 20 Aug 2020 16:34:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="DN58R2LR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 376E92054F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k8nVh-0004pi-38; Thu, 20 Aug 2020 16:33:53 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k8nVf-0004pd-VL for xen-devel@lists.xenproject.org; Thu, 20 Aug 2020 16:33:51 +0000 X-Inumbo-ID: c9da658c-86d7-421e-a3f3-140f28e4df5d Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id c9da658c-86d7-421e-a3f3-140f28e4df5d; Thu, 20 Aug 2020 16:33:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1597941231; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=c+A+sm925m170y3AZR+V3Zlr8nGEk0PENvCXbHZyrBM=; b=DN58R2LRkmfslN3WEotpvPKCKZk08W6crA/8WO2T+uRV8MuU6NtUVeL/ kAegMnK75Sip5zJoJChWp3xlBtBwDfA3xDSzby4ALHMf2zztY6NR76utN 5lsWP3v3jAwyLhm0FJ6RbaEVi9j4eV2tlZru5nA4+bHaWaG9WOg/OOOKb E=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 2iBLv8LY7tOcI99mHVNIrFjliobHunU37dZY699zGtMqnSgFsGZLRAk+f1hvPlwBfAUvL6wHeo tUupAJDgxhu+aHqUFAbXPi0ewuo1JJ7uaash90jJu2IjadUV3FbYLmNpxz+jZVExN2EXbnbWI/ IkN/JWmQzR2ubXoov4bwPcQ5Oa7SqT7fMBZUeDqzvJf4lNGHeuPtbpJMZHl9H/XPwd92S+n9zM 04ZgedIfiBiJfW5WtI4q4jKUE5JpusdJaFOW8Z7PUO2TusMR5XXzrBEM9J+F6cqMzXT4yLMasr 71E= X-SBRS: 2.7 X-MesageID: 24952376 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.76,333,1592884800"; d="scan'208";a="24952376" Date: Thu, 20 Aug 2020 18:33:43 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Andrew Cooper CC: , Jan Beulich , Wei Liu Subject: Re: [PATCH 2/2] x86/vpic: also execute dpci callback for non-specific EOI Message-ID: <20200820163343.GW828@Air-de-Roger> References: <20200820153442.28305-1-roger.pau@citrix.com> <20200820153442.28305-3-roger.pau@citrix.com> <625060e6-bdd0-c72c-c7fc-9a31588511b3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <625060e6-bdd0-c72c-c7fc-9a31588511b3@citrix.com> X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Thu, Aug 20, 2020 at 05:28:21PM +0100, Andrew Cooper wrote: > On 20/08/2020 16:34, Roger Pau Monne wrote: > > Currently the dpci EOI callback is only executed for specific EOIs. > > This is wrong as non-specific EOIs will also clear the ISR bit and > > thus end the interrupt. Re-arrange the code a bit so that the common > > EOI handling path can be shared between all EOI modes. > > > > Signed-off-by: Roger Pau Monné > > --- > > xen/arch/x86/hvm/vpic.c | 10 +++++----- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c > > index feb1db2ee3..3cf12581e9 100644 > > --- a/xen/arch/x86/hvm/vpic.c > > +++ b/xen/arch/x86/hvm/vpic.c > > @@ -249,15 +249,15 @@ static void vpic_ioport_write( > > if ( priority == VPIC_PRIO_NONE ) > > break; > > pin = (priority + vpic->priority_add) & 7; > > - vpic->isr &= ~(1 << pin); > > - if ( cmd == 5 ) > > - vpic->priority_add = (pin + 1) & 7; > > - break; > > + goto common_eoi; > > + > > case 3: /* Specific EOI */ > > case 7: /* Specific EOI & Rotate */ > > pin = val & 7; > > You'll need a /* Fallthrough */ here to keep various things happy. > > Otherwise, Acked-by: Andrew Cooper > > Can fix on commit if you're happy. Sure, I was borderline to add it but somehow assumed that /* Fallthrough */ was required for cases but not labels. Thanks, Roger.