From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH v2 08/36] KVM: arm64: Slightly improve debug save/restore functions Date: Sat, 09 Dec 2017 19:37:43 +0000 Message-ID: <861sk3sneg.wl-marc.zyngier@arm.com> References: <20171207170630.592-1-christoffer.dall@linaro.org> <20171207170630.592-9-christoffer.dall@linaro.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20171207170630.592-9-christoffer.dall@linaro.org> Sender: kvm-owner@vger.kernel.org To: Christoffer Dall Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, Shih-Wei Li , Andrew Jones List-Id: kvmarm@lists.cs.columbia.edu On Thu, 07 Dec 2017 17:06:02 +0000, Christoffer Dall wrote: > > The debug save/restore functions can be improved by using the has_vhe() > static key instead of the instruction alternative. Using the static key > uses the same paradigm as we're going to use elsewhere, it makes the > code more readable, and it generates slightly better code (no > stack setups and function calls unless necessary). > > We also use a static key on the restore path, because it will be > marginally faster than loading a value from memory. > > Finally, we don't have to conditionally clear the debug dirty flag if > it's set, we can just clear it. > > Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier M. -- Jazz is not dead, it just smell funny.