Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6596270yba; Tue, 14 May 2019 10:07:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWiUYoj9+4k76P6daPrdfNffGEdv/o0WzHqLaDuRVPWLC/psM5kT5MZWV77ib0iQRhDG4X X-Received: by 2002:a17:902:9007:: with SMTP id a7mr38112647plp.221.1557853667701; Tue, 14 May 2019 10:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557853667; cv=none; d=google.com; s=arc-20160816; b=oA0m64qYpBAehxN2IYD2y7yuXwPETq7q457eopitSejTqjmZ6lqsL1q4Mcl5uQxoOF JAg9hV4tbH6BGe01UX//GRx5AYT410NN2VOqQPbqiIMd5jiDIbiLEqwYl4YsiPMKxw+f fI7qpj/H4oAxUdEFjqgdf3efIaSVdXDKjNnx3KTzvOUl6HrrLVwpAJmTtj3oq950lq6D R2DrL+Rz5DJS3+lWlq5VJ/y92X/PLKwHxPUycx0hX2CuGjz0fdlEeu1WWbHUiJP+lClA HTSkWpHGYuRorxIttTUp5GUzwPQnCYtVPvrYTNkXaTxA2ZqA+fHvk8h5gWwTZ8SaTFlU zdPQ== 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=KlbgFAVXgBXigN146B3nlFdjOxF2TXPML68s5DT9K4M=; b=R+0+Pkzzl2gMFJScHBnAs3gJPPMR0e0WUrUORX+rF7Gt0/6B3C2uZnccTgTaXCnH74 VxIhgK5b8v+eZOSu9tRpm7eWGaQTJUfjC6GGlONodmaLJtzIoDtcvdcoO+YQVR928t0n SoG4Or7kCVDzBEYG6jfHnqJ9IPl/DqFsIdI7UXzDjA32JodxKbwwQdT7BwX3V6FUAz9d qc17/GAUDGFz7RRxGbBNkAPC574Qfq9wUCoPYTvzt+W/XwGSvZIAWn6eVBsiOcniPkEK wN45lOe30Wi2gNyK7034+PIB4y2mydsiBeVgw25+9Ddk5cA+asfWef/659J7nx7QRd7c XGxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jmPpBeXU; 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 d18si20486449pgi.335.2019.05.14.10.07.31; Tue, 14 May 2019 10:07:47 -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=jmPpBeXU; 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 S1726791AbfENRFf (ORCPT + 99 others); Tue, 14 May 2019 13:05:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49112 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbfENRFf (ORCPT ); Tue, 14 May 2019 13:05:35 -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=KlbgFAVXgBXigN146B3nlFdjOxF2TXPML68s5DT9K4M=; b=jmPpBeXUM05r6s4bzTOSf6IqR +gcxkAlmEIZHWVOGUSv2eKJST1OuQS90zya54qlP9PNVULIwibJlblBwZsXAe2Tw9v0vEg7MjiaM/ boWCqM4HmbVadcMDA2prEGa3avhoxYuF2vh3xSdRIHCKv6faoneacq3v8ilnKkxoDdFTuTgPbsDuT uLEdi9/F+FBWIQlm1a1dv6w5TIgPFvJ8BPFmU5wT6QPVgtTBJ1vdYZpeSo4AAqT0EWeUhZDUEIjFO FrcTQwOxOHFzl5NUcBxEpfOaWiTDtXCsTRjQU4nGpWW7HpkKES1Iudvt4IdtGHjcxL1Q9sWZFMh2Z b4JKSdzYg==; 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.90_1 #2 (Red Hat Linux)) id 1hQark-0000lD-Qy; Tue, 14 May 2019 17:05:25 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D00982029F888; Tue, 14 May 2019 19:05:22 +0200 (CEST) Date: Tue, 14 May 2019 19:05:22 +0200 From: Peter Zijlstra To: Alexandre Chartre Cc: 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 Subject: Re: [RFC KVM 18/27] kvm/isolation: function to copy page table entries for percpu buffer Message-ID: <20190514170522.GW2623@hirez.programming.kicks-ass.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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; } but I don't know anything about VMX/SVM at all, so the above might not be feasible, specifically I read something about how VMX allows NMIs where SVM did not somewhere around (A) -- or something like that, earlier in this thread.