From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [PATCH v2 5/7] arm64: KVM: vgic-v2: Add the GICV emulation infrastructure Date: Tue, 6 Sep 2016 12:53:37 +0200 Message-ID: <20160906105337.GK30513@cbox> References: <1473150527-4729-1-git-send-email-marc.zyngier@arm.com> <1473150527-4729-6-git-send-email-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Peter Maydell , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu To: Marc Zyngier Return-path: Received: from mail-wm0-f50.google.com ([74.125.82.50]:37846 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752779AbcIFKvK (ORCPT ); Tue, 6 Sep 2016 06:51:10 -0400 Received: by mail-wm0-f50.google.com with SMTP id w12so84234352wmf.0 for ; Tue, 06 Sep 2016 03:51:09 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1473150527-4729-6-git-send-email-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Sep 06, 2016 at 09:28:45AM +0100, Marc Zyngier wrote: > In order to efficiently perform the GICV access on behalf of the > guest, we need to be able to avoid going back all the way to > the host kernel. > > For this, we introduce a new hook in the world switch code, > conveniently placed just after populating the fault info. > At that point, we only have saved/restored the GP registers, > and we can quickly perform all the required checks (data abort, > translation fault, valid faulting syndrome, not an external > abort, not a PTW). > > Coming back from the emulation code, we need to skip the emulated > instruction. This involves an additional bit of save/restore in > order to be able to access the guest's PC (and possibly CPSR if > this is a 32bit guest). > > At this stage, no emulation code is provided. > > Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall