Hi Christoffer,
[snip]
> diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S
> index 1dc8926..4db26cb 100644
> --- a/arch/arm/kvm/init.S
> +++ b/arch/arm/kvm/init.S
> @@ -15,5 +15,135 @@
> * along with this program; if not, write to the Free Software
> * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
> */
> +
> +#include <linux/linkage.h>
> +#include <asm/unified.h>
> #include <asm/asm-offsets.h>
> #include <asm/kvm_asm.h>
> +#include <asm/kvm_arm.h>
> +
> +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> +@ Hypervisor initialization
> +@ - should be called with:
> +@ r0 = Hypervisor pgd pointer
> +@ r1 = top of Hyp stack (kernel VA)
> +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> + .text
> + .arm
> + .pushsection .hyp.idmap.text,"ax"
> + .align 12
> +__kvm_hyp_init:
> + .globl __kvm_hyp_init
> +
> + @ Hyp-mode exception vector
> + nop
> + nop
> + nop
> + nop
> + nop
> + b __do_hyp_init
> + nop
> + nop
> +
> +__do_hyp_init:
> + @ Set the sp to end of this page and push data for later use
> + mov sp, pc
> + bic sp, sp, #0x0ff
> + bic sp, sp, #0xf00
> + add sp, sp, #0x1000
> + push {r0, r1, r2, r12}
Is safe to use the stack here? Since our HYP memory mapping is
gotten valid after the following HTTBR being set as I think.
> +
> + @ Set the HTTBR to point to the hypervisor PGD pointer passed to
> + @ function and set the upper bits equal to the kernel PGD.
> + mrrc p15, 1, r1, r2, c2
> + mcrr p15, 4, r0, r2, c2
> +
[snip]
Thanks,
Lei
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html