From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/7] KVM: arm64: re-factor hyp.S debug register code
Date: Tue, 2 Dec 2014 14:23:37 +0100 [thread overview]
Message-ID: <20141202132337.GD545@cbox> (raw)
In-Reply-To: <87ppc31t9v.fsf@linaro.org>
On Mon, Dec 01, 2014 at 11:52:44AM +0000, Alex Benn?e wrote:
>
> Christoffer Dall <christoffer.dall@linaro.org> writes:
>
> > On Tue, Nov 25, 2014 at 04:10:04PM +0000, Alex Benn?e wrote:
> >> This is a pre-cursor to sharing the code with the guest debug support.
> >> This replaces the big macro that fishes data out of a fixed location
> >> with a more general helper macro to restore a set of debug registers. It
> >> uses macro substitution so it can be re-used for debug control and value
> >> registers. It does however rely on the debug registers being 64 bit
> >> aligned (as they happen to be in the hyp ABI).
> >
> > can you enforce that somewhere?
>
> There is a comment in kvm_asm.h:
>
> /*
> * 0 is reserved as an invalid value.
> * Order *must* be kept in sync with the hyp switch code.
> */
>
> But I'm not sure how to enforce it in assembly. Is there a #pragma or
> something I can use?
>
You can add a BUG_ON somewhere at runtime, but I wouldn't bother, you
can stick a note in that existing comment just so people don't change
the declaration of the registers to be 32-bit aligned or something else.
-Christoffer
next prev parent reply other threads:[~2014-12-02 13:23 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 16:09 [PATCH 0/7] KVM Guest Debug support for arm64 Alex Bennée
2014-11-25 16:09 ` [PATCH 1/7] KVM: add commentary for kvm_debug_exit_arch struct Alex Bennée
2014-11-26 14:20 ` Andrew Jones
2014-11-25 16:10 ` [PATCH 2/7] KVM: arm: guest debug, define API headers Alex Bennée
2014-11-25 16:19 ` Peter Maydell
2014-11-26 15:04 ` Alex Bennée
2014-11-29 16:20 ` Christoffer Dall
2014-12-01 11:30 ` Alex Bennée
2014-11-25 17:05 ` Paolo Bonzini
2014-11-25 17:13 ` Peter Maydell
2014-11-25 17:22 ` Paolo Bonzini
2014-11-26 13:13 ` Alex Bennée
2014-11-26 13:14 ` Paolo Bonzini
2014-11-26 14:31 ` Andrew Jones
2014-11-26 14:58 ` Alex Bennée
2014-11-26 16:46 ` Paolo Bonzini
2014-11-26 17:47 ` Andrew Jones
2014-11-29 16:20 ` Christoffer Dall
2014-11-25 16:10 ` [PATCH 3/7] KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl Alex Bennée
2014-11-26 14:38 ` Andrew Jones
2014-11-26 15:03 ` Alex Bennée
2014-11-26 16:46 ` Paolo Bonzini
2014-11-29 16:21 ` Christoffer Dall
2014-11-25 16:10 ` [PATCH 4/7] KVM: arm64: guest debug, add SW break point support Alex Bennée
2014-11-26 16:07 ` Andrew Jones
2014-11-26 17:14 ` Peter Maydell
2014-11-29 16:21 ` Christoffer Dall
2014-11-29 16:21 ` Christoffer Dall
2014-12-01 11:33 ` Alex Bennée
2014-11-25 16:10 ` [PATCH 5/7] KVM: arm64: guest debug, add support for single-step Alex Bennée
2014-11-26 16:40 ` Andrew Jones
2014-11-26 18:00 ` Alex Bennée
2014-11-26 19:27 ` Peter Maydell
2014-11-30 10:10 ` Christoffer Dall
2014-11-30 10:20 ` Peter Maydell
2014-11-30 10:21 ` Christoffer Dall
2014-12-01 11:50 ` Alex Bennée
2014-12-02 13:17 ` Christoffer Dall
2014-11-25 16:10 ` [PATCH 6/7] KVM: arm64: re-factor hyp.S debug register code Alex Bennée
2014-11-26 16:49 ` Andrew Jones
2014-11-30 10:25 ` Christoffer Dall
2014-12-01 11:52 ` Alex Bennée
2014-12-02 13:23 ` Christoffer Dall [this message]
2014-11-25 16:10 ` [PATCH 7/7] KVM: arm64: guest debug, HW assisted debug support Alex Bennée
2014-11-26 17:34 ` Andrew Jones
2014-11-30 10:34 ` Christoffer Dall
2014-12-01 11:54 ` Alex Bennée
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=20141202132337.GD545@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).