2016-01-15 17:51+0100, Andrew Jones: > Also throw an '#include "asm-generic/io.h"' at the bottom. Doing > that requires also adding an asm/page.h, and then some changes to > vm.[ch] to integrate with it. > > Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx> > --- > diff --git a/lib/x86/vm.h b/lib/x86/vm.h > @@ -39,11 +39,13 @@ unsigned long *install_large_page(unsigned long *cr3,unsigned long phys, > +#define virt_to_phys virt_to_phys > static inline unsigned long virt_to_phys(const void *virt) > { > return (unsigned long)virt; > } > > +#define phys_to_virt phys_to_virt Nitpick: if we always define all (both) functions, using two guarding #defines is pure waste. lib/asm-generic/io.h even has both functions under one #ifndef virt_to_phys. (It would be better with a sensible name instead of virt_to_phys and if it was in lib/asm-generic/vm.h. :]) > static inline void *phys_to_virt(unsigned long phys) > { > return (void *)phys; -- 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