Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753445AbdDKTpp convert rfc822-to-8bit (ORCPT ); Tue, 11 Apr 2017 15:45:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42407 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752648AbdDKTpm (ORCPT ); Tue, 11 Apr 2017 15:45:42 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7863F61D03 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7863F61D03 Date: Tue, 11 Apr 2017 15:45:40 -0400 (EDT) From: Paolo Bonzini To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: James Hogan , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Christoffer Dall , Andrew Jones , Marc Zyngier , Christian Borntraeger , Cornelia Huck , Paul Mackerras Message-ID: <705609620.12874765.1491939940525.JavaMail.zimbra@redhat.com> In-Reply-To: <20170411193124.GA395@potion> References: <20170406202056.18379-1-rkrcmar@redhat.com> <20170406202056.18379-2-rkrcmar@redhat.com> <20170406210215.GV31606@jhogan-linux.le.imgtec.org> <20170411093726.GA31606@jhogan-linux.le.imgtec.org> <20170411193124.GA395@potion> Subject: Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [10.4.164.1, 10.4.195.1] Thread-Topic: fix guest_mode optimization in kvm_make_all_cpus_request() Thread-Index: TwEW/cBxDAvfqySXlV1EBfKg2FOisQ== X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 11 Apr 2017 19:45:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1709 Lines: 42 ----- Original Message ----- > From: "Radim Krčmář" > To: "James Hogan" > Cc: "Paolo Bonzini" , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, "Christoffer Dall" > , "Andrew Jones" , "Marc Zyngier" , "Christian > Borntraeger" , "Cornelia Huck" , "Paul Mackerras" > > Sent: Wednesday, April 12, 2017 3:31:24 AM > Subject: Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request() > > 2017-04-11 10:37+0100, James Hogan: > > Hi Paolo, > > > > On Tue, Apr 11, 2017 at 01:25:04PM +0800, Paolo Bonzini wrote: > >> On 07/04/2017 05:02, James Hogan wrote: > >> > This presumably changes the behaviour on x86, from != OUTSIDE_GUEST_MODE > >> > to == IN_GUEST_MODE. so: > >> > - you'll no longer get IPIs if its in READING_SHADOW_PAGE_TABLES (which > >> > MIPS also now uses when accessing mappings outside of guest mode and > >> > depends upon to wait until the old mappings are no longer in use). > >> > >> This is wrong, the purpose of READING_SHADOW_PAGE_TABLES is > >> "kvm_flush_remote_tlbs > >> should send me an IPI, because I want to stop kvm_flush_remote_tlbs until > >> I'm done > >> reading the page tables". > > > > That sounds equivalent to what I meant for MIPS, i.e. > > kvm_flush_remote_tlbs() does the waiting (not the thing accessing guest > > mappings). Yeah, I meant "it's wrong in Radim's patches". Not hard to fix though. Thanks for the review! Paolo > I agree, thanks for noticing this. It would be a huge mistake to drop > the synchronization. >