From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: KVM: Handle loads from I/O addresses to PC
Date: Mon, 13 May 2013 10:18:31 +0100 [thread overview]
Message-ID: <20130513091830.GA18242@darko.cambridge.arm.com> (raw)
In-Reply-To: <1368385135-60584-1-git-send-email-cdall@cs.columbia.edu>
On Sun, May 12, 2013 at 07:58:55PM +0100, Christoffer Dall wrote:
> If a VM does something like this:
>
> ldr pc, [r0] @ r0 is an I/O address
>
> Then simply let that value load into the PC on kvm_handle_mmio_return
> overwriting the PC value set from kvm_skip_instr.
>
> Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
> ---
> arch/arm/kvm/mmio.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
> index 72a12f2..b8e06b7 100644
> --- a/arch/arm/kvm/mmio.c
> +++ b/arch/arm/kvm/mmio.c
> @@ -86,12 +86,6 @@ static int decode_hsr(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
> sign_extend = kvm_vcpu_dabt_issext(vcpu);
> rt = kvm_vcpu_dabt_get_rd(vcpu);
>
> - if (kvm_vcpu_reg_is_pc(vcpu, rt)) {
> - /* IO memory trying to read/write pc */
> - kvm_inject_pabt(vcpu, kvm_vcpu_get_hfar(vcpu));
> - return 1;
I haven't checked Marc's patch yet but I would get rid of
kvm_vcpu_reg_is_pc() as well, that's the only place where it is used.
--
Catalin
prev parent reply other threads:[~2013-05-13 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-12 18:58 [PATCH] ARM: KVM: Handle loads from I/O addresses to PC Christoffer Dall
2013-05-13 9:08 ` Marc Zyngier
2013-05-13 9:18 ` Catalin Marinas [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=20130513091830.GA18242@darko.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--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