From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH v2 4/9] KVM: mark requests that do not need a wakeup Date: Thu, 27 Apr 2017 14:00:16 +0200 Message-ID: <20170427140016.68e4cefe.cornelia.huck@de.ibm.com> References: <20170426203227.12321-1-rkrcmar@redhat.com> <20170426203227.12321-5-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Christoffer Dall , Andrew Jones , Marc Zyngier , Paolo Bonzini , Christian Borntraeger , James Hogan , Paul Mackerras To: Radim =?UTF-8?B?S3LEjW3DocWZ?= Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58631 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965501AbdD0MA2 (ORCPT ); Thu, 27 Apr 2017 08:00:28 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v3RBwrDJ129584 for ; Thu, 27 Apr 2017 08:00:27 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2a3d850bup-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 27 Apr 2017 08:00:27 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 27 Apr 2017 13:00:25 +0100 In-Reply-To: <20170426203227.12321-5-rkrcmar@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 26 Apr 2017 22:32:22 +0200 Radim Krčmář wrote: > Some operations must ensure that the guest is not running with stale > data, but if the guest is halted, then the update can wait until another > event happens. kvm_make_all_requests() currently doesn't wake up, so we > can mark all requests used with it. > > First 8 bits were arbitrarily reserved for request numbers. > > Most uses of requests have the request type as a constant, so a compiler > will optimize the '&'. > > An alternative would be to have an inline function that would return > whether the request needs a wake-up or not, but I like this one better > even though it might produce worse assembly. > > Signed-off-by: Radim Krčmář > --- > v2: use GENMASK [Marc] > --- > arch/arm/include/asm/kvm_host.h | 2 +- > arch/arm64/include/asm/kvm_host.h | 2 +- > arch/x86/include/asm/kvm_host.h | 6 +++--- > include/linux/kvm_host.h | 12 +++++++----- > 4 files changed, 12 insertions(+), 10 deletions(-) Reviewed-by: Cornelia Huck