Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7471697ybi; Thu, 1 Aug 2019 08:40:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8hwW2u8AU1Qeitx3xrtnKnVix9i1gbJ+Zg6y1NI4VsBkSZScCSeSH7MB8SIwVEgl0j/3Y X-Received: by 2002:a63:e44b:: with SMTP id i11mr71326216pgk.297.1564674033575; Thu, 01 Aug 2019 08:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564674033; cv=none; d=google.com; s=arc-20160816; b=yxuvWF2VvHuawJ9ruhMOaeVFVnkjBFXW4ZM0ovuqBYJesfF3JmlPDvvQNwE1lqZglm OW89SZKZXyojDFh9mRsxRSLXpOFRcfQ2pengG/P9uGaBPS51MqK/gKuPlNjrZ0fJw0QA lBJN5XeOgTlcD6sOVVikHp4UzNjFl3ZMlE1tKzcDmcENLy0RHWh0eXA7umFWA0ExOqEp antpqiO0xBklP3+EgeJwajfj9ympwEOUnHEnp1Sjzs1nufihWG8dodfF1fNv1NWmUUrU MJMd5eMUN33kfvYXp9mVBFdWwb6WctyC21uUDcQD4LXAF9NoL/AMdC0CHmuy7X7eT/8+ kHhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FVxP2v3HSjN6nIrTmQY1MmXZ4a26DwBVy18A1yxDdt8=; b=A00X3hCoFuBMEESxmiR/Sx9VREy3ADSegdGna3VIHVhyvACC/kJoVstiq2pfFgekK0 WJrDo6+vZen/VrxHEE9LAwCu4YIlylakyXhTGmJdTLAeOylRmHdedTDXOGidDsHnYf1T Rjqu/3yvoXuGgZuDfZvlMpzwoZISdPxvTV14SUrSzMPNgI6G/GVaQAdmcRBS6XlS4boW oipKnCgjAuij1a+2I3qQBaz37LSWhPtSS8P164++kvKGue6deJDZXzgFPJtyAzZ/7whG /pkb0Nb1Jsl+BUIQbXABqlPDfZs5fDzBJ4YpTh80rfqM0ag0GjjQUhTd1I3zgQZ6pyJz vd9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=P0Rj7mqb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si36020397pgc.144.2019.08.01.08.40.17; Thu, 01 Aug 2019 08:40:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=P0Rj7mqb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732262AbfHAOs0 (ORCPT + 99 others); Thu, 1 Aug 2019 10:48:26 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46366 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbfHAOsZ (ORCPT ); Thu, 1 Aug 2019 10:48:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FVxP2v3HSjN6nIrTmQY1MmXZ4a26DwBVy18A1yxDdt8=; b=P0Rj7mqbyuYvFdd0q6pQeHYl0 q747aTpMZ22E6YzbbPJ1dmW36LDqN0j9PraHO7LjbYSTsA2KNDYf96eCftrUt0mlj+io53lKQaBk1 kSElFmfkZeVkryaw+R9OgRCBiglpNmIe1kFBb4y+iu/irJaeUsQuieiGW5T+iPsoBhTodA0elX1+j Xu6KvKonSX05mIgmCSmRbP2cD2XvC2zgn1KTXUMnbUnIZrvUI52vsYuaQe6w98qcqTl1AeHU2pXPE hT0pCVt/kQJgmYTbObMwYStlAFf3+sTh+pS2DYtQJMRfhvoElh6TtVTp/OQYhu6Mf3Tn/TQc+3jSg Auk7R0f0w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1htCNM-0003HG-GM; Thu, 01 Aug 2019 14:48:16 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CDBFB2029F4C9; Thu, 1 Aug 2019 16:48:14 +0200 (CEST) Date: Thu, 1 Aug 2019 16:48:14 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , x86@kernel.org, Ingo Molnar , Sebastian Siewior , Anna-Maria Gleixner , Steven Rostedt , Julia Cartwright , Paul McKenney , Frederic Weisbecker , Oleg Nesterov , kvm@vger.kernel.org, Radim Krcmar , Paolo Bonzini , John Stultz , Andy Lutomirski , "Paul E. McKenney" Subject: Re: [patch 1/5] tracehook: Provide TIF_NOTIFY_RESUME handling for KVM Message-ID: <20190801144814.GC31398@hirez.programming.kicks-ass.net> References: <20190801143250.370326052@linutronix.de> <20190801143657.785902257@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190801143657.785902257@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 01, 2019 at 04:32:51PM +0200, Thomas Gleixner wrote: > +#ifdef CONFIG_HAVE_ARCH_TRACEHOOK > +/** > + * tracehook_handle_notify_resume - Notify resume handling for virt > + * > + * Called with interrupts and preemption enabled from VMENTER/EXIT. > + */ > +void tracehook_handle_notify_resume(void) > +{ > + local_irq_disable(); > + while (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { > + local_irq_enable(); > + tracehook_notify_resume(NULL); > + local_irq_disable(); > + } > + local_irq_enable(); I'm confused by the IRQ state swizzling here, what is it doing? > +} > +EXPORT_SYMBOL_GPL(tracehook_handle_notify_resume); > +#endif > >