Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 10, 2011 at 09:40:34AM +0100, Christoffer Dall wrote:
> OK, so I looked into compiling KVM/ARM as a module and there are a few
> obstacles:
> 
> I need to export several symbols (identitiy_mapping_add,
> pgd_clear_bad, __irq_svc). __irq_svc is tricky because it's in the
> entry-armv.S assembly file, so it's not obvious where to export it
> from. Recommendations? (dedicated KVM export file as in PPC or simply
> adding EXPORT_SYMBOL_GPL(...) or alternative?

There is arch/arm/kernel/armksyms.c where we export extra symbols coming
from .S files. I haven't looked at the code yet, maybe some of the
symbols could be avoided.

> Also, iirc, modules are loaded using vmalloc, wouldn't that make it
> impossible for me to use virt_to_phys, which I need to do on some of
> the code pages for Hypervisor initialization? If any of the ARM people
> could give an advise here, it would be much appreciated - of course I
> can kmalloc a page and relocate the init code, but I really would like
> to avoid this.

You could alloc a page (or a few) an copy the hypervisor code in there.
Just make sure that it is position independent (which is not difficult
with hand-written assembly).

Alternatively, you could set up the Hyp translation tables to also
include the modules area (pretty much duplicating the corresponding
swapper_pg_dir entries, with some attributes changed).

But for now you can probably ignore this issue and get back to it once
everything else is working.

-- 
Catalin

--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux