Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-18 Thread Marc Zyngier
On 18/04/13 16:54, Russell King - ARM Linux wrote: > On Fri, Apr 05, 2013 at 10:08:04AM +0100, Marc Zyngier wrote: >> On 04/04/13 23:10, Geoff Levand wrote: >>> Hi, >>> >>> On Tue, 2013-04-02 at 14:25 +0100, Marc Zyngier wrote: + @ Jump to the trampoline page + ldr r2, =#PAGE_MASK >

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-18 Thread Russell King - ARM Linux
On Fri, Apr 05, 2013 at 10:08:04AM +0100, Marc Zyngier wrote: > On 04/04/13 23:10, Geoff Levand wrote: > > Hi, > > > > On Tue, 2013-04-02 at 14:25 +0100, Marc Zyngier wrote: > >> + @ Jump to the trampoline page > >> + ldr r2, =#PAGE_MASK > >> + adr r3, target > >> + bic r3, r3, r2

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-05 Thread Marc Zyngier
On 05/04/13 17:46, Geoff Levand wrote: Hi Geoff, > On Fri, 2013-04-05 at 10:08 +0100, Marc Zyngier wrote: >> On 04/04/13 23:10, Geoff Levand wrote: >>> On Tue, 2013-04-02 at 14:25 +0100, Marc Zyngier wrote: + @ Jump to the trampoline page + ldr r2, =#PAGE_MASK + adr r3,

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-05 Thread Geoff Levand
Hi Marc, On Fri, 2013-04-05 at 10:08 +0100, Marc Zyngier wrote: > On 04/04/13 23:10, Geoff Levand wrote: > > On Tue, 2013-04-02 at 14:25 +0100, Marc Zyngier wrote: > >> + @ Jump to the trampoline page > >> + ldr r2, =#PAGE_MASK > >> + adr r3, target > >> + bic r3, r3, r2 > >> + ld

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-05 Thread Marc Zyngier
On 04/04/13 23:10, Geoff Levand wrote: > Hi, > > On Tue, 2013-04-02 at 14:25 +0100, Marc Zyngier wrote: >> +@ Jump to the trampoline page >> +ldr r2, =#PAGE_MASK >> +adr r3, target >> +bic r3, r3, r2 >> +ldr r2, =#TRAMPOLINE_VA >> +add r3, r3, r2 >> +

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-04 Thread Geoff Levand
Hi, On Tue, 2013-04-02 at 14:25 +0100, Marc Zyngier wrote: > + @ Jump to the trampoline page > + ldr r2, =#PAGE_MASK > + adr r3, target > + bic r3, r3, r2 > + ldr r2, =#TRAMPOLINE_VA > + add r3, r3, r2 > + mov pc, r3 I guess you need 'ldr r2, =P

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-04 Thread Marc Zyngier
On 04/04/13 00:15, Christoffer Dall wrote: > On Tue, Apr 02, 2013 at 02:25:14PM +0100, Marc Zyngier wrote: >> Our HYP init code suffers from two major design issues: >> - it cannot support CPU hotplug, as we tear down the idmap very early >> - it cannot perform a TLB invalidation when switching fro

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-04 Thread Marc Zyngier
On 04/04/13 00:15, Christoffer Dall wrote: > On Wed, Apr 03, 2013 at 11:38:30AM +0100, Marc Zyngier wrote: >> On 03/04/13 11:07, Will Deacon wrote: >>> On Tue, Apr 02, 2013 at 02:25:14PM +0100, Marc Zyngier wrote: Our HYP init code suffers from two major design issues: - it cannot support

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-03 Thread Christoffer Dall
On Wed, Apr 03, 2013 at 11:38:30AM +0100, Marc Zyngier wrote: > On 03/04/13 11:07, Will Deacon wrote: > > On Tue, Apr 02, 2013 at 02:25:14PM +0100, Marc Zyngier wrote: > >> Our HYP init code suffers from two major design issues: > >> - it cannot support CPU hotplug, as we tear down the idmap very e

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-03 Thread Christoffer Dall
On Tue, Apr 02, 2013 at 02:25:14PM +0100, Marc Zyngier wrote: > Our HYP init code suffers from two major design issues: > - it cannot support CPU hotplug, as we tear down the idmap very early > - it cannot perform a TLB invalidation when switching from init to > runtime mappings, as pages are man

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-03 Thread Marc Zyngier
On 03/04/13 11:07, Will Deacon wrote: > On Tue, Apr 02, 2013 at 02:25:14PM +0100, Marc Zyngier wrote: >> Our HYP init code suffers from two major design issues: >> - it cannot support CPU hotplug, as we tear down the idmap very early >> - it cannot perform a TLB invalidation when switching from ini

Re: [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-03 Thread Will Deacon
On Tue, Apr 02, 2013 at 02:25:14PM +0100, Marc Zyngier wrote: > Our HYP init code suffers from two major design issues: > - it cannot support CPU hotplug, as we tear down the idmap very early > - it cannot perform a TLB invalidation when switching from init to > runtime mappings, as pages are man

[PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code

2013-04-02 Thread Marc Zyngier
Our HYP init code suffers from two major design issues: - it cannot support CPU hotplug, as we tear down the idmap very early - it cannot perform a TLB invalidation when switching from init to runtime mappings, as pages are manipulated from PL1 exclusively The hotplug problem mandates that we ke