From: Peter Maydell <peter.maydell@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
kvm-devel <kvm@vger.kernel.org>,
Marc Zyngier <marc.zyngier@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
open list <linux-kernel@vger.kernel.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
kvmarm@lists.cs.columbia.edu,
arm-mail-list <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH] KVM: arm64: don't single-step for non-emulated faults
Date: Thu, 8 Nov 2018 14:38:43 +0000 [thread overview]
Message-ID: <CAFEAcA9v+XvAJBWpDMvEQPeJ7ALM15Yz5KY+wfGPmLG2a8yPRQ@mail.gmail.com> (raw)
In-Reply-To: <87pnvf63u2.fsf@linaro.org>
On 8 November 2018 at 14:28, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Mark Rutland <mark.rutland@arm.com> writes:
>> One problem is that I couldn't spot when we advance the PC for an MMIO
>> trap. I presume we do that in the kernel, *after* the MMIO trap, but I
>> can't see where that happens.
>
> Nope it gets done before during decode_hsr in mmio.c:
>
> /*
> * The MMIO instruction is emulated and should not be re-executed
> * in the guest.
> */
> kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu));
I think that this attempt to do the PC-advance early is
probably an underlying problem that is not helping the
code structure here.
An enhancement that's been floated previously is that the
MMIO emulation in userspace should be able to report back
to KVM "nope, that access should generate a guest synchronous
external abort (with ESR_EL1.EA = 0/1)".
If we have that, then we definitely need to not advance the
PC until after userspace has done the emulation and told
us whether the memory access succeeded or not...
thanks
-- PMM
next prev parent reply other threads:[~2018-11-08 14:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 17:10 Alex Bennée
2018-11-07 17:39 ` Peter Maydell
2018-11-07 17:53 ` Peter Maydell
2018-11-08 12:26 ` Alex Bennée
2018-11-07 18:01 ` Mark Rutland
2018-11-07 18:08 ` Mark Rutland
2018-11-08 12:40 ` Alex Bennée
2018-11-08 13:51 ` Mark Rutland
2018-11-08 14:28 ` Alex Bennée
2018-11-08 14:38 ` Peter Maydell [this message]
2018-11-09 11:56 ` Mark Rutland
2018-11-09 12:24 ` Alex Bennée
2018-11-09 12:49 ` Mark Rutland
2018-11-09 12:56 ` Peter Maydell
2018-11-09 13:29 ` Mark Rutland
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=CAFEAcA9v+XvAJBWpDMvEQPeJ7ALM15Yz5KY+wfGPmLG2a8yPRQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=will.deacon@arm.com \
/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
all inboxes | Powered by JetHome®