Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756664AbcKWQOy (ORCPT ); Wed, 23 Nov 2016 11:14:54 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:38748 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756636AbcKWQOw (ORCPT ); Wed, 23 Nov 2016 11:14:52 -0500 Subject: Re: [PATCH KERNEL] xen/events: use xen_vcpu_id mapping for EVTCHNOP_status To: Vitaly Kuznetsov , xen-devel@lists.xenproject.org References: <1479904725-12812-1-git-send-email-vkuznets@redhat.com> Cc: linux-kernel@vger.kernel.org, Juergen Gross , David Vrabel From: Boris Ostrovsky Message-ID: <79cefa82-e3ff-3b0a-89fd-562eb46afee2@oracle.com> Date: Wed, 23 Nov 2016 11:17:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1479904725-12812-1-git-send-email-vkuznets@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 967 Lines: 27 On 11/23/2016 07:38 AM, Vitaly Kuznetsov wrote: > EVTCHNOP_status hypercall returns Xen's idea of vcpu id so we need to > compare it against xen_vcpu_id mapping, not the Linux cpu id. > > Suggested-by: Radim Krcmar > Signed-off-by: Vitaly Kuznetsov Reviewed-by: Boris Ostrovsky > --- > drivers/xen/events/events_base.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c > index 9ecfcdc..137bd0e 100644 > --- a/drivers/xen/events/events_base.c > +++ b/drivers/xen/events/events_base.c > @@ -948,7 +948,7 @@ static int find_virq(unsigned int virq, unsigned int cpu) > continue; > if (status.status != EVTCHNSTAT_virq) > continue; > - if (status.u.virq == virq && status.vcpu == cpu) { > + if (status.u.virq == virq && status.vcpu == xen_vcpu_nr(cpu)) { > rc = port; > break; > }