[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141202132337.GD545@cbox>
Date: Tue, 2 Dec 2014 14:23:37 +0100
From: Christoffer Dall <christoffer.dall@...aro.org>
To: Alex Bennée <alex.bennee@...aro.org>
Cc: kvm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.cs.columbia.edu, marc.zyngier@....com,
peter.maydell@...aro.org, agraf@...e.de, jan.kiszka@...mens.com,
dahi@...ux.vnet.ibm.com, r65777@...escale.com, bp@...e.de,
pbonzini@...hat.com, Gleb Natapov <gleb@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/7] KVM: arm64: re-factor hyp.S debug register code
On Mon, Dec 01, 2014 at 11:52:44AM +0000, Alex Bennée wrote:
>
> Christoffer Dall <christoffer.dall@...aro.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists