Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5303929ybx; Sun, 10 Nov 2019 10:35:41 -0800 (PST) X-Google-Smtp-Source: APXvYqwLN1PR2g9M5eGsZM8ESs/o0Yz7LHAgGTnW5z8e3WeWUqmRiKw8sQ5G2ooE8KeoBujq6jlw X-Received: by 2002:a17:906:d0d2:: with SMTP id bq18mr2219744ejb.217.1573410941457; Sun, 10 Nov 2019 10:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573410941; cv=none; d=google.com; s=arc-20160816; b=LOqI1dG2vJ2SIdFnEsDy3Z9S22NXgb6Z50earKEzywAx56R7fNGi0ZMpqAWqZArrro b/8JTjmHaLNZk6LVsZjLHsEPzKJroKEATykrWxOGjbGJbskKx4GHUaMHE8Tg2un14jrn j7niXFPoGWdERkE6XF8MdITHiMXvZRsu+z3VD+XZEjrKa5cvh0Kjtao2LgyfLqDAkdPY Ub69DvpBhrmarQiQEx51/mjFT3X771TOknEQ4OrLg7HTHfyapGfP3e+HeGQijpi10z9j kyhYC5AxW7RTnbw2/cklIWp0HMBewLHOdk57Fs3irD6IRBKDs5QMicu5uEDnKheD6OD7 F1Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SGPvkCQhS8lOGjJsjyLIOzETx5n0C33gWGyQBfpGz08=; b=WUauSX5LKQo0FYwi6bzEva+xn6ck48PcM4Cp7a4c9aBN0VMWI85SMBiGjBxr4qCmh+ UVV6kdiXlvNVR1bq4b+GMN5+BixgIGU2q7BOXI/QSTs1/UR8+5yMClY/wzso5SSJtzpe ibk3IEMX9y20+Do1FnEjyJzRssqcDTsCCQizuukTW7BmJEfN1OhXB2qs1Dy+L/PagnM7 JxPC4LZ52WJEyXunyCG6wuoP25n9bPVczPfSSexVFTRDH1Q5o+0enxGHrSrBR7AuGT4W XFvNBPjYQyO1iATPhqB+/Z5mL3yPqhEg4SNg6fSREAOtM6nMNzhc+Wa5RAIEBpDfKm2+ oQ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EuRtfDui; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si2443865ejb.380.2019.11.10.10.35.18; Sun, 10 Nov 2019 10:35:41 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=EuRtfDui; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726958AbfKJSYe (ORCPT + 99 others); Sun, 10 Nov 2019 13:24:34 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:41252 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726800AbfKJSYd (ORCPT ); Sun, 10 Nov 2019 13:24:33 -0500 Received: by mail-io1-f65.google.com with SMTP id r144so11859136iod.8 for ; Sun, 10 Nov 2019 10:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SGPvkCQhS8lOGjJsjyLIOzETx5n0C33gWGyQBfpGz08=; b=EuRtfDui/jVwc7I7G2EAEIoN7CusJdRjXcOpzduQ1FCCd/wL4Oymv8SmWjUDLcJiJH XJ1k46LoLnQS8qLJ0rKKwFj9tQF5XncAcJFYalytPsokgB73l61dymH9ObiimWRgRALx /e4oe4PRzYLuM+duiVlB4IHgKYpypi1byIzNTSoe4skgCzcTo6yrayCURZUjLdX3tBxX eF55HKBhql/aCdebLp8rEskuX2uAB0vnXgGfPDMiZdxza1FmkMQBkNEXzmV7IbWHsgIG v1lE4Kaic2fjve2LS9kPgI04vEbB0LzPw8cCD9E2aEtylU+L+pME+mHNcGDIPXoomHuC dtYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SGPvkCQhS8lOGjJsjyLIOzETx5n0C33gWGyQBfpGz08=; b=ccYp9UIsk7jZ3YYDFw5flnV8ZvMnxwbsR20XloI2mPTL1zpApD4GlRZkQIQD7yI3su Ztc/L4xBfuvzRlybKNFIHb075VjZcOPqSo0YlmGer5kFqtkSZPuPorhxfAq/CHwNStj5 ER+M3ewVOhU1+SbBiEetaPifsLR2OoDhD5dkSy64BQoDrcgYrSOqvgLf8aXmQV5g9ac9 N12S/Vkid33jthqTRgy+93JjxOSk2MqUVikj7CDxJ1DtIujiwkqbBDNjihQAvbYrhSeN dsRsETom/t8AgGnZPwFtAMw6vkRCGJyPnQVl813mjucZqf4Gvhq4mD12J7C42gtj4liH L0rQ== X-Gm-Message-State: APjAAAXxsEzqBaObxlR2p4TC1FXQbaE16EYjH57Qm+qsP5relVTZeRZd kPXQYqWhHvBzTc7FtQ6TZehgY5lE91gaWQt+ViA= X-Received: by 2002:a6b:3c04:: with SMTP id k4mr12754617iob.110.1573410271227; Sun, 10 Nov 2019 10:24:31 -0800 (PST) MIME-Version: 1.0 References: <20191107205914.10611-1-deepa.kernel@gmail.com> <1672a5861c82c2e3c0c54b5311fd413a8eee5e64.camel@infradead.org> <8D8B600C3EC1B64FAD4503F0B66C61F23BB95B@SHSMSX103.ccr.corp.intel.com> <8D8B600C3EC1B64FAD4503F0B66C61F23BBA24@SHSMSX103.ccr.corp.intel.com> In-Reply-To: From: Deepa Dinamani Date: Sun, 10 Nov 2019 10:24:19 -0800 Message-ID: Subject: Re: [PATCH] intel-iommu: Turn off translations at shutdown To: "Zeng, Jason" Cc: David Woodhouse , "joro@8bytes.org" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "Tian, Kevin" , Ron Minnich , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 8, 2019 at 2:48 PM Deepa Dinamani wrote: > > > > > For VMM live update case, we should be able to detect and bypass > > > > the shutdown that Deepa introduced here, so keep IOMMU still operating? > > > > > > Is that a 'yes' to Deepa's "if someone wants to make it conditional, we > > > can do that" ? > > > > Yes, I think so. Thanks! > > Are these changes already part of the kernel like avoiding shutdown of > the passthrough devices? device_shutdown() doesn't seem to be doing > anything selectively as of now. I've posted the v2 without the conditional for now: https://lore.kernel.org/patchwork/patch/1151225/ As a side topic, I'm trying to support https://www.linuxboot.org/. I have a couple of more such cleanups coming. The VMM live updates and linuxboot seem to have contradicting requirements and they both use kexec. So kexec_in_progress doesn't seem like a sufficient indicator to distinguish between the two. Do you already have an idea on how to distiguish between them? Does a separate sys_reboot() command parameter sound ok? Or, we could use the flags in the sys_kexec_load() depending on how the live update feature is implemented. -Deepa