From: Will Deacon <will.deacon@arm.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"penberg@kernel.org" <penberg@kernel.org>,
Marc Zyngier <Marc.Zyngier@arm.com>,
"c.dall@virtualopensystems.com" <c.dall@virtualopensystems.com>,
"matt@ozlabs.org" <matt@ozlabs.org>,
"michael@ellerman.id.au" <michael@ellerman.id.au>,
"levinsasha928@gmail.com" <levinsasha928@gmail.com>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Subject: Re: [PATCH v2 8/8] kvm tools: add support for ARMv7 processors
Date: Thu, 22 Nov 2012 16:22:57 +0000 [thread overview]
Message-ID: <20121122162257.GH3113@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CAFEAcA-5ShOWX3jh8vNPRpDwPfiPKN_Qs5tRGOXgTrBrakHRGg@mail.gmail.com>
Hi Peter,
On Thu, Nov 22, 2012 at 04:13:17PM +0000, Peter Maydell wrote:
> On 22 November 2012 15:58, Will Deacon <will.deacon@arm.com> wrote:
> > +++ b/tools/kvm/arm/aarch32/smp-pen.S
> > @@ -0,0 +1,30 @@
> > +#include "kvm/kvm-arch.h"
> > +
> > +#include "arm-common/gic.h"
> > +
> > + .arm
> > +
> > + .globl smp_pen_start
> > + .globl smp_jump_addr
> > + .globl smp_pen_end
> > +
> > + .align
> > +smp_pen_start:
> > + @ Ensure that the CPU interface is enabled for the wfi wakeup
> > + ldr r0, =ARM_GIC_CPUI_BASE
> > + mov r1, #GIC_CPUI_CTLR_EN
> > + str r1, [r0]
> > +
> > + @ Now wait for the primary to poke us
> > + adr r0, smp_jump_addr
> > + dsb
> > + wfi
> > + ldr r1, [r0]
> > + mov pc, r1
> > +
> > + .ltorg
> > +
> > + .align
> > +smp_jump_addr:
> > + .long 0xdeadc0de
> > +smp_pen_end:
>
> You've left the gate ajar on your pen -- this won't cope with
> spurious WFI wakeups (the architecture allows WFI to return
> at any time, down to the trivial case of "implemented as NOP").
> Needs a 'branch back to WFI if not yet poked' (or you could
> make the initial value stored at smp_jump_addr be the address
> of the wfi :-))
Thanks for pointing this out, somehow I missed it despite updating the ARMv8
code. Will fix for v3.
Will
next prev parent reply other threads:[~2012-11-22 18:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 15:58 [PATCH v2 0/8] kvm tools: add support for ARMv7 processors Will Deacon
2012-11-22 15:58 ` [PATCH v2 1/8] rbtree: include linux/compiler.h for definition of __always_inline Will Deacon
2012-11-22 18:44 ` Sasha Levin
2012-11-23 14:36 ` Will Deacon
2012-11-22 15:58 ` [PATCH v2 2/8] kvm tools: don't bother including linux/compiler.h Will Deacon
2012-11-22 15:58 ` [PATCH v2 3/8] kvm tools: balloon: add dummy set_size_vq implementation Will Deacon
2012-11-22 15:58 ` [PATCH v2 4/8] kvm tools: add generic device registration mechanism Will Deacon
2012-11-22 15:58 ` [PATCH v2 5/8] kvm tools: keep track of registered memory banks in struct kvm Will Deacon
2012-11-22 15:58 ` [PATCH v2 6/8] kvm tools: teach guest_flat_to_host about memory banks starting above 0 Will Deacon
2012-11-22 15:58 ` [PATCH v2 7/8] kvm tools: provide a mechanism for translating host to guest addresses Will Deacon
2012-11-22 15:58 ` [PATCH v2 8/8] kvm tools: add support for ARMv7 processors Will Deacon
2012-11-22 16:13 ` Peter Maydell
2012-11-22 16:22 ` Will Deacon [this message]
2012-11-23 11:22 ` [PATCH v2 0/8] " Pekka Enberg
2012-11-23 14:38 ` Will Deacon
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=20121122162257.GH3113@mudshark.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=Marc.Zyngier@arm.com \
--cc=c.dall@virtualopensystems.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=levinsasha928@gmail.com \
--cc=matt@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=penberg@kernel.org \
--cc=peter.maydell@linaro.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