linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/7]  arm64: KVM: vgic-v2: Allow unsafe GICV accesses
Date: Tue, 6 Sep 2016 13:14:50 +0200	[thread overview]
Message-ID: <20160906111450.GN30513@cbox> (raw)
In-Reply-To: <1473150527-4729-1-git-send-email-marc.zyngier@arm.com>

On Tue, Sep 06, 2016 at 09:28:40AM +0100, Marc Zyngier wrote:
> In a number of cases, KVM cannot give access direct access to the
> GICv2 GICV region, either because GICV is not page aligned, or its
> size is not a multiple of the page size. This is especially visible
> with 16kB/64kB pages and the original GIC-400 layout where each region
> is only 4k aligned.
> 
> Instead of disabling KVM altogether (which is the current behaviour),
> there is some value in trapping each guest GICV access, performing the
> access as quickly as possible at EL2, and resuming the guest. This
> allows us to keep KVM enabled on this HW.
> 
> Implementation wise, this is done with a static key controlling the
> workaround being enabled, hence coming at zero cost (well, an extra
> nop on the exit hot path) for unaffected platforms. On the affected
> HW, I've measured a 10 to 15% overhead for a self-IPI test, which is
> pretty bad, but still much better than not having a GIC at all.
> 
> There is two pending issues:
> 
> - A failed write to GICV ends up being forwarded to userspace. This
>   will be addressed in a follow-up series where we deal with injecting
>   vSError in the guest
> 
> - Skipping instructions (as we do when emulating anything) breaks
>   things like guest single-step and watchpoints. This is a long
>   standing problem, and someone should probably have a look at
>   it. Alex?
> 
> Tested on Juno-r1 with 64kB pages.

I also tested this on TC2 to ensure we didn't regress the 32-bit side.

Applied the series.
-Christoffer

      parent reply	other threads:[~2016-09-06 11:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06  8:28 [PATCH v2 0/7] arm64: KVM: vgic-v2: Allow unsafe GICV accesses Marc Zyngier
2016-09-06  8:28 ` [PATCH v2 1/7] arm64: KVM: Move kvm_vcpu_get_condition out of emulate.c Marc Zyngier
2016-09-06 10:47   ` Christoffer Dall
2016-09-06  8:28 ` [PATCH v2 2/7] arm64: KVM: Move the AArch32 conditional execution to common code Marc Zyngier
2016-09-06 10:47   ` Christoffer Dall
2016-09-06  8:28 ` [PATCH v2 3/7] arm: KVM: Use common AArch32 conditional execution code Marc Zyngier
2016-09-06 10:53   ` Christoffer Dall
2016-09-06  8:28 ` [PATCH v2 4/7] arm64: KVM: Make kvm_skip_instr32 available to HYP Marc Zyngier
2016-09-06 10:53   ` Christoffer Dall
2016-09-06  8:28 ` [PATCH v2 5/7] arm64: KVM: vgic-v2: Add the GICV emulation infrastructure Marc Zyngier
2016-09-06 10:53   ` Christoffer Dall
2016-09-06  8:28 ` [PATCH v2 6/7] arm64: KVM: vgic-v2: Add GICV access from HYP Marc Zyngier
2016-09-06  8:28 ` [PATCH v2 7/7] arm64: KVM: vgic-v2: Enable GICV access from HYP if access from guest is unsafe Marc Zyngier
2016-09-06 11:14 ` Christoffer Dall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160906111450.GN30513@cbox \
    --to=christoffer.dall@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).