Skip to content
  • Charles Jacobsen's avatar
    test-v2: Fix liblcd syscalls, gv page tables, this_module linkage. · 666f9dae
    Charles Jacobsen authored and Vikram Narayanan's avatar Vikram Narayanan committed
    Couple interesting issues here:
    
       1 - Syscalls were breaking without "asm volatile". I tried
           just plain "asm" to be more compiler-friendly (I guess that
           is more friendly), but the compiler optimized away entire
           vmcall's, haha.
       2 - Guest virtual page table set up was way off for the pud (wasn't
           pointing to the pmd's, and some of the surrounding address
           arithmetic was bad). It's still bad (too specific for x86_64
           perhaps), but that's acceptable for now.
       3 - This was the most interesting one. I didn't even think that
           when we build liblcd (the .a file), the kernel doesn't think
           we're building a kernel module, so THIS_MODULE expands to
           NULL. In order to fix this, I manually set the MODULE macro
           (via a -D cc flag) so that the module.h macros expand as
           expected (we will always link liblcd.a with a kernel module,
           so e.g. struct module __this_module will always be defined).
    666f9dae