Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4251895pxk; Tue, 29 Sep 2020 20:04:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzutOOCh54RtuMIkkkC3hpqzR7yYf5PrN2FXm3kwBkFnE9RFC8G6YsVDN+kLXhWCiQIbVwY X-Received: by 2002:a50:ccd2:: with SMTP id b18mr511824edj.51.1601435057736; Tue, 29 Sep 2020 20:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601435057; cv=none; d=google.com; s=arc-20160816; b=kKOYQkC40zvEt55fgHNQFDW5z0xQA1dnKHym5oogKI7RuerxfiUC5lB68lk1bjmyoR +YZhan3+l0vTBRKf5IpymovSmaRgvjDiQOrY4prHc6ei1P0Zo3m3eYtdTZlCOVeR9By7 KHpeyjF28ugR9wX6OUL2aHXF9qMwmOuEBneQ0PhtIsaX9f2OqGp6wqBmz9n9mgQ7AFxQ Z5876xIxNZMoAdfjhc+EG8E6wmroqyw2eScuUwqwFl9gSjVDi35K3ymils+lBR+wpFC0 OGMc/mZ43Ftl+BcxSjXjUPaxAsCeGce237AA/2cLESScWKR/k5RwKq4aOYgGOAFfRpK8 nr/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=jyKPNl8Pj2kYQp3TfLaEbiVSSr6pzTgg5loSI5aNCk4=; b=TmopCBArUxheEqHffWZ6dXm+9EoOCY9WNMze3shu53HndXt5UjIMcbOuG6pxEOIee6 MP+4kDYa0bj46ALGK+GT8ed+F9PaSCd/ET4x74NMru7aFj56KGz/1r4iczN/6mQN00Vw Q1T7vDEQ4jnfB8vkOHkvV0brXXE1nPm7w/MI3EQNQeCL9GSdhM7NWdLrl8hFjY4SNUwJ 3TQzZPMycFrplLEFqXeC0lv6Bf/cK9tVCZuR3LmJlXoHPDJ9V6UZY5RMMCDCDQJTxmcT TfjIAK2k8kX4dB33P+jkHhlCBzYkH58jznVXhE7RVwRJhKpPM71gsmtfGt9YiFTna+a6 TbPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si152441edw.38.2020.09.29.20.03.54; Tue, 29 Sep 2020 20:04:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729803AbgI3DCw (ORCPT + 99 others); Tue, 29 Sep 2020 23:02:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:25839 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729708AbgI3DCw (ORCPT ); Tue, 29 Sep 2020 23:02:52 -0400 IronPort-SDR: DkC8aMrSLFWiMTVugdWdPhFZZe2Zda7tVRE+sd/2K4xGk05Jzkl38ENVmUIVcgTS1TpQ/34KoT ku9DWplCrhiA== X-IronPort-AV: E=McAfee;i="6000,8403,9759"; a="150001893" X-IronPort-AV: E=Sophos;i="5.77,320,1596524400"; d="scan'208";a="150001893" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 20:02:50 -0700 IronPort-SDR: j0zYFtiI3CcvCNpGs+13Wz3yrYJ8yxSd5nN6Gc6o10LCLnsJUUEFnwJ4hqgDOKzrRYnJ5Fvenf BHMCuz9WFiKg== X-IronPort-AV: E=Sophos;i="5.77,320,1596524400"; d="scan'208";a="495006793" Received: from shuo-intel.sh.intel.com (HELO localhost) ([10.239.154.30]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 20:02:46 -0700 Date: Wed, 30 Sep 2020 11:02:44 +0800 From: Shuo A Liu To: Borislav Petkov Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Greg Kroah-Hartman , "H . Peter Anvin" , Ingo Molnar , Sean Christopherson , Yu Wang , Reinette Chatre , Yakui Zhao , Zhi Wang , Dave Hansen , Dan Williams , Fengwei Yin , Zhenyu Wang Subject: Re: [PATCH v4 02/17] x86/acrn: Introduce acrn_{setup, remove}_intr_handler() Message-ID: <20200930030244.GI1057@shuo-intel.sh.intel.com> References: <20200922114311.38804-1-shuo.a.liu@intel.com> <20200922114311.38804-3-shuo.a.liu@intel.com> <20200929175947.GL21110@zn.tnic> <873630jqiy.fsf@nanos.tec.linutronix.de> <20200929202604.GP21110@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200929202604.GP21110@zn.tnic> User-Agent: Mutt/1.8.3 (2017-05-23) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, On Tue 29.Sep'20 at 22:26:54 +0200, Borislav Petkov wrote: >On Tue, Sep 29, 2020 at 10:07:17PM +0200, Thomas Gleixner wrote: >> That does not prevent that either and notifiers suck. > >Bah, atomic notifiers run functions which cannot block, not what is >needed here, right. > >> The pointer is fine and if something removes the handler before all of >> the muck is shutdown then the author can keep the pieces and mop up >> the remains. > >Uhu, so what makes sure that the module is not removed while an IRQ is >happening? The precondition of the removing of the module is that there is no User VM living (every opening of the dev file will hold a ref count of the module). The interrupt only can occur with active User VMs. So if a notification interrupt is happending, the module cannot be removed as there is still User VM living. Thanks shuo