On Sun, Jun 5, 2011 at 6:27 PM, Alexander Graf <agraf at suse.de> wrote: > > On 05.06.2011, at 18:03, Christoffer Dall wrote: > > On Sun, Jun 5, 2011 at 2:36 PM, Avi Kivity <avi at redhat.com> wrote: > > On 06/03/2011 06:03 PM, Christoffer Dall wrote: > > > [...] > > +if VIRTUALIZATION > > + > > +config KVM > > + ? ? ? bool "Kernel-based Virtual Machine (KVM) support" > > + ? ? ? select PREEMPT_NOTIFIERS > > + ? ? ? select ANON_INODES > > + ? ? ? select KVM_ARM_HOST > > + ? ? ? select KVM_MMIO > > + ? ? ? ---help--- > > + ? ? ? ? Support hosting virtualized guest machines. You will also > > + ? ? ? ? need to select one or more of the processor modules below. > > + > > + ? ? ? ? This module provides access to the hardware capabilities through > > + ? ? ? ? a character device node named /dev/kvm. > > + > > + ? ? ? ? If unsure, say N. > > I see you can't support a modular build, which is a pity. > > > My concern is that I map in code that needs to be in place for running > in Hyp mode. Of course I just need to pin these, so it should be > possible. I'll look into this as well. > > We have similar requirements for PPC, so feel free to check how we did it > there :). On =M we still include reasonably small parts of the code in the > kernel as =Y, but keep the big chunks outside as module. > 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? 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. Thanks! -Christoffer