Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031554AbdD0MgR (ORCPT ); Thu, 27 Apr 2017 08:36:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35120 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031360AbdD0MgL (ORCPT ); Thu, 27 Apr 2017 08:36:11 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 32F168051F Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 32F168051F Subject: Re: [PATCH v2 9/9] KVM: mark requests that need synchronization To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20170426203227.12321-1-rkrcmar@redhat.com> <20170426203227.12321-10-rkrcmar@redhat.com> Cc: Christoffer Dall , Andrew Jones , Marc Zyngier , Christian Borntraeger , Cornelia Huck , James Hogan , Paul Mackerras From: Paolo Bonzini Message-ID: <0099c50a-8270-4162-344c-878625e5e5b8@redhat.com> Date: Thu, 27 Apr 2017 14:36:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170426203227.12321-10-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 27 Apr 2017 12:36:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 802 Lines: 26 On 26/04/2017 22:32, Radim Krčmář wrote: > v2: replaces [v1 1/6] > Ugh, KVM_ARCH_REQ_WAIT_NO_WAKEUP looks a weird ... Yeah, let's drop patch 7 and just use bits for now. I think using KVM_ARCH_REQ_FLAGS directly should be fine, especially after the default is flipped from "no wakeup" to "wakeup", but for 4.12 this is the simplest incremental step. > +/* TODO: merge with kvm_arch_vcpu_should_kick */ > +static bool kvm_should_kick_request(struct kvm_vcpu *vcpu, unsigned req) I'm renaming this to kvm_request_needs_ipi; the point of the IPI for synchronous requests is not the "kick", but the "ack" that comes back. Paolo > +{ > + int mode = kvm_vcpu_exiting_guest_mode(vcpu); > + > + return req & KVM_REQUEST_WAIT ? > + mode != OUTSIDE_GUEST_MODE : mode == IN_GUEST_MODE; > +} > +