From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F22FE5E3A5 for ; Wed, 6 Mar 2024 09:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709718781; cv=none; b=rEAi6WwC0rGp67gb2BpKGinJavezVrfiVygj9RR1aV2yxRdwgcKQ1XDFwAYymITY69TklEcBkoKBup4QsaU4U1o1c5tHSUnFyLpDv7sre+F0PdjYPz3vq/JdHDhlCnBVx9ZPpCnNYsXzI9N7hfSjL90Tc4CCBpVoR0kn0MEO8/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709718781; c=relaxed/simple; bh=OrOJrjrHLYV66AHb3j8IyqGwyrRIfGhPZkG3rIOf5oM=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=UFlegx51j66Mt0bOJgQo4QVGm1Zb2iaKJnGxUfDduF4i3loGRhOgycUwrfNNA5cC+rfponaAFuyl+leEpqYbglonxBCJk2dKH4IztxVjqm29JGrrRCxzj3vzBOs8I/iqpQBibkauyTtgEUEwgUq8RcJOqpL0BpXLbHo5quSrP3U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TxICfwHQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TxICfwHQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 776D5C433C7; Wed, 6 Mar 2024 09:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709718780; bh=OrOJrjrHLYV66AHb3j8IyqGwyrRIfGhPZkG3rIOf5oM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TxICfwHQtdOoFhduYyrGNTG/1XYWx8rg4suGS5YmxUhSydeB2a+OzFyeMr/jKTRAH gFAlsQYcIaoVg8bTE9vZTGOGYNib/FrdZrDHxWBbEHDmg7pBC4kXrNnmWw8whjTT3H 1AtAm1c/y/hhRNowHt3MNHRBBhDH9poxzzgau8PH+NnaY/gBPKq1BRAnVaojkNomjl 4LhSEuvMnPO0QxVwPv4mzsBcpw5KoER8Kj805GftAGpee8fCNmcUN+D7Qm9pAzbDCb 1P7gOzD1FM00Jg7HGdyBzsE0Ru/Av2PR/jP8Z2wjPHzvi//MqQN1RHE15KQOs0I41P T7lDnk+nj5r/Q== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rhnxJ-009srb-QH; Wed, 06 Mar 2024 09:52:58 +0000 Date: Wed, 06 Mar 2024 09:52:56 +0000 Message-ID: <87cys7r8jr.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: kvmarm@lists.linux.dev, James Morse , Suzuki K Poulose , Zenghui Yu , Will Deacon Subject: Re: [PATCH 3/3] KVM: arm64: Do not disable preemption in kvm_vcpu_pmu_restore_guest() In-Reply-To: <20240305184840.636212-4-oliver.upton@linux.dev> References: <20240305184840.636212-1-oliver.upton@linux.dev> <20240305184840.636212-4-oliver.upton@linux.dev> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.104.136.29 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, kvmarm@lists.linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 05 Mar 2024 18:48:40 +0000, Oliver Upton wrote: > > The caller has already disabled preemption, no need to nest further. A quick survey indicates that it doesn't seem to be the case, I'm afraid. access_pmu_evtyper() and access_pmcnten() both seem to be preemptible. Which probably means that these spots are doing the wrong thing and that we should instead turn it into a KVM_REQ_RESYNC_PMU_EL0 request. Then the preemption can be actually dropped, and even replaced by an assertion. Thanks, M. -- Without deviation from the norm, progress is not possible.