On Sun, Mar 4, 2012 at 8:12 PM, Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote: > On Thu, 23 Feb 2012 02:32:39 -0500, Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx> wrote: >> From: Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx> >> >> +static void cpu_set_vector(void *vector) >> +{ >> + unsigned long vector_ptr; >> + unsigned long smc_hyp_nr; >> + >> + vector_ptr = (unsigned long)vector; >> + smc_hyp_nr = SMCHYP_HVBAR_W; >> + >> + /* >> + * Set the HVBAR >> + */ >> + asm volatile ( >> + "mov r0, %[vector_ptr]\n\t" >> + "mov r7, %[smc_hyp_nr]\n\t" >> + "smc #0\n\t" : : >> + [vector_ptr] "r" (vector_ptr), >> + [smc_hyp_nr] "r" (smc_hyp_nr) : >> + "r0", "r1"); > > Testing this recently, trying to get a kvm guest to boot. No success > yet, but I did get another issue when I compiled the host non-SMP: you > need to mark r7 as clobbered here (on SMP we didn't clobber anything > important, but on UP it hit init_end_phys_addr and changed it to > 0xffffffff and we died horribly in hyp_idmap_del(). > you're absolutely right. Nice catch. Thanks. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html