Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968604AbdD0MAi convert rfc822-to-8bit (ORCPT ); Thu, 27 Apr 2017 08:00:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50455 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034002AbdD0MA3 (ORCPT ); Thu, 27 Apr 2017 08:00:29 -0400 Date: Thu, 27 Apr 2017 14:00:16 +0200 From: Cornelia Huck To: Radim =?UTF-8?B?S3LEjW3DocWZ?= Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Christoffer Dall , Andrew Jones , Marc Zyngier , Paolo Bonzini , Christian Borntraeger , James Hogan , Paul Mackerras Subject: Re: [PATCH v2 4/9] KVM: mark requests that do not need a wakeup In-Reply-To: <20170426203227.12321-5-rkrcmar@redhat.com> References: <20170426203227.12321-1-rkrcmar@redhat.com> <20170426203227.12321-5-rkrcmar@redhat.com> Organization: IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz =?UTF-8?B?R2VzY2jDpGZ0c2bDvGhydW5nOg==?= Dirk Wittkopp Sitz der Gesellschaft: =?UTF-8?B?QsO2Ymxpbmdlbg==?= Registergericht: Amtsgericht Stuttgart, HRB 243294 X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-TM-AS-GCONF: 00 x-cbid: 17042712-0020-0000-0000-000003544D3C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042712-0021-0000-0000-00004179344C Message-Id: <20170427140016.68e4cefe.cornelia.huck@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-27_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704270203 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1099 Lines: 28 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