Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6775777yba; Tue, 14 May 2019 13:29:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAbv7tvhnkW/sxp1mdbi7kRjXiapK2JzoFdMLCxB6SyPmwowdqAxoQ0fUV8wZ1RkcCAm4o X-Received: by 2002:a17:902:f215:: with SMTP id gn21mr39674845plb.194.1557865753288; Tue, 14 May 2019 13:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557865753; cv=none; d=google.com; s=arc-20160816; b=HLDLfjNr6G4OuGpwUhZ/hPRrv5qy7hBw+U7eGV838aWF0joT8//rd78mDcn3TlGWQ4 /Bxrz90g/67AvtQEs1iylyPRax9Z2GR6yrdFFGv2UglWnWe9ecxQrUy7yt3tO7c+gX5c 9aUZeAcekBllWnSl4navZK1Ys7nggtBg6cCI1qpECWV+1RlXkTpDC2FEZOEWn3YBrLWA /+1fP/UQ5kn/QNy1qAECneKq0pW8DvXCGP537/w345TfcG0x+1xJk63n/PqoH4YBqAMB WhxJcA/QR+d5fWnsld+Bc3l0naKQRIpjz2LPw551xG509EoC3Ne1Eny4RR/2/rjL2+n3 O+0A== 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=FdcqEhjkS2H6UUI5e9J+DP4sAVa4fL2kVmRIomgO5qA=; b=kOg5sgasxwtsQ1E7mIpzt2Y5lpJd3qR3lTDfxrymNdYnpVxz214uBpr4CRYywAWNxJ 06hwte4hzkY30407REO+n6wrB5Dgur37Z2TbzBGrdc4J1WwUwaWeA/hPOtrQ3SJIr79G dhojL5G9YPY/smkzd3+1kO4UjBqo8bDB36c1Jkeo4JgoMtk/BrZ5WekktcPfGJXzApr6 Tm+GiliEGpbl6vdPVX7Pb43RO1P4PCK3lz/+Jfk/m8msicmBtsMlo9SEnb0y4j0t0+Vm Xi1DpeCgDGo7k2ZOijbF5wDmIZIV6oAs//mf5cfcaSkuYmjulKs2NXCQ2Ww0szOjtY2Y KQxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H7eAox2h; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si20839288plk.368.2019.05.14.13.28.58; Tue, 14 May 2019 13:29:13 -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=@kernel.org header.s=default header.b=H7eAox2h; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726380AbfENU10 (ORCPT + 99 others); Tue, 14 May 2019 16:27:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:35710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbfENU1Z (ORCPT ); Tue, 14 May 2019 16:27:25 -0400 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86FD62184C for ; Tue, 14 May 2019 20:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557865644; bh=DzocNwMVi5SAbWmRTGaV0IjOHUG4WEPp/2+M4ioUzgA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=H7eAox2hSzIAWyeZKe5RK68sRQU/pkz/MU1gJXfJmQJwc8b9Y2i+bnIi6WWU9vdvc FSSl9o0Ds5GeA/th5W2//Zn9ZeQyIyYwOhETDLySSfAJFdoU9sT0kQQWo4hIcLuOnO JwlV8WuVYZF14qijOoItC6HIVEGbP7RGFDKPU0Uw= Received: by mail-wm1-f46.google.com with SMTP id j187so3170558wma.1 for ; Tue, 14 May 2019 13:27:24 -0700 (PDT) X-Gm-Message-State: APjAAAXs0jfdnYXQUCOEqoCSwm+APzEeYEqR62wy+TH8XqEi7Qd4jrtB kJMyRQ9baK14OhVOrngeyyqQ0Wry++FtmXFCmPTNCQ== X-Received: by 2002:a1c:eb18:: with SMTP id j24mr21736258wmh.32.1557865643024; Tue, 14 May 2019 13:27:23 -0700 (PDT) MIME-Version: 1.0 References: <1557758315-12667-1-git-send-email-alexandre.chartre@oracle.com> <1557758315-12667-19-git-send-email-alexandre.chartre@oracle.com> <20190514070941.GE2589@hirez.programming.kicks-ass.net> <4e7d52d7-d4d2-3008-b967-c40676ed15d2@oracle.com> <20190514170522.GW2623@hirez.programming.kicks-ass.net> In-Reply-To: <20190514170522.GW2623@hirez.programming.kicks-ass.net> From: Andy Lutomirski Date: Tue, 14 May 2019 13:27:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC KVM 18/27] kvm/isolation: function to copy page table entries for percpu buffer To: Peter Zijlstra Cc: Alexandre Chartre , Andy Lutomirski , Paolo Bonzini , Radim Krcmar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , kvm list , X86 ML , Linux-MM , LKML , Konrad Rzeszutek Wilk , jan.setjeeilers@oracle.com, Liran Alon , Jonathan Adams 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 Tue, May 14, 2019 at 10:05 AM Peter Zijlstra wrote: > > On Tue, May 14, 2019 at 06:24:48PM +0200, Alexandre Chartre wrote: > > On 5/14/19 5:23 PM, Andy Lutomirski wrote: > > > > How important is the ability to enable IRQs while running with the KVM > > > page tables? > > > > > > > I can't say, I would need to check but we probably need IRQs at least for > > some timers. Sounds like you would really prefer IRQs to be disabled. > > > > I think what amluto is getting at, is: > > again: > local_irq_disable(); > switch_to_kvm_mm(); > /* do very little -- (A) */ > VMEnter() > > /* runs as guest */ > > /* IRQ happens */ > WMExit() > /* inspect exit raisin */ > if (/* IRQ pending */) { > switch_from_kvm_mm(); > local_irq_restore(); > goto again; > } > What I'm getting at is that running the kernel without mapping the whole kernel is a horrible, horrible thing to do. The less code we can run like that, the better.