From nobody Mon Feb 9 16:19:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1603352573; cv=none; d=zohomail.com; s=zohoarc; b=OVydruZ3OaCbc+H0NUAVB0+b2uDp426ioiBER2ELL8U4Yi07w/M3WuR2d9MFlIJN/d9HCGPvpwqRfKlXcnhyK0i7OmdHbG+mfrTLDsQZ15sRgtbGVp9wvu4YymSnvS5oxRwVUDjsxhLATWOnAb3+8Hi31DKFvj/Gy2zUuIKg428= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603352573; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xSsu2Z5Xpwi6tRqum0tsNqNsbAp7L8TAp9ugr1gvsVI=; b=PxNBN2VayV+GLJiApyrpPUeKvg4LTKjeAod/uM8mgd0+4EK2feYDsgRRn3p8H6rkjZZAKl594FPufQIUWD++4vOsFHzE6u5Nw49fDYav7PQg9uuIByErUezidlZGQ7ia7M0XdFXvEbBRqmbQ6YHUlfrVPx7+MvuPcQF9p0XDCLw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603352573438331.5534779580569; Thu, 22 Oct 2020 00:42:53 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.10201.27070 (Exim 4.92) (envelope-from ) id 1kVVF6-0006W2-Hl; Thu, 22 Oct 2020 07:42:36 +0000 Received: by outflank-mailman (output) from mailman id 10201.27070; Thu, 22 Oct 2020 07:42:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kVVF6-0006Vq-E5; Thu, 22 Oct 2020 07:42:36 +0000 Received: by outflank-mailman (input) for mailman id 10201; Thu, 22 Oct 2020 07:42:34 +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 1kVVF4-0006JP-Ry for xen-devel@lists.xenproject.org; Thu, 22 Oct 2020 07:42:34 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id c3ad582b-766e-4735-9d13-9a084aa73deb; Thu, 22 Oct 2020 07:42:27 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3E5C2B1A3; Thu, 22 Oct 2020 07:42:26 +0000 (UTC) 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 1kVVF4-0006JP-Ry for xen-devel@lists.xenproject.org; Thu, 22 Oct 2020 07:42:34 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id c3ad582b-766e-4735-9d13-9a084aa73deb; Thu, 22 Oct 2020 07:42:27 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3E5C2B1A3; Thu, 22 Oct 2020 07:42:26 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c3ad582b-766e-4735-9d13-9a084aa73deb X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1603352546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xSsu2Z5Xpwi6tRqum0tsNqNsbAp7L8TAp9ugr1gvsVI=; b=atQVgRElJPObBm4D7xYVyo/SuLwtBvhCQM9dSvPAK4KyHUJGtLTLR/ibBuL5cHA1w1q9BD TsaPzGWVrDRKrB/bssKNhDFnxlZJ5vs6T7Z0NsBy06HFiVay+eoJpwM7REhV/VPwOYQbl7 rhiGlLE8UurIByn89SWD+6pLMzqgBUk= From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Jan Beulich Subject: [PATCH 4/5] xen/events: unmask a fifo event channel only if it was masked Date: Thu, 22 Oct 2020 09:42:13 +0200 Message-Id: <20201022074214.21693-5-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201022074214.21693-1-jgross@suse.com> References: <20201022074214.21693-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" Unmasking an event channel with fifo events channels being used can require a hypercall to be made, so try to avoid that by checking whether the event channel was really masked. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross --- drivers/xen/events/events_fifo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/xen/events/events_fifo.c b/drivers/xen/events/events_f= ifo.c index 243e7b6d7b96..f60c5a9ec833 100644 --- a/drivers/xen/events/events_fifo.c +++ b/drivers/xen/events/events_fifo.c @@ -236,6 +236,9 @@ static bool clear_masked_cond(volatile event_word_t *wo= rd) =20 w =3D *word; =20 + if (!(w & (1 << EVTCHN_FIFO_MASKED))) + return true; + do { if (w & (1 << EVTCHN_FIFO_PENDING)) return false; --=20 2.26.2