Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7641875ybi; Thu, 1 Aug 2019 11:18:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQEqIK1tBYg+PvHIh7wfuzFLwn6QDvVepwhBLdEqlpmeJOjFS7mTSFZ4c2xQDjSVz3/hbQ X-Received: by 2002:aa7:8202:: with SMTP id k2mr56015347pfi.31.1564683521277; Thu, 01 Aug 2019 11:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564683521; cv=none; d=google.com; s=arc-20160816; b=wFNAL4G6dgxkEtj0QotmWArXDnvl21LACzV3Iad9/Gqt+dJfKYaeDsvJn4n28rGc3X EkGmt5K0mYdt2JwyRITeG30A8RzBrwZOyaBL0RfSgmt2xoE0C+qTRfCXXPuQ1FOxFirM Ixo9NpLdG00IJJGN7RMzJOaCN8XcYq+eCOpOYTJdW13gJV4tztrGk/GnL+uizttv32Kc 6KHfxZqDQuboRLPUCitpLEIFTnZm2gWwQ8d7KHaxeghZR+NGWwqfJ4JrYoitXXdS+4wj G4Xjs3o/Z/MOUovQfjnMmdFF3bsmcRivuBKbgZdVIw/ZPRGEPDumzQ9PXs8qrTWQRmU5 3YpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=S5pAcAWsPPL0MV2KKFJY33gKzjahDxo4hJJq/wxTMVc=; b=D6QRsxrJt322Lt0ez2qF8wjV/QQoOtzUkbI8Ds7iukvR03rtA/mumUfnyeEY8qvbQr 8+9rmeiS83UQeIFHdNV0kCnCJ3Dc/7iF7/ovHcoK+W7JdM/qiRxTZok+ERRlraeDdzTx tDbOupHo44HhasiXg5/WnxqxpNp6Xu5X/skm/MoRw1lRuFnJAPzN3e4sM6d1/AvoB4Kv 0q4BwyAgkodoLk6Cgm96dF/F5o2+XvK6YuANdYArab/6PSA2eDklcEy4vg1u4ys28/YF TZOaaaDBmP83u4rbAFqxP0Bl8aYuQpOvuh8DpH5wpTk4YXwdtLPwgdWRSVdS78IL9lkP 5MQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=VlByBvhv; 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 188si36369004pfv.146.2019.08.01.11.18.25; Thu, 01 Aug 2019 11:18:41 -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=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=VlByBvhv; 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 S1733253AbfHARLa (ORCPT + 99 others); Thu, 1 Aug 2019 13:11:30 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37350 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbfHARLa (ORCPT ); Thu, 1 Aug 2019 13:11:30 -0400 Received: by mail-pf1-f193.google.com with SMTP id 19so34431251pfa.4 for ; Thu, 01 Aug 2019 10:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=S5pAcAWsPPL0MV2KKFJY33gKzjahDxo4hJJq/wxTMVc=; b=VlByBvhvRL+XmaFAU3VB8OborKi+m09XsvzhG9WU/pWtCUbQQ+E5NH79qqWsZa00LZ jJ4RJmrvEmR7zeeOgNkLeNf89Gt4rmY0tRsf6KccJxr98X/AqTQQo1vlpeoMtphmSGnm NK1ZKbZH+c8wowIfHC6do4T6UHziLYOJxIHNfTAwiYnxBVhBziQbkAL24FMnFp1R8MP1 KmcRY3F2+2C8iZBkCXD6A8J/RQ8CEUdesFlMRC9BP4rL1x/XU/xmBK/JL8irNrAhSspO PSQ/0rzQj6VCfUWIZg1/DpoDJ7lV3NjnflJOyfWShiGixzr1Wy5TaQZbJHel9xjdroVx gcFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=S5pAcAWsPPL0MV2KKFJY33gKzjahDxo4hJJq/wxTMVc=; b=c2tsNaolKBDJY3PLSXIDLnX3iHCoUusxFMDKzYb40BjVbFgKdImMcvmgsepLNXe1fX 4VgEk43KSRLYji1u8DBeUsoUe+wEMT006xwXG6am2Zeki/F1CMX51U630D3LWQLMWp4s uaVoibrpK3KrlBh8crCHJ0IoTrU1BDmvSoQ5+3hbDxNYPLU9LtK/tT/xFoSU+nGSDKxL pkZyRzB6E+F9LKfA6z26cPVh31YQHIe7t6sRS4TMUSTC2REwOlyyU5sIVYCnzwe/7sR/ ZWFLww9/jA/o5XqJ/f+E9hZ5ijMO3AqZNqYx7r47IYpdG02dl5MiTmdHWnBs9FW8joWy cVeA== X-Gm-Message-State: APjAAAWMuVTjRxvK3xLuGEEo+Ql573RaQi+kD80h5wEJMHmbCnISSAGu OoY812toX+vb09nCfG8VgT1mlA== X-Received: by 2002:a63:d315:: with SMTP id b21mr97212834pgg.326.1564679489621; Thu, 01 Aug 2019 10:11:29 -0700 (PDT) Received: from ?IPv6:2600:1010:b05c:1777:5b8:a455:199a:e2a8? ([2600:1010:b05c:1777:5b8:a455:199a:e2a8]) by smtp.gmail.com with ESMTPSA id r27sm79185309pgn.25.2019.08.01.10.11.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 10:11:28 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [patch 1/5] tracehook: Provide TIF_NOTIFY_RESUME handling for KVM Date: Thu, 1 Aug 2019 10:02:38 -0700 Message-Id: <05C28F0C-5D8C-4A77-8D1B-FAC91DCF1115@amacapital.net> References: <20190801143250.370326052@linutronix.de> <20190801143657.785902257@linutronix.de> <20190801144814.GC31398@hirez.programming.kicks-ass.net> Cc: Thomas Gleixner , 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" In-Reply-To: <20190801144814.GC31398@hirez.programming.kicks-ass.net> To: Peter Zijlstra X-Mailer: iPhone Mail (16F203) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Aug 1, 2019, at 7:48 AM, Peter Zijlstra wrote: > >> 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? Me too. Also, why is a loop needed? > >> +} >> +EXPORT_SYMBOL_GPL(tracehook_handle_notify_resume); >> +#endif >> >>